From a913dafbf000eb05401ef2c847b29152af82977f Mon Sep 17 00:00:00 2001 From: Vaibhav Date: Mon, 18 Mar 2019 12:25:14 -0400 Subject: [PATCH] Support applying parameters for complete trigger spec (#230) * feature(): support applying parameters for complete trigger spec * chore(): update generated files for sensor * docs(): adding docs * chore(): rename workflowParameters * feature(): rename workflowParameters to resource parameters. getting rid of unnecessary structs in sensor trigger * refactor(): rename ParameterSource. only generating idl from api structs. * chore(): remove trailing backslash --- OWNERS | 1 + controllers/sensor/operator.go | 2 +- controllers/sensor/operator_test.go | 36 +- controllers/sensor/validate.go | 15 +- examples/sensors/amqp.yaml | 13 +- .../artifact-with-param-nats-standard.yaml | 17 +- .../artifact-with-param-nats-streaming.yaml | 17 +- examples/sensors/artifact.yaml | 50 +- examples/sensors/aws-sns.yaml | 13 +- examples/sensors/aws-sqs.yaml | 13 +- examples/sensors/calendar.yaml | 13 +- .../complete-trigger-parameterization.yaml | 78 + examples/sensors/context-filter-webhook.yaml | 5 +- examples/sensors/data-filter-webhook.yaml | 13 +- examples/sensors/file-sensor.yaml | 5 +- examples/sensors/file.yaml | 15 +- examples/sensors/gcp-pubsub.yaml | 13 +- examples/sensors/github.yaml | 5 +- examples/sensors/gitlab.yaml | 15 +- examples/sensors/hdfs.yaml | 10 +- examples/sensors/kafka.yaml | 13 +- examples/sensors/mqtt-sensor.yaml | 13 +- examples/sensors/multi-signal-sensor.yaml | 13 +- examples/sensors/multi-trigger-sensor.yaml | 10 +- examples/sensors/nats.yaml | 10 +- examples/sensors/resource.yaml | 13 +- examples/sensors/storage-grid-sensor.yaml | 15 +- examples/sensors/time-filter-webhook.yaml | 5 +- examples/sensors/trello.yaml | 13 +- examples/sensors/trigger-gateway.yaml | 12 +- .../sensors/trigger-source-configmap.yaml | 5 +- examples/sensors/trigger-source-git.yaml | 10 +- .../trigger-standard-k8s-resource.yaml | 10 +- examples/sensors/url-sensor.yaml | 5 +- examples/sensors/webhook-http-boolean.yaml | 22 +- .../webhook-http-dependency-groups.yaml | 39 +- examples/sensors/webhook-http.yaml | 13 +- examples/sensors/webhook-nats-streaming.yaml | 13 +- examples/sensors/webhook-nats.yaml | 13 +- .../webhook-with-complete-payload.yaml | 13 +- .../sensors/webhook-with-resource-param.yaml | 13 +- gateways/transformer.go | 2 +- hack/generate-proto.sh | 2 +- pkg/apis/common/generated.pb.go | 3483 -------- pkg/apis/common/generated.proto | 104 +- pkg/apis/gateway/v1alpha1/generated.pb.go | 2645 ------ pkg/apis/gateway/v1alpha1/generated.proto | 70 +- pkg/apis/sensor/v1alpha1/generated.pb.go | 7180 ----------------- pkg/apis/sensor/v1alpha1/generated.proto | 272 +- pkg/apis/sensor/v1alpha1/openapi_generated.go | 377 +- pkg/apis/sensor/v1alpha1/types.go | 97 +- .../sensor/v1alpha1/zz_generated.deepcopy.go | 206 +- sensors/event-handler.go | 6 +- sensors/event-handler_test.go | 44 +- sensors/trigger-params.go | 4 +- sensors/trigger-params_test.go | 30 +- sensors/trigger.go | 110 +- sensors/trigger_test.go | 156 +- store/store.go | 5 +- store/store_test.go | 15 +- 60 files changed, 1061 insertions(+), 14369 deletions(-) create mode 100644 examples/sensors/complete-trigger-parameterization.yaml delete mode 100644 pkg/apis/common/generated.pb.go delete mode 100644 pkg/apis/gateway/v1alpha1/generated.pb.go delete mode 100644 pkg/apis/sensor/v1alpha1/generated.pb.go diff --git a/OWNERS b/OWNERS index edf6e8d0b7..2be9262d74 100644 --- a/OWNERS +++ b/OWNERS @@ -7,3 +7,4 @@ approvers: - shrinandj - VaibhavPage - vicaire +- dtaniwaki diff --git a/controllers/sensor/operator.go b/controllers/sensor/operator.go index 56b7ac5025..81838c48d5 100644 --- a/controllers/sensor/operator.go +++ b/controllers/sensor/operator.go @@ -362,7 +362,7 @@ func (soc *sOperationCtx) initializeAllNodes() { // Initialize all trigger nodes for _, trigger := range soc.s.Spec.Triggers { - InitializeNode(soc.s, trigger.Name, v1alpha1.NodeTypeTrigger, &soc.log) + InitializeNode(soc.s, trigger.Template.Name, v1alpha1.NodeTypeTrigger, &soc.log) } } diff --git a/controllers/sensor/operator_test.go b/controllers/sensor/operator_test.go index 288794eefe..e527833349 100644 --- a/controllers/sensor/operator_test.go +++ b/controllers/sensor/operator_test.go @@ -28,6 +28,7 @@ import ( ) var sensorStr = ` + apiVersion: argoproj.io/v1alpha1 kind: Sensor metadata: @@ -49,29 +50,28 @@ spec: http: port: "9300" triggers: - - name: artifact-workflow-trigger - resource: - namespace: argo-events + - template: + name: artifact-workflow-trigger group: argoproj.io version: v1alpha1 kind: Workflow source: inline: | - apiVersion: argoproj.io/v1alpha1 - kind: Workflow - metadata: - generateName: hello-world- - spec: - entrypoint: whalesay - templates: - - - container: - args: - - "hello world" - command: - - cowsay - image: "docker/whalesay:latest" - name: whalesay + apiVersion: argoproj.io/v1alpha1 + kind: Workflow + metadata: + generateName: hello-world- + spec: + entrypoint: whalesay + templates: + - + container: + args: + - "hello world" + command: + - cowsay + image: "docker/whalesay:latest" + name: whalesay ` var ( diff --git a/controllers/sensor/validate.go b/controllers/sensor/validate.go index b83d5a0a83..fce5cadae4 100644 --- a/controllers/sensor/validate.go +++ b/controllers/sensor/validate.go @@ -94,14 +94,21 @@ func validateTriggers(triggers []v1alpha1.Trigger) error { } for _, trigger := range triggers { - if trigger.Name == "" { + if trigger.Template == nil { + return fmt.Errorf("trigger template can't be nil") + } + + if trigger.Template.Name == "" { return fmt.Errorf("trigger must define a name") } // each trigger must have a message or a resource - if trigger.Resource == nil { - return fmt.Errorf("trigger '%s' does not contain an absolute action", trigger.Name) + if trigger.Template.Source == nil { + return fmt.Errorf("trigger '%s' does not contain an absolute action", trigger.Template.Name) + } + if trigger.Template.GroupVersionKind == nil { + return fmt.Errorf("must provide group, version and kind for the resource") } - if trigger.When != nil && trigger.When.All != nil && trigger.When.Any != nil { + if trigger.Template.When != nil && trigger.Template.When.All != nil && trigger.Template.When.Any != nil { return fmt.Errorf("trigger condition can't have both any and all condition") } } diff --git a/examples/sensors/amqp.yaml b/examples/sensors/amqp.yaml index 41b9745c08..7b2d38fa9a 100644 --- a/examples/sensors/amqp.yaml +++ b/examples/sensors/amqp.yaml @@ -19,16 +19,11 @@ spec: dependencies: - name: "amqp-gateway:foo" triggers: - - name: amqp-workflow-trigger - resource: - namespace: argo-events + - template: + name: amqp-workflow-trigger group: argoproj.io version: v1alpha1 kind: Workflow - parameters: - - src: - event: "amqp-gateway:foo" - dest: spec.arguments.parameters.0.value source: inline: | apiVersion: argoproj.io/v1alpha1 @@ -51,3 +46,7 @@ spec: image: docker/whalesay:latest command: [cowsay] args: ["{{inputs.parameters.message}}"] + resourceParameters: + - src: + event: "amqp-gateway:foo" + dest: spec.arguments.parameters.0.value diff --git a/examples/sensors/artifact-with-param-nats-standard.yaml b/examples/sensors/artifact-with-param-nats-standard.yaml index c813180cbd..53e61de36b 100644 --- a/examples/sensors/artifact-with-param-nats-standard.yaml +++ b/examples/sensors/artifact-with-param-nats-standard.yaml @@ -20,18 +20,11 @@ spec: dependencies: - name: "artifact-gateway-nats-standard:input" triggers: - - name: argo-workflow - resource: - namespace: argo-events + - template: + name: argo-workflow group: argoproj.io version: v1alpha1 kind: Workflow - # The container args from the workflow are overridden by the s3 notification key - parameters: - - src: - event: "artifact-gateway-nats-standard:input" - path: s3.object.key - dest: spec.templates.0.container.args.0 source: inline: | apiVersion: argoproj.io/v1alpha1 @@ -46,3 +39,9 @@ spec: command: - cowsay image: "docker/whalesay:latest" + # The container args from the workflow are overridden by the s3 notification key + resourceParameters: + - src: + event: "artifact-gateway-nats-standard:input" + path: s3.object.key + dest: spec.templates.0.container.args.0 diff --git a/examples/sensors/artifact-with-param-nats-streaming.yaml b/examples/sensors/artifact-with-param-nats-streaming.yaml index a8f62c6e2f..5b25264f1e 100644 --- a/examples/sensors/artifact-with-param-nats-streaming.yaml +++ b/examples/sensors/artifact-with-param-nats-streaming.yaml @@ -22,18 +22,11 @@ spec: dependencies: - name: "artifact-gateway-nats-streaming:input" triggers: - - name: argo-workflow - resource: - namespace: argo-events + - template: + name: argo-workflow group: argoproj.io version: v1alpha1 kind: Workflow - # The container args from the workflow are overridden by the s3 notification key - parameters: - - src: - event: "artifact-gateway-nats-streaming:input" - path: s3.object.key - dest: spec.templates.0.container.args.0 source: inline: | apiVersion: argoproj.io/v1alpha1 @@ -48,3 +41,9 @@ spec: command: - cowsay image: "docker/whalesay:latest" + # The container args from the workflow are overridden by the s3 notification key + resourceParameters: + - src: + event: "artifact-gateway-nats-streaming:input" + path: s3.object.key + dest: spec.templates.0.container.args.0 diff --git a/examples/sensors/artifact.yaml b/examples/sensors/artifact.yaml index 0c55e3eae2..75ea51e1c6 100644 --- a/examples/sensors/artifact.yaml +++ b/examples/sensors/artifact.yaml @@ -19,49 +19,11 @@ spec: dependencies: - name: "artifact-gateway:input" triggers: - - name: artifact-workflow-trigger - resource: - namespace: argo-events + - template: + name: artifact-workflow-trigger-2 group: argoproj.io version: v1alpha1 kind: Workflow - parameters: - - src: - event: "artifact-gateway:input" - dest: spec.arguments.parameters.0.value - source: - inline: | - apiVersion: argoproj.io/v1alpha1 - kind: Workflow - metadata: - generateName: artifact-workflow-1- - spec: - entrypoint: whalesay - arguments: - parameters: - - name: message - value: hello world - templates: - - name: whalesay - inputs: - parameters: - - name: message - container: - image: docker/whalesay:latest - command: [cowsay] - args: ["{{inputs.parameters.message}}"] - - name: artifact-workflow-trigger-2 - resource: - namespace: argo-events - group: argoproj.io - version: v1alpha1 - kind: Workflow - # The container args from the workflow are overridden by the s3 notification key - parameters: - - src: - event: "artifact-gateway:input" - path: s3.object.key - dest: spec.templates.0.container.args.0 source: inline: | apiVersion: argoproj.io/v1alpha1 @@ -76,3 +38,11 @@ spec: command: - cowsay image: "docker/whalesay:latest" + args: + - THIS_WILL_BE_REPLACED + # The container args from the workflow are overridden by the s3 notification key + resourceParameters: + - src: + event: "artifact-gateway:input" + path: s3.object.key + dest: spec.templates.0.container.args.0 diff --git a/examples/sensors/aws-sns.yaml b/examples/sensors/aws-sns.yaml index 5500feea18..8c628b1ad2 100644 --- a/examples/sensors/aws-sns.yaml +++ b/examples/sensors/aws-sns.yaml @@ -19,16 +19,11 @@ spec: dependencies: - name: "aws-sns-gateway:notification_1" triggers: - - name: sns-workflow - resource: - namespace: argo-events + - template: + name: sns-workflow group: argoproj.io version: v1alpha1 kind: Workflow - parameters: - - src: - event: "aws-sns-gateway:notification_1" - dest: spec.arguments.parameters.0.value source: inline: | apiVersion: argoproj.io/v1alpha1 @@ -51,3 +46,7 @@ spec: image: docker/whalesay:latest command: [cowsay] args: ["{{inputs.parameters.message}}"] + resourceParameters: + - src: + event: "aws-sns-gateway:notification_1" + dest: spec.arguments.parameters.0.value diff --git a/examples/sensors/aws-sqs.yaml b/examples/sensors/aws-sqs.yaml index 57b074a48c..979802e5d8 100644 --- a/examples/sensors/aws-sqs.yaml +++ b/examples/sensors/aws-sqs.yaml @@ -19,16 +19,11 @@ spec: dependencies: - name: "aws-sqs-gateway:notification_1" triggers: - - name: sqs-workflow - resource: - namespace: argo-events + - template: + name: sqs-workflow group: argoproj.io version: v1alpha1 kind: Workflow - parameters: - - src: - event: "aws-sqs-gateway:notification_1" - dest: spec.arguments.parameters.0.value source: inline: | apiVersion: argoproj.io/v1alpha1 @@ -51,3 +46,7 @@ spec: image: docker/whalesay:latest command: [cowsay] args: ["{{inputs.parameters.message}}"] + resourceParameters: + - src: + event: "aws-sqs-gateway:notification_1" + dest: spec.arguments.parameters.0.value diff --git a/examples/sensors/calendar.yaml b/examples/sensors/calendar.yaml index 8dc8a88a47..e07d80dc0b 100644 --- a/examples/sensors/calendar.yaml +++ b/examples/sensors/calendar.yaml @@ -19,16 +19,11 @@ spec: http: port: "9300" triggers: - - name: calendar-workflow-trigger - resource: - namespace: argo-events + - template: + name: calendar-workflow-trigger group: argoproj.io version: v1alpha1 kind: Workflow - parameters: - - src: - event: "calendar-gateway:interval" - dest: spec.arguments.parameters.0.value source: inline: | apiVersion: argoproj.io/v1alpha1 @@ -51,3 +46,7 @@ spec: image: docker/whalesay:latest command: [cowsay] args: ["{{inputs.parameters.message}}"] + resourceParameters: + - src: + event: "calendar-gateway:interval" + dest: spec.arguments.parameters.0.value diff --git a/examples/sensors/complete-trigger-parameterization.yaml b/examples/sensors/complete-trigger-parameterization.yaml new file mode 100644 index 0000000000..fbe1bc09b2 --- /dev/null +++ b/examples/sensors/complete-trigger-parameterization.yaml @@ -0,0 +1,78 @@ +# The event payload for this example = +# +# { +# "name": "trigger-wf-1", +# "namespace": "argo-events", +# "bucket": "mybucket", +# "key": "hello.yaml", +# "image": "docker/busybox", +# } +# +# The example refers to workflow stored on a S3 bucket. With normal sensor spec, you would hard-code the S3 bucket name, object key and other things in trigger. +# But user would like to have dynamic trigger spec where depending on the data in the payload. +# The example data payload contains information like bucket, key, name, namespace which is used to replace the placeholders in trigger spec. +# The image in payload will be used to replace the image in the workflow. +# +apiVersion: argoproj.io/v1alpha1 +kind: Sensor +metadata: + name: complete-trigger-parameterization-sensor + labels: + sensors.argoproj.io/sensor-controller-instanceid: argo-events +spec: + template: + spec: + containers: + - name: "sensor" + image: "argoproj/sensor" + imagePullPolicy: Always + serviceAccountName: argo-events-sa + dependencies: + - name: "webhook-gateway-http:foo" + eventProtocol: + type: "HTTP" + http: + port: "9300" + triggers: + - template: + name: THIS_WILL_BE_REPLACED_NAME + group: argoproj.io + version: v1alpha1 + kind: Workflow + source: + s3: + bucket: + name: THIS_WILL_BE_REPLACED_BUCKET + key: THIS_WILL_BE_REPLACED_KEY + endpoint: minio-service.argo-events:9000 + insecure: true + accessKey: + key: accesskey + name: artifacts-minio + secretKey: + key: secretkey + name: artifacts-minio + # Apply parameter at template + templateParameters: + - src: + event: "webhook-gateway-http:foo" + path: name + dest: name + - src: + event: "webhook-gateway-http:foo" + path: namespace + dest: namespace + - src: + event: "webhook-gateway-http:foo" + path: bucket + dest: source.s3.bucket.name + - src: + event: "webhook-gateway-http:foo" + path: key + dest: source.s3.bucket.key + # Apply parameter for workflow + resourceParameters: + - src: + event: "webhook-gateway-http:foo" + path: image + dest: spec.templates.0.container.image diff --git a/examples/sensors/context-filter-webhook.yaml b/examples/sensors/context-filter-webhook.yaml index 057ea79d86..e2ee3c0a45 100644 --- a/examples/sensors/context-filter-webhook.yaml +++ b/examples/sensors/context-filter-webhook.yaml @@ -24,9 +24,8 @@ spec: http: port: "9300" triggers: - - name: done-workflow - resource: - namespace: argo-events + - template: + name: done-workflow group: argoproj.io version: v1alpha1 kind: Workflow diff --git a/examples/sensors/data-filter-webhook.yaml b/examples/sensors/data-filter-webhook.yaml index 5fa8dfd303..1b51340bee 100644 --- a/examples/sensors/data-filter-webhook.yaml +++ b/examples/sensors/data-filter-webhook.yaml @@ -28,16 +28,11 @@ spec: http: port: "9300" triggers: - - name: data-workflow - resource: - namespace: argo-events + - template: + name: data-workflow group: argoproj.io version: v1alpha1 kind: Workflow - parameters: - - src: - event: "webhook-gateway-http:foo" - dest: spec.arguments.parameters.0.value source: inline: | apiVersion: argoproj.io/v1alpha1 @@ -60,3 +55,7 @@ spec: image: docker/whalesay:latest command: [cowsay] args: ["{{inputs.parameters.message}}"] + resourceParameters: + - src: + event: "webhook-gateway-http:foo" + dest: spec.arguments.parameters.0.value diff --git a/examples/sensors/file-sensor.yaml b/examples/sensors/file-sensor.yaml index db8fc78fbc..a0da64dbd8 100644 --- a/examples/sensors/file-sensor.yaml +++ b/examples/sensors/file-sensor.yaml @@ -19,9 +19,8 @@ spec: http: port: "9300" triggers: - - name: file-workflow-trigger - resource: - namespace: argo-events + - template: + name: file-workflow-trigger group: argoproj.io version: v1alpha1 kind: Workflow diff --git a/examples/sensors/file.yaml b/examples/sensors/file.yaml index 8aaf09acbc..b751042630 100644 --- a/examples/sensors/file.yaml +++ b/examples/sensors/file.yaml @@ -19,17 +19,11 @@ spec: http: port: "9300" triggers: - - name: file-workflow-trigger - resource: - namespace: argo-events + - template: + name: file-workflow-trigger group: argoproj.io version: v1alpha1 kind: Workflow - parameters: - - src: - event: "file-gateway:bindir" - path: name - dest: spec.templates.0.container.args.1 source: inline: | apiVersion: argoproj.io/v1alpha1 @@ -47,3 +41,8 @@ spec: - cowsay image: "docker/whalesay:latest" name: whalesay + resourceParameters: + - src: + event: "file-gateway:bindir" + path: name + dest: spec.templates.0.container.args.1 diff --git a/examples/sensors/gcp-pubsub.yaml b/examples/sensors/gcp-pubsub.yaml index 6e9e930e4d..33e5ef726b 100644 --- a/examples/sensors/gcp-pubsub.yaml +++ b/examples/sensors/gcp-pubsub.yaml @@ -19,16 +19,11 @@ spec: dependencies: - name: "gcp-pubsub-gateway:notification_1" triggers: - - name: gcp-workflow - resource: - namespace: argo-events + - template: + name: gcp-workflow group: argoproj.io version: v1alpha1 kind: Workflow - parameters: - - src: - event: "gcp-pubsub-gateway:notification_1" - dest: spec.arguments.parameters.0.value source: inline: | apiVersion: argoproj.io/v1alpha1 @@ -51,3 +46,7 @@ spec: image: docker/whalesay:latest command: [cowsay] args: ["{{inputs.parameters.message}}"] + resourceParameters: + - src: + event: "gcp-pubsub-gateway:notification_1" + dest: spec.arguments.parameters.0.value diff --git a/examples/sensors/github.yaml b/examples/sensors/github.yaml index f0c05b95fc..40b41cfb67 100644 --- a/examples/sensors/github.yaml +++ b/examples/sensors/github.yaml @@ -19,9 +19,8 @@ spec: http: port: "9300" triggers: - - name: github-workflow-trigger - resource: - namespace: argo-events + - template: + name: github-workflow-trigger group: argoproj.io version: v1alpha1 kind: Workflow diff --git a/examples/sensors/gitlab.yaml b/examples/sensors/gitlab.yaml index fd3559321a..9532c41349 100644 --- a/examples/sensors/gitlab.yaml +++ b/examples/sensors/gitlab.yaml @@ -19,16 +19,11 @@ spec: dependencies: - name: "gitlab-gateway:project_1" triggers: - - name: gitlab-workflow-trigger - resource: - namespace: argo-events + - template: + name: gitlab-workflow-trigger group: argoproj.io version: v1alpha1 kind: Workflow - parameters: - - src: - event: "gitlab-gateway:project_1" - dest: spec.arguments.parameters.0.value source: inline: | apiVersion: argoproj.io/v1alpha1 @@ -50,4 +45,8 @@ spec: container: image: docker/whalesay:latest command: [cowsay] - args: ["{{inputs.parameters.message}}"] + args: ["{{inputs.parameters.message}}"] + resourceParameters: + - src: + event: "gitlab-gateway:project_1" + dest: spec.arguments.parameters.0.value \ No newline at end of file diff --git a/examples/sensors/hdfs.yaml b/examples/sensors/hdfs.yaml index bd510cb1da..55e3cbeb1e 100644 --- a/examples/sensors/hdfs.yaml +++ b/examples/sensors/hdfs.yaml @@ -19,9 +19,8 @@ spec: http: port: "9300" triggers: - - name: hdfs-workflow-trigger - resource: - namespace: argo-events + - template: + name: hdfs-workflow-trigger group: argoproj.io version: v1alpha1 kind: Workflow @@ -46,3 +45,8 @@ spec: command: - cowsay image: "docker/whalesay:latest" + resourceParameters: + - src: + event: "hdfs-gateway:tmpdir" + path: name + dest: spec.templates.0.container.args.1 diff --git a/examples/sensors/kafka.yaml b/examples/sensors/kafka.yaml index af87be81e3..e3422c87fa 100644 --- a/examples/sensors/kafka.yaml +++ b/examples/sensors/kafka.yaml @@ -19,16 +19,11 @@ spec: dependencies: - name: "kafka-gateway:foo" triggers: - - name: kafka-workflow-trigger - resource: - namespace: argo-events + - template: + name: kafka-workflow-trigger group: argoproj.io version: v1alpha1 kind: Workflow - parameters: - - src: - event: "kafka-gateway:foo" - dest: spec.arguments.parameters.0.value source: inline: | apiVersion: argoproj.io/v1alpha1 @@ -51,3 +46,7 @@ spec: image: docker/whalesay:latest command: [cowsay] args: ["{{inputs.parameters.message}}"] + resourceParameters: + - src: + event: "kafka-gateway:foo" + dest: spec.arguments.parameters.0.value diff --git a/examples/sensors/mqtt-sensor.yaml b/examples/sensors/mqtt-sensor.yaml index c9114e7637..dc3c0c765e 100644 --- a/examples/sensors/mqtt-sensor.yaml +++ b/examples/sensors/mqtt-sensor.yaml @@ -19,16 +19,11 @@ spec: dependencies: - name: "mqtt-gateway:foo" triggers: - - name: mqtt-workflow-trigger - resource: - namespace: argo-events + - template: + name: mqtt-workflow-trigger group: argoproj.io version: v1alpha1 kind: Workflow - parameters: - - src: - event: "mqtt-gateway:foo" - dest: spec.arguments.parameters.0.value source: inline: | apiVersion: argoproj.io/v1alpha1 @@ -51,3 +46,7 @@ spec: image: docker/whalesay:latest command: [cowsay] args: ["{{inputs.parameters.message}}"] + resourceParameters: + - src: + event: "mqtt-gateway:foo" + dest: spec.arguments.parameters.0.value diff --git a/examples/sensors/multi-signal-sensor.yaml b/examples/sensors/multi-signal-sensor.yaml index 6dca35a426..e9ce2cb08d 100644 --- a/examples/sensors/multi-signal-sensor.yaml +++ b/examples/sensors/multi-signal-sensor.yaml @@ -21,16 +21,11 @@ spec: - name: "webhook-gateway-http:foo" - name: "calendar-gateway:interval" triggers: - - name: multi-signal-workflow-trigger - resource: - namespace: argo-events + - template: + name: multi-signal-workflow-trigger group: argoproj.io version: v1alpha1 kind: Workflow - parameters: - - src: - event: "webhook-gateway-http:foo" - dest: spec.arguments.parameters.0.value source: inline: | apiVersion: argoproj.io/v1alpha1 @@ -53,3 +48,7 @@ spec: image: docker/whalesay:latest command: [cowsay] args: ["{{inputs.parameters.message}}"] + resourceParameters: + - src: + event: "webhook-gateway-http:foo" + dest: spec.arguments.parameters.0.value \ No newline at end of file diff --git a/examples/sensors/multi-trigger-sensor.yaml b/examples/sensors/multi-trigger-sensor.yaml index 34aee74737..8ce78fdb47 100644 --- a/examples/sensors/multi-trigger-sensor.yaml +++ b/examples/sensors/multi-trigger-sensor.yaml @@ -19,9 +19,8 @@ spec: dependencies: - name: "webhook-gateway-http:foo" triggers: - - name: multi-trigger-workflow-1 - resource: - namespace: argo-events + - template: + name: multi-trigger-workflow-1 group: argoproj.io version: v1alpha1 kind: Workflow @@ -38,9 +37,8 @@ spec: secretKey: key: secretkey name: artifacts-minio - - name: multi-trigger-workflow-2 - resource: - namespace: argo-events + - template: + name: multi-trigger-workflow-2 group: argoproj.io version: v1alpha1 kind: Workflow diff --git a/examples/sensors/nats.yaml b/examples/sensors/nats.yaml index bf2d076486..dacb76dcff 100644 --- a/examples/sensors/nats.yaml +++ b/examples/sensors/nats.yaml @@ -21,16 +21,11 @@ spec: dependencies: - name: "nats-gateway:foo" triggers: - - name: nats-workflow-trigger - resource: - namespace: argo-events + - template: + name: nats-workflow-trigger group: argoproj.io version: v1alpha1 kind: Workflow - parameters: - - src: - event: "nats-gateway:foo" - dest: spec.arguments.parameters.0.value source: inline: | apiVersion: argoproj.io/v1alpha1 @@ -42,7 +37,6 @@ spec: arguments: parameters: - name: message - # this is the value that should be overridden value: hello world templates: - name: whalesay diff --git a/examples/sensors/resource.yaml b/examples/sensors/resource.yaml index 31f9254b2c..d13123140c 100644 --- a/examples/sensors/resource.yaml +++ b/examples/sensors/resource.yaml @@ -19,16 +19,11 @@ spec: dependencies: - name: "resource-gateway:workflow-success" triggers: - - name: argo-workflow - resource: - namespace: argo-events + - template: + name: argo-workflow group: argoproj.io version: v1alpha1 kind: Workflow - parameters: - - src: - event: "resource-gateway:workflow-success" - dest: spec.arguments.parameters.0.value source: inline: | apiVersion: argoproj.io/v1alpha1 @@ -51,3 +46,7 @@ spec: image: docker/whalesay:latest command: [cowsay] args: ["{{inputs.parameters.message}}"] + resourceParameters: + - src: + event: "resource-gateway:workflow-success" + dest: spec.arguments.parameters.0.value \ No newline at end of file diff --git a/examples/sensors/storage-grid-sensor.yaml b/examples/sensors/storage-grid-sensor.yaml index 33bbdf13de..d25aba1f78 100644 --- a/examples/sensors/storage-grid-sensor.yaml +++ b/examples/sensors/storage-grid-sensor.yaml @@ -19,18 +19,11 @@ spec: http: port: "9300" triggers: - - name: argo-workflow - resource: - namespace: argo-events + - template: + name: argo-workflow group: argoproj.io version: v1alpha1 kind: Workflow - parameters: - - src: - event: "storage-grid-gateway:my_bucket" - path: - value: hello world - dest: spec.arguments.parameters.0.value source: inline: | apiVersion: argoproj.io/v1alpha1 @@ -54,3 +47,7 @@ spec: image: docker/whalesay:latest command: [cowsay] args: ["{{inputs.parameters.message}}"] + resourceParameters: + - src: + event: "storage-grid-gateway:my_bucket" + dest: spec.arguments.parameters.0.value diff --git a/examples/sensors/time-filter-webhook.yaml b/examples/sensors/time-filter-webhook.yaml index 4c3d514f13..2083f7e01e 100644 --- a/examples/sensors/time-filter-webhook.yaml +++ b/examples/sensors/time-filter-webhook.yaml @@ -23,9 +23,8 @@ spec: start: "22:14:05" stop: "23:04:05" triggers: - - name: hello-world-workflow-trigger - resource: - namespace: argo-events + - template: + name: hello-world-workflow-trigger group: argoproj.io version: v1alpha1 kind: Workflow diff --git a/examples/sensors/trello.yaml b/examples/sensors/trello.yaml index d1a2c973b2..c8462df0f3 100644 --- a/examples/sensors/trello.yaml +++ b/examples/sensors/trello.yaml @@ -19,16 +19,11 @@ spec: dependencies: - name: "trello-gateway:notification_1" triggers: - - name: trello-workflow - resource: - namespace: argo-events + - template: + name: trello-workflow group: argoproj.io version: v1alpha1 kind: Workflow - parameters: - - src: - event: "trello-gateway:notification_1" - dest: spec.arguments.parameters.0.value source: inline: | apiVersion: argoproj.io/v1alpha1 @@ -51,3 +46,7 @@ spec: image: docker/whalesay:latest command: [cowsay] args: ["{{inputs.parameters.message}}"] + resourceParameters: + - src: + event: "trello-gateway:notification_1" + dest: spec.arguments.parameters.0.value diff --git a/examples/sensors/trigger-gateway.yaml b/examples/sensors/trigger-gateway.yaml index 7ee34437c0..b45730c369 100644 --- a/examples/sensors/trigger-gateway.yaml +++ b/examples/sensors/trigger-gateway.yaml @@ -20,9 +20,8 @@ spec: - name: "webhook-gateway-http:foo" # once sensor receives an event from webhook gateway, it will create an artifact gateway. triggers: - - name: artifact-gateway-configmap-trigger - resource: - namespace: argo-events + - template: + name: artifact-gateway-configmap-trigger group: "" version: v1 kind: Configmap @@ -49,14 +48,13 @@ spec: secretKey: key: secretkey name: artifacts-minio - - name: artifact-gateway-trigger - resource: - namespace: argo-events + - template: + name: artifact-gateway-trigger group: argoproj.io version: v1alpha1 kind: Gateway source: - inline: | + inline: |- apiVersion: argoproj.io/v1alpha1 kind: Gateway metadata: diff --git a/examples/sensors/trigger-source-configmap.yaml b/examples/sensors/trigger-source-configmap.yaml index 47bb152b46..eb165b68a9 100644 --- a/examples/sensors/trigger-source-configmap.yaml +++ b/examples/sensors/trigger-source-configmap.yaml @@ -19,9 +19,8 @@ spec: dependencies: - name: "artifact-gateway:input" triggers: - - name: artifact-workflow-trigger - resource: - namespace: argo-events + - template: + name: artifact-workflow-trigger group: argoproj.io version: v1alpha1 kind: Workflow diff --git a/examples/sensors/trigger-source-git.yaml b/examples/sensors/trigger-source-git.yaml index b0607eb48f..799d5fe20c 100644 --- a/examples/sensors/trigger-source-git.yaml +++ b/examples/sensors/trigger-source-git.yaml @@ -26,9 +26,8 @@ spec: http: port: "9300" triggers: - - name: workflow-trigger-1 - resource: - namespace: argo-events + - template: + name: workflow-trigger-1 group: argoproj.io version: v1alpha1 kind: Workflow @@ -46,9 +45,8 @@ spec: namespace: argo-events filePath: "examples/hello-world.yaml" tag: "v2.2.1" - - name: workflow-trigger-2 - resource: - namespace: argo-events + - template: + name: workflow-trigger-2 group: argoproj.io version: v1alpha1 kind: Workflow diff --git a/examples/sensors/trigger-standard-k8s-resource.yaml b/examples/sensors/trigger-standard-k8s-resource.yaml index 9d0829d492..bc4c8b541f 100644 --- a/examples/sensors/trigger-standard-k8s-resource.yaml +++ b/examples/sensors/trigger-standard-k8s-resource.yaml @@ -20,9 +20,8 @@ spec: port: "9300" # To add other standard K8s resources, change the version and pod in triggers/resource accordingly. triggers: - - name: webhook-pod-trigger - resource: - namespace: argo-events + - template: + name: webhook-pod-trigger group: "" version: v1 kind: Pod @@ -40,9 +39,8 @@ spec: command: - cowsay image: "docker/whalesay:latest" - - name: webhook-deployment-trigger - resource: - namespace: argo-events + - template: + name: webhook-deployment-trigger group: apps version: v1 kind: Deployment diff --git a/examples/sensors/url-sensor.yaml b/examples/sensors/url-sensor.yaml index 1c8546e12a..3cf744a6e3 100644 --- a/examples/sensors/url-sensor.yaml +++ b/examples/sensors/url-sensor.yaml @@ -19,9 +19,8 @@ spec: dependencies: - name: "artifact-gateway:input" triggers: - - name: url-workflow-trigger - resource: - namespace: argo-events + - template: + name: url-workflow-trigger group: argoproj.io version: v1alpha1 kind: Workflow diff --git a/examples/sensors/webhook-http-boolean.yaml b/examples/sensors/webhook-http-boolean.yaml index 6a6826a229..93a38af6e5 100644 --- a/examples/sensors/webhook-http-boolean.yaml +++ b/examples/sensors/webhook-http-boolean.yaml @@ -34,12 +34,11 @@ spec: http: port: "9300" triggers: - - name: webhook-workflow-trigger - when: - all: - - "group_1" - resource: - namespace: argo-events + - template: + when: + all: + - "group_1" + name: webhook-workflow-trigger group: argoproj.io version: v1alpha1 kind: Workflow @@ -59,12 +58,11 @@ spec: command: - cowsay image: "docker/whalesay:latest" - - name: webhook-workflow-trigger-2 - when: - all: - - "group_2" - resource: - namespace: argo-events + - template: + when: + all: + - "group_2" + name: webhook-workflow-trigger-2 group: argoproj.io version: v1alpha1 kind: Workflow diff --git a/examples/sensors/webhook-http-dependency-groups.yaml b/examples/sensors/webhook-http-dependency-groups.yaml index d3a0a859ab..f4dc9282bf 100644 --- a/examples/sensors/webhook-http-dependency-groups.yaml +++ b/examples/sensors/webhook-http-dependency-groups.yaml @@ -65,20 +65,15 @@ spec: http: port: "9300" triggers: - - name: webhook-workflow-trigger - when: - any: - - "group_1" - - "group_2" - resource: - namespace: argo-events + - template: + when: + any: + - "group_1" + - "group_2" + name: webhook-workflow-trigger group: argoproj.io version: v1alpha1 kind: Workflow - parameters: - - src: - event: "webhook-gateway-http:endpoint1" - dest: spec.arguments.parameters.0.value source: inline: | apiVersion: argoproj.io/v1alpha1 @@ -101,13 +96,16 @@ spec: image: docker/whalesay:latest command: [cowsay] args: ["{{inputs.parameters.message}}"] - - name: webhook-workflow-trigger-2 - when: - all: - - "group_5" - - "group_4" - resource: - namespace: argo-events + resourceParameters: + - src: + event: "webhook-gateway-http:endpoint1" + dest: spec.arguments.parameters.0.value + - template: + name: webhook-workflow-trigger-2 + when: + all: + - "group_5" + - "group_4" group: argoproj.io version: v1alpha1 kind: Workflow @@ -127,9 +125,8 @@ spec: command: - cowsay image: "docker/whalesay:latest" - - name: webhook-workflow-trigger-common - resource: - namespace: argo-events + - template: + name: webhook-workflow-trigger-common group: argoproj.io version: v1alpha1 kind: Workflow diff --git a/examples/sensors/webhook-http.yaml b/examples/sensors/webhook-http.yaml index 8d4ef0230f..a7b9d37a19 100644 --- a/examples/sensors/webhook-http.yaml +++ b/examples/sensors/webhook-http.yaml @@ -19,16 +19,11 @@ spec: http: port: "9300" triggers: - - name: webhook-workflow-trigger - resource: - namespace: argo-events + - template: + name: webhook-workflow-trigger group: argoproj.io version: v1alpha1 kind: Workflow - parameters: - - src: - event: "webhook-gateway-http:foo" - dest: spec.arguments.parameters.0.value source: inline: | apiVersion: argoproj.io/v1alpha1 @@ -51,3 +46,7 @@ spec: image: docker/whalesay:latest command: [cowsay] args: ["{{inputs.parameters.message}}"] + resourceParameters: + - src: + event: "webhook-gateway-http:foo" + dest: spec.arguments.parameters.0.value diff --git a/examples/sensors/webhook-nats-streaming.yaml b/examples/sensors/webhook-nats-streaming.yaml index b4a1e6eba2..8a08666ec9 100644 --- a/examples/sensors/webhook-nats-streaming.yaml +++ b/examples/sensors/webhook-nats-streaming.yaml @@ -23,16 +23,11 @@ spec: dependencies: - name: "webhook-gateway-nats-streaming:foo" triggers: - - name: argo-workflow - resource: - namespace: argo-events + - template: + name: argo-workflow group: argoproj.io version: v1alpha1 kind: Workflow - parameters: - - src: - event: "webhook-gateway-nats-streaming:foo" - dest: spec.arguments.parameters.0.value source: inline: | apiVersion: argoproj.io/v1alpha1 @@ -55,3 +50,7 @@ spec: image: docker/whalesay:latest command: [cowsay] args: ["{{inputs.parameters.message}}"] + resourceParameters: + - src: + event: "webhook-gateway-nats-streaming:foo" + dest: spec.arguments.parameters.0.value diff --git a/examples/sensors/webhook-nats.yaml b/examples/sensors/webhook-nats.yaml index 7cbd7e681d..342c281326 100644 --- a/examples/sensors/webhook-nats.yaml +++ b/examples/sensors/webhook-nats.yaml @@ -20,16 +20,11 @@ spec: url: "nats://nats.argo-events:4222" type: "Standard" triggers: - - name: webhook-workflow-trigger - resource: - namespace: argo-events + - template: + name: webhook-workflow-trigger group: argoproj.io version: v1alpha1 kind: Workflow - parameters: - - src: - event: "webhook-gateway-nats:foo" - dest: spec.arguments.parameters.0.value source: inline: | apiVersion: argoproj.io/v1alpha1 @@ -52,3 +47,7 @@ spec: image: docker/whalesay:latest command: [cowsay] args: ["{{inputs.parameters.message}}"] + resourceParameters: + - src: + event: "webhook-gateway-nats:foo" + dest: spec.arguments.parameters.0.value diff --git a/examples/sensors/webhook-with-complete-payload.yaml b/examples/sensors/webhook-with-complete-payload.yaml index 74e0cbdd8c..b6dc9bd521 100644 --- a/examples/sensors/webhook-with-complete-payload.yaml +++ b/examples/sensors/webhook-with-complete-payload.yaml @@ -20,16 +20,11 @@ spec: dependencies: - name: "webhook-gateway-nats:foo" triggers: - - name: argo-workflow - resource: - namespace: argo-events + - template: + name: argo-workflow group: argoproj.io version: v1alpha1 kind: Workflow - parameters: - - src: - event: "webhook-gateway-nats:foo" - dest: spec.arguments.parameters.0.value source: inline: | apiVersion: argoproj.io/v1alpha1 @@ -52,3 +47,7 @@ spec: image: docker/whalesay:latest command: [cowsay] args: ["{{inputs.parameters.message}}"] + resourceParameters: + - src: + event: "webhook-gateway-nats:foo" + dest: spec.arguments.parameters.0.value \ No newline at end of file diff --git a/examples/sensors/webhook-with-resource-param.yaml b/examples/sensors/webhook-with-resource-param.yaml index 8750c14b16..a054bfb92d 100644 --- a/examples/sensors/webhook-with-resource-param.yaml +++ b/examples/sensors/webhook-with-resource-param.yaml @@ -20,16 +20,11 @@ spec: dependencies: - name: "webhook-gateway-nats:foo" triggers: - - name: argo-workflow - resource: - namespace: argo-events + - template: + name: argo-workflow group: argoproj.io version: v1alpha1 kind: Workflow - parameters: - - src: - event: "webhook-gateway-nats:foo" - dest: spec.arguments.parameters.0.value source: inline: | apiVersion: argoproj.io/v1alpha1 @@ -52,3 +47,7 @@ spec: image: docker/whalesay:latest command: [cowsay] args: ["{{inputs.parameters.message}}"] + resourceParameters: + - src: + event: "webhook-gateway-nats:foo" + dest: spec.arguments.parameters.0.value \ No newline at end of file diff --git a/gateways/transformer.go b/gateways/transformer.go index 43977c7fa8..03efedc986 100644 --- a/gateways/transformer.go +++ b/gateways/transformer.go @@ -60,7 +60,7 @@ func (gc *GatewayConfig) DispatchEvent(gatewayEvent *Event) error { return err } default: - return fmt.Errorf("unknown dispatch mechanism %s", gc.gw.Spec.EventProtocol) + return fmt.Errorf("unknown dispatch mechanism %s", gc.gw.Spec.EventProtocol.Type) } return nil } diff --git a/hack/generate-proto.sh b/hack/generate-proto.sh index f05ad7bab4..6196558d82 100755 --- a/hack/generate-proto.sh +++ b/hack/generate-proto.sh @@ -37,8 +37,8 @@ APIMACHINERY_PKGS=( dist/go-to-protobuf \ --logtostderr \ + --only-idl=true \ --go-header-file=${PROJECT_ROOT}/hack/custom-boilerplate.go.txt \ --packages=$(IFS=, ; echo "${PACKAGES[*]}") \ --apimachinery-packages=$(IFS=, ; echo "${APIMACHINERY_PKGS[*]}") \ --proto-import=${PROJECT_ROOT}/vendor - diff --git a/pkg/apis/common/generated.pb.go b/pkg/apis/common/generated.pb.go deleted file mode 100644 index 647712c744..0000000000 --- a/pkg/apis/common/generated.pb.go +++ /dev/null @@ -1,3483 +0,0 @@ -/* -Copyright 2018 BlackRock, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/argoproj/argo-events/pkg/apis/common/generated.proto - -package common - -import ( - "fmt" - - "io" - - "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - github_com_minio_minio_go "github.com/minio/minio-go" - v11 "k8s.io/api/core/v1" - - "math" - "reflect" - "strings" -) - -// 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 *Event) Reset() { *m = Event{} } -func (*Event) ProtoMessage() {} -func (*Event) Descriptor() ([]byte, []int) { - return fileDescriptor_02aae6165a434fa7, []int{0} -} -func (m *Event) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Event) 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 (m *Event) XXX_Merge(src proto.Message) { - xxx_messageInfo_Event.Merge(m, src) -} -func (m *Event) XXX_Size() int { - return m.Size() -} -func (m *Event) XXX_DiscardUnknown() { - xxx_messageInfo_Event.DiscardUnknown(m) -} - -var xxx_messageInfo_Event proto.InternalMessageInfo - -func (m *EventContext) Reset() { *m = EventContext{} } -func (*EventContext) ProtoMessage() {} -func (*EventContext) Descriptor() ([]byte, []int) { - return fileDescriptor_02aae6165a434fa7, []int{1} -} -func (m *EventContext) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventContext) 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 (m *EventContext) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventContext.Merge(m, src) -} -func (m *EventContext) XXX_Size() int { - return m.Size() -} -func (m *EventContext) XXX_DiscardUnknown() { - xxx_messageInfo_EventContext.DiscardUnknown(m) -} - -var xxx_messageInfo_EventContext proto.InternalMessageInfo - -func (m *EventProtocol) Reset() { *m = EventProtocol{} } -func (*EventProtocol) ProtoMessage() {} -func (*EventProtocol) Descriptor() ([]byte, []int) { - return fileDescriptor_02aae6165a434fa7, []int{2} -} -func (m *EventProtocol) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventProtocol) 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 (m *EventProtocol) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventProtocol.Merge(m, src) -} -func (m *EventProtocol) XXX_Size() int { - return m.Size() -} -func (m *EventProtocol) XXX_DiscardUnknown() { - xxx_messageInfo_EventProtocol.DiscardUnknown(m) -} - -var xxx_messageInfo_EventProtocol proto.InternalMessageInfo - -func (m *Http) Reset() { *m = Http{} } -func (*Http) ProtoMessage() {} -func (*Http) Descriptor() ([]byte, []int) { - return fileDescriptor_02aae6165a434fa7, []int{3} -} -func (m *Http) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Http) 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 (m *Http) XXX_Merge(src proto.Message) { - xxx_messageInfo_Http.Merge(m, src) -} -func (m *Http) XXX_Size() int { - return m.Size() -} -func (m *Http) XXX_DiscardUnknown() { - xxx_messageInfo_Http.DiscardUnknown(m) -} - -var xxx_messageInfo_Http proto.InternalMessageInfo - -func (m *Nats) Reset() { *m = Nats{} } -func (*Nats) ProtoMessage() {} -func (*Nats) Descriptor() ([]byte, []int) { - return fileDescriptor_02aae6165a434fa7, []int{4} -} -func (m *Nats) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Nats) 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 (m *Nats) XXX_Merge(src proto.Message) { - xxx_messageInfo_Nats.Merge(m, src) -} -func (m *Nats) XXX_Size() int { - return m.Size() -} -func (m *Nats) XXX_DiscardUnknown() { - xxx_messageInfo_Nats.DiscardUnknown(m) -} - -var xxx_messageInfo_Nats proto.InternalMessageInfo - -func (m *S3Artifact) Reset() { *m = S3Artifact{} } -func (*S3Artifact) ProtoMessage() {} -func (*S3Artifact) Descriptor() ([]byte, []int) { - return fileDescriptor_02aae6165a434fa7, []int{5} -} -func (m *S3Artifact) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *S3Artifact) 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 (m *S3Artifact) XXX_Merge(src proto.Message) { - xxx_messageInfo_S3Artifact.Merge(m, src) -} -func (m *S3Artifact) XXX_Size() int { - return m.Size() -} -func (m *S3Artifact) XXX_DiscardUnknown() { - xxx_messageInfo_S3Artifact.DiscardUnknown(m) -} - -var xxx_messageInfo_S3Artifact proto.InternalMessageInfo - -func (m *S3Bucket) Reset() { *m = S3Bucket{} } -func (*S3Bucket) ProtoMessage() {} -func (*S3Bucket) Descriptor() ([]byte, []int) { - return fileDescriptor_02aae6165a434fa7, []int{6} -} -func (m *S3Bucket) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *S3Bucket) 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 (m *S3Bucket) XXX_Merge(src proto.Message) { - xxx_messageInfo_S3Bucket.Merge(m, src) -} -func (m *S3Bucket) XXX_Size() int { - return m.Size() -} -func (m *S3Bucket) XXX_DiscardUnknown() { - xxx_messageInfo_S3Bucket.DiscardUnknown(m) -} - -var xxx_messageInfo_S3Bucket proto.InternalMessageInfo - -func (m *S3Filter) Reset() { *m = S3Filter{} } -func (*S3Filter) ProtoMessage() {} -func (*S3Filter) Descriptor() ([]byte, []int) { - return fileDescriptor_02aae6165a434fa7, []int{7} -} -func (m *S3Filter) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *S3Filter) 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 (m *S3Filter) XXX_Merge(src proto.Message) { - xxx_messageInfo_S3Filter.Merge(m, src) -} -func (m *S3Filter) XXX_Size() int { - return m.Size() -} -func (m *S3Filter) XXX_DiscardUnknown() { - xxx_messageInfo_S3Filter.DiscardUnknown(m) -} - -var xxx_messageInfo_S3Filter proto.InternalMessageInfo - -func (m *ServiceTemplateSpec) Reset() { *m = ServiceTemplateSpec{} } -func (*ServiceTemplateSpec) ProtoMessage() {} -func (*ServiceTemplateSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_02aae6165a434fa7, []int{8} -} -func (m *ServiceTemplateSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ServiceTemplateSpec) 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 (m *ServiceTemplateSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_ServiceTemplateSpec.Merge(m, src) -} -func (m *ServiceTemplateSpec) XXX_Size() int { - return m.Size() -} -func (m *ServiceTemplateSpec) XXX_DiscardUnknown() { - xxx_messageInfo_ServiceTemplateSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_ServiceTemplateSpec proto.InternalMessageInfo - -func (m *URI) Reset() { *m = URI{} } -func (*URI) ProtoMessage() {} -func (*URI) Descriptor() ([]byte, []int) { - return fileDescriptor_02aae6165a434fa7, []int{9} -} -func (m *URI) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *URI) 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 (m *URI) XXX_Merge(src proto.Message) { - xxx_messageInfo_URI.Merge(m, src) -} -func (m *URI) XXX_Size() int { - return m.Size() -} -func (m *URI) XXX_DiscardUnknown() { - xxx_messageInfo_URI.DiscardUnknown(m) -} - -var xxx_messageInfo_URI proto.InternalMessageInfo - -func init() { - proto.RegisterType((*Event)(nil), "github.com.argoproj.argo_events.pkg.apis.common.Event") - proto.RegisterType((*EventContext)(nil), "github.com.argoproj.argo_events.pkg.apis.common.EventContext") - proto.RegisterMapType((map[string]string)(nil), "github.com.argoproj.argo_events.pkg.apis.common.EventContext.ExtensionsEntry") - proto.RegisterType((*EventProtocol)(nil), "github.com.argoproj.argo_events.pkg.apis.common.EventProtocol") - proto.RegisterType((*Http)(nil), "github.com.argoproj.argo_events.pkg.apis.common.Http") - proto.RegisterType((*Nats)(nil), "github.com.argoproj.argo_events.pkg.apis.common.Nats") - proto.RegisterType((*S3Artifact)(nil), "github.com.argoproj.argo_events.pkg.apis.common.S3Artifact") - proto.RegisterType((*S3Bucket)(nil), "github.com.argoproj.argo_events.pkg.apis.common.S3Bucket") - proto.RegisterType((*S3Filter)(nil), "github.com.argoproj.argo_events.pkg.apis.common.S3Filter") - proto.RegisterType((*ServiceTemplateSpec)(nil), "github.com.argoproj.argo_events.pkg.apis.common.ServiceTemplateSpec") - proto.RegisterType((*URI)(nil), "github.com.argoproj.argo_events.pkg.apis.common.URI") -} - -func init() { - proto.RegisterFile("github.com/argoproj/argo-events/pkg/apis/common/generated.proto", fileDescriptor_02aae6165a434fa7) -} - -var fileDescriptor_02aae6165a434fa7 = []byte{ - // 1383 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xd1, 0x6f, 0x13, 0x47, - 0x13, 0x8f, 0x13, 0xc7, 0xb1, 0xd7, 0xf0, 0x25, 0x6c, 0x3e, 0xf4, 0x59, 0xf9, 0x84, 0x93, 0xba, - 0x6a, 0x95, 0x4a, 0x70, 0x2e, 0x01, 0x24, 0x5a, 0x09, 0xb5, 0x71, 0x12, 0xd4, 0x14, 0x42, 0xd3, - 0x3d, 0x02, 0x15, 0x52, 0x55, 0x36, 0xe7, 0x89, 0xbd, 0xe4, 0xee, 0xf6, 0xd8, 0xdb, 0x73, 0xf1, - 0x5b, 0xfb, 0x1f, 0x54, 0x95, 0xfa, 0xaf, 0xf4, 0xa1, 0x6f, 0x7d, 0xe3, 0xa9, 0xe2, 0x91, 0xa7, - 0xa8, 0xa4, 0xff, 0x44, 0xc5, 0x53, 0xb5, 0x73, 0x7b, 0x77, 0x8e, 0x63, 0xa4, 0x06, 0x5e, 0xec, - 0xdd, 0x99, 0xdf, 0xfc, 0x66, 0x76, 0x6e, 0x66, 0x76, 0xc9, 0x67, 0x3d, 0xa1, 0xfb, 0xc9, 0xbe, - 0xe3, 0xc9, 0xa0, 0xcd, 0x55, 0x4f, 0x46, 0x4a, 0x3e, 0xc1, 0xc5, 0x15, 0x18, 0x40, 0xa8, 0xe3, - 0x76, 0x74, 0xd8, 0x6b, 0xf3, 0x48, 0xc4, 0x6d, 0x4f, 0x06, 0x81, 0x0c, 0xdb, 0x3d, 0x08, 0x41, - 0x71, 0x0d, 0x5d, 0x27, 0x52, 0x52, 0x4b, 0xda, 0x2e, 0x08, 0x9c, 0x8c, 0x00, 0x17, 0xdf, 0xa5, - 0x04, 0x4e, 0x74, 0xd8, 0x73, 0x0c, 0x81, 0x93, 0x12, 0x2c, 0x5d, 0x19, 0xf1, 0xd8, 0x93, 0x3d, - 0xd9, 0x46, 0x9e, 0xfd, 0xe4, 0x00, 0x77, 0xb8, 0xc1, 0x55, 0xca, 0xbf, 0xd4, 0x3a, 0xbc, 0x19, - 0x3b, 0x42, 0x9a, 0x18, 0xda, 0x9e, 0x54, 0xd0, 0x1e, 0x5c, 0x1d, 0x8f, 0x61, 0xe9, 0x7a, 0x81, - 0x09, 0xb8, 0xd7, 0x17, 0x21, 0xa8, 0x61, 0x11, 0x78, 0x00, 0x9a, 0x4f, 0xb2, 0x6a, 0xbf, 0xc9, - 0x4a, 0x25, 0xa1, 0x16, 0x01, 0x9c, 0x32, 0xb8, 0xf6, 0x26, 0x83, 0x44, 0x0b, 0xbf, 0x2d, 0x42, - 0x1d, 0x6b, 0x35, 0x6e, 0xd4, 0xfa, 0xb9, 0x44, 0x66, 0xb7, 0x4c, 0x26, 0x68, 0x9f, 0xcc, 0x79, - 0x32, 0xd4, 0xf0, 0x4c, 0x37, 0x4a, 0x2b, 0xa5, 0xd5, 0xfa, 0xda, 0x2d, 0xe7, 0x8c, 0xb9, 0x73, - 0x90, 0x68, 0x23, 0x25, 0xe9, 0xcc, 0x3f, 0x3f, 0x5a, 0x9e, 0x3a, 0x3e, 0x5a, 0x9e, 0xb3, 0x02, - 0x96, 0xd1, 0xd3, 0x65, 0x52, 0xee, 0x72, 0xcd, 0x1b, 0xd3, 0x2b, 0xa5, 0xd5, 0x73, 0x9d, 0xba, - 0xc1, 0xec, 0xf2, 0xa1, 0x2f, 0x79, 0x97, 0xa1, 0xa2, 0xf5, 0x4b, 0x85, 0x9c, 0x1b, 0xe5, 0xa2, - 0x6d, 0x52, 0x43, 0x97, 0xf7, 0x87, 0x11, 0x60, 0x74, 0xb5, 0xce, 0x05, 0x4b, 0x5f, 0xdb, 0xca, - 0x14, 0xac, 0xc0, 0xd0, 0x4d, 0xb2, 0x90, 0x6f, 0x1e, 0x80, 0x8a, 0x85, 0x0c, 0xd1, 0x5d, 0xad, - 0xd3, 0xb0, 0x76, 0x0b, 0x5b, 0x63, 0x7a, 0x76, 0xca, 0x82, 0x7e, 0x49, 0xa8, 0xe7, 0xcb, 0xa4, - 0x8b, 0xd0, 0x38, 0xe3, 0x99, 0x41, 0x9e, 0x25, 0xcb, 0x43, 0x37, 0x4e, 0x21, 0xd8, 0x04, 0x2b, - 0xfa, 0x0d, 0xa9, 0xc4, 0x32, 0x51, 0x1e, 0x34, 0xca, 0x98, 0xdd, 0xeb, 0x67, 0xce, 0xee, 0x1e, - 0xdb, 0xee, 0x90, 0xe3, 0xa3, 0xe5, 0x8a, 0x8b, 0x3c, 0xcc, 0xf2, 0xd1, 0x8f, 0xc8, 0x1c, 0x5a, - 0x6c, 0x6f, 0x36, 0x66, 0x31, 0xb4, 0x3c, 0xf3, 0x5b, 0xa9, 0x98, 0x65, 0x7a, 0xfa, 0x38, 0xcb, - 0xa3, 0x08, 0xa0, 0x51, 0xc1, 0x38, 0xda, 0x4e, 0x5a, 0x36, 0xce, 0x68, 0xd9, 0x14, 0xbe, 0x4d, - 0x75, 0x3a, 0x83, 0xab, 0xce, 0x8e, 0xf0, 0x94, 0x34, 0x66, 0xe3, 0x89, 0x17, 0x41, 0x9e, 0x78, - 0x11, 0x00, 0xe5, 0xa4, 0x16, 0x7b, 0x7d, 0x08, 0xf8, 0x1e, 0xbb, 0xdb, 0x98, 0x7b, 0x87, 0x93, - 0x9e, 0x37, 0x2e, 0xdc, 0x8c, 0x8a, 0x15, 0xac, 0xf4, 0x06, 0xa9, 0x63, 0x25, 0xd9, 0x72, 0xa8, - 0xe2, 0x99, 0x17, 0x6d, 0x54, 0xf5, 0x8d, 0x42, 0xc5, 0x46, 0x71, 0xf4, 0xc7, 0x12, 0x21, 0xf0, - 0x4c, 0x43, 0x68, 0x3e, 0x47, 0xdc, 0xa8, 0xad, 0xcc, 0xac, 0xd6, 0xd7, 0x76, 0xde, 0xa9, 0xc6, - 0x9d, 0xad, 0x9c, 0x6f, 0x2b, 0xd4, 0x6a, 0xd8, 0xa1, 0x36, 0x0a, 0x52, 0x28, 0xd8, 0x88, 0xd3, - 0xa5, 0x5b, 0x64, 0x7e, 0xcc, 0x84, 0x2e, 0x90, 0x99, 0x43, 0x18, 0xa6, 0x45, 0xcd, 0xcc, 0x92, - 0xfe, 0x97, 0xcc, 0x0e, 0xb8, 0x9f, 0x40, 0x5a, 0xb0, 0x2c, 0xdd, 0x7c, 0x3a, 0x7d, 0xb3, 0xd4, - 0xfa, 0xbb, 0x44, 0xce, 0xa3, 0xff, 0x5d, 0xd3, 0xbb, 0x9e, 0xf4, 0xe9, 0x0d, 0x52, 0xd6, 0x45, - 0x4f, 0xbc, 0x67, 0xdd, 0x97, 0xcd, 0x81, 0x5f, 0x1f, 0x2d, 0x5f, 0x38, 0x01, 0xc6, 0x94, 0x20, - 0x9c, 0x3e, 0x24, 0xe5, 0xbe, 0xd6, 0x11, 0x7a, 0xa8, 0xaf, 0xdd, 0x38, 0x73, 0x12, 0xbe, 0xd0, - 0x3a, 0xea, 0x9c, 0xcb, 0xbc, 0x99, 0x1d, 0x43, 0x42, 0x43, 0x1c, 0x72, 0x1d, 0x63, 0x8f, 0xbc, - 0x0d, 0xf1, 0x3d, 0xae, 0xe3, 0x82, 0xd8, 0xec, 0x18, 0x12, 0xb6, 0x56, 0x09, 0xba, 0xa1, 0x2b, - 0xa4, 0x1c, 0x49, 0xa5, 0xed, 0x81, 0x73, 0xe4, 0xae, 0x54, 0x9a, 0xa1, 0xa6, 0xf5, 0x7b, 0x99, - 0xa0, 0x21, 0xbd, 0x44, 0x66, 0x12, 0xe5, 0x5b, 0x64, 0xdd, 0x22, 0x67, 0x4c, 0x31, 0x19, 0x39, - 0x75, 0xc9, 0xc5, 0x58, 0x73, 0xa5, 0x1f, 0x0a, 0xdd, 0xbf, 0xcb, 0x63, 0xcd, 0xc0, 0x03, 0x31, - 0x80, 0x2e, 0x26, 0xa5, 0xda, 0xb9, 0x64, 0x0d, 0x2e, 0xba, 0x93, 0x40, 0x6c, 0xb2, 0x2d, 0xdd, - 0x21, 0x8b, 0x5d, 0xf0, 0xc5, 0x00, 0xd4, 0xba, 0xef, 0xaf, 0x0f, 0xb8, 0xf0, 0xf9, 0xbe, 0x0f, - 0x98, 0x8e, 0x6a, 0xe7, 0xff, 0x96, 0x72, 0x71, 0xf3, 0x34, 0x84, 0x4d, 0xb2, 0xa3, 0xeb, 0x64, - 0x1e, 0xfd, 0xac, 0x6b, 0x17, 0x9e, 0x26, 0x10, 0xda, 0xe9, 0x51, 0xeb, 0xfc, 0xcf, 0x52, 0xcd, - 0xbb, 0x27, 0xd5, 0x6c, 0x1c, 0x6f, 0xba, 0xc5, 0x8a, 0xb0, 0xe9, 0x67, 0x4f, 0x76, 0x8b, 0x5b, - 0xa8, 0xd8, 0x28, 0xce, 0x0c, 0xd0, 0x91, 0xed, 0x26, 0xf8, 0x9a, 0xe3, 0xc0, 0x18, 0x19, 0xa0, - 0xee, 0x98, 0x9e, 0x9d, 0xb2, 0x30, 0xa3, 0xa9, 0x9b, 0x28, 0x4c, 0xc1, 0x1c, 0xa6, 0x20, 0x1f, - 0x4d, 0x9b, 0xa9, 0x98, 0x65, 0x7a, 0x33, 0xe2, 0x3d, 0x3f, 0x89, 0x35, 0xa8, 0xed, 0xae, 0xed, - 0xe9, 0x7c, 0xd2, 0x6c, 0x64, 0x0a, 0x56, 0x60, 0xe8, 0x65, 0x52, 0xf5, 0x7c, 0x61, 0xe6, 0x5a, - 0xb7, 0x51, 0x43, 0xfc, 0x82, 0xc5, 0x57, 0x37, 0xac, 0x9c, 0xe5, 0x08, 0x7a, 0xd9, 0x36, 0x0a, - 0x39, 0x71, 0x86, 0xac, 0x51, 0xaa, 0xa6, 0x60, 0x8a, 0xfe, 0x68, 0xfd, 0x51, 0x26, 0xc4, 0xbd, - 0xb6, 0xae, 0xb4, 0x38, 0xe0, 0x9e, 0x36, 0xae, 0x20, 0xec, 0x46, 0x52, 0x84, 0x59, 0xe1, 0xe5, - 0xae, 0xb6, 0xac, 0x9c, 0xe5, 0x08, 0xfa, 0x2d, 0xa9, 0xec, 0x27, 0xde, 0x21, 0x68, 0xdb, 0x5e, - 0x9f, 0x9c, 0xb9, 0x0b, 0xdc, 0x6b, 0x1d, 0x24, 0x48, 0xc7, 0x7d, 0xba, 0x66, 0x96, 0x94, 0x7e, - 0x48, 0x2a, 0x0a, 0x7a, 0xc5, 0x45, 0xf4, 0x1f, 0x1b, 0x4a, 0x85, 0xa1, 0x94, 0x59, 0xad, 0x09, - 0x5a, 0x84, 0x31, 0x78, 0x89, 0x4a, 0x8b, 0xa6, 0x5a, 0x04, 0xbd, 0x6d, 0xe5, 0x2c, 0x47, 0x50, - 0x46, 0x6a, 0xdc, 0xf3, 0x20, 0x8e, 0xef, 0xc0, 0x10, 0x8b, 0xa4, 0xbe, 0xf6, 0xc1, 0xc8, 0xcd, - 0xe0, 0x98, 0xb7, 0x8d, 0xb9, 0x07, 0x5c, 0xf0, 0x14, 0xe8, 0x3b, 0x30, 0x74, 0xc1, 0x07, 0x4f, - 0x4b, 0x95, 0x0e, 0xea, 0xf5, 0xcc, 0x96, 0x15, 0x34, 0x86, 0x33, 0xce, 0xe0, 0xf6, 0xb6, 0x39, - 0x0b, 0x67, 0x2e, 0x66, 0x05, 0x0d, 0x7d, 0x40, 0x66, 0x31, 0x69, 0x58, 0x4f, 0xb5, 0xce, 0xe7, - 0xf6, 0x48, 0xe9, 0x1b, 0xe6, 0xf5, 0xd1, 0xf2, 0xc8, 0x7b, 0xaf, 0x1d, 0x88, 0x50, 0xc8, 0xf4, - 0xf7, 0x4a, 0x4f, 0x3a, 0xf7, 0xa4, 0x16, 0x07, 0xc2, 0xe3, 0x5a, 0xc8, 0xb0, 0x78, 0x34, 0xa4, - 0x74, 0xe6, 0xa3, 0x1d, 0x08, 0x5f, 0x83, 0xc2, 0xda, 0x7b, 0xbb, 0x8f, 0x76, 0x1b, 0x09, 0xd2, - 0x8f, 0x96, 0xae, 0x99, 0x25, 0x6d, 0xdd, 0x21, 0xd5, 0xec, 0xa3, 0x9a, 0xb9, 0x94, 0x4f, 0xfc, - 0x62, 0x2e, 0x99, 0x73, 0xe2, 0xf8, 0x5f, 0x31, 0x23, 0x34, 0xb0, 0xd3, 0x7f, 0x74, 0x16, 0x06, - 0xc0, 0x50, 0xd3, 0x7a, 0x64, 0xc8, 0x52, 0x07, 0xa6, 0x1a, 0x22, 0x05, 0x07, 0xe2, 0x99, 0xe5, - 0xcb, 0xab, 0x61, 0x17, 0xa5, 0xcc, 0x6a, 0x0d, 0x2e, 0x4e, 0x0e, 0x0c, 0x6e, 0xfa, 0x24, 0xce, - 0x45, 0x29, 0xb3, 0xda, 0xd6, 0x6f, 0x25, 0xb2, 0xe8, 0x82, 0x1a, 0x08, 0x0f, 0xee, 0x43, 0x10, - 0xf9, 0x5c, 0x83, 0x1b, 0x81, 0x47, 0x1f, 0x93, 0xaa, 0x79, 0x0a, 0xe0, 0xbb, 0x2d, 0x7d, 0x1e, - 0x7e, 0xfc, 0xef, 0x1e, 0x0e, 0x5f, 0xed, 0x3f, 0x01, 0x4f, 0xef, 0x80, 0xe6, 0xc5, 0xed, 0x58, - 0xc8, 0x58, 0xce, 0x4a, 0xd7, 0x49, 0x39, 0x8e, 0xc0, 0xb3, 0x4d, 0xb3, 0x3c, 0xb9, 0x50, 0x30, - 0x30, 0x13, 0x50, 0x91, 0x18, 0xb3, 0x63, 0x68, 0xda, 0xfa, 0x75, 0x9a, 0xcc, 0xec, 0xb1, 0x6d, - 0x3c, 0xac, 0x79, 0x2e, 0xc0, 0x78, 0x52, 0xf0, 0x3d, 0x61, 0x5e, 0x4e, 0xf8, 0x6f, 0x52, 0x9d, - 0xc4, 0xa0, 0xc6, 0x53, 0xbd, 0x17, 0x83, 0x62, 0xa8, 0x31, 0x4d, 0x14, 0xf1, 0x38, 0xfe, 0x5e, - 0xaa, 0xae, 0x6d, 0xb7, 0xbc, 0x89, 0x76, 0xad, 0x9c, 0xe5, 0x08, 0xc3, 0xd7, 0x97, 0xb1, 0xb6, - 0x33, 0xba, 0xb8, 0x1f, 0x65, 0xac, 0x19, 0x6a, 0xf2, 0xeb, 0xcb, 0x74, 0xd8, 0xec, 0xa4, 0xeb, - 0x0b, 0x11, 0x5c, 0xf7, 0xed, 0xb0, 0x2d, 0x10, 0x5c, 0xf7, 0x19, 0x6a, 0xe8, 0xfb, 0x64, 0xf6, - 0x69, 0x02, 0x6a, 0x68, 0x5b, 0xe0, 0x7c, 0xd6, 0x02, 0x5f, 0x1b, 0x21, 0x4b, 0x75, 0x26, 0xf0, - 0x03, 0xc5, 0x7b, 0x81, 0x69, 0x95, 0xea, 0xc9, 0xc0, 0x6f, 0x5b, 0x39, 0xcb, 0x11, 0x9d, 0xcb, - 0xcf, 0x5f, 0x35, 0xa7, 0x5e, 0xbc, 0x6a, 0x4e, 0xbd, 0x7c, 0xd5, 0x9c, 0xfa, 0xe1, 0xb8, 0x59, - 0x7a, 0x7e, 0xdc, 0x2c, 0xbd, 0x38, 0x6e, 0x96, 0x5e, 0x1e, 0x37, 0x4b, 0x7f, 0x1e, 0x37, 0x4b, - 0x3f, 0xfd, 0xd5, 0x9c, 0x7a, 0x54, 0x49, 0x2b, 0xfd, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xcc, - 0xef, 0xd2, 0x42, 0x95, 0x0d, 0x00, 0x00, -} - -func (m *Event) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Event) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Context.Size())) - n1, err := m.Context.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - if m.Payload != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Payload))) - i += copy(dAtA[i:], m.Payload) - } - return i, nil -} - -func (m *EventContext) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EventContext) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.EventType))) - i += copy(dAtA[i:], m.EventType) - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.EventTypeVersion))) - i += copy(dAtA[i:], m.EventTypeVersion) - dAtA[i] = 0x1a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.CloudEventsVersion))) - i += copy(dAtA[i:], m.CloudEventsVersion) - if m.Source != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Source.Size())) - n2, err := m.Source.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - dAtA[i] = 0x2a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.EventID))) - i += copy(dAtA[i:], m.EventID) - dAtA[i] = 0x32 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.EventTime.Size())) - n3, err := m.EventTime.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - if m.SchemaURL != nil { - dAtA[i] = 0x3a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.SchemaURL.Size())) - n4, err := m.SchemaURL.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } - dAtA[i] = 0x42 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ContentType))) - i += copy(dAtA[i:], m.ContentType) - if len(m.Extensions) > 0 { - keysForExtensions := make([]string, 0, len(m.Extensions)) - for k := range m.Extensions { - keysForExtensions = append(keysForExtensions, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForExtensions) - for _, k := range keysForExtensions { - dAtA[i] = 0x4a - i++ - v := m.Extensions[string(k)] - mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) - i = encodeVarintGenerated(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) - } - } - return i, nil -} - -func (m *EventProtocol) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EventProtocol) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i += copy(dAtA[i:], m.Type) - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Http.Size())) - n5, err := m.Http.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - dAtA[i] = 0x1a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Nats.Size())) - n6, err := m.Nats.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - return i, nil -} - -func (m *Http) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Http) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Port))) - i += copy(dAtA[i:], m.Port) - return i, nil -} - -func (m *Nats) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Nats) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.URL))) - i += copy(dAtA[i:], m.URL) - dAtA[i] = 0x10 - i++ - if m.StartWithLastReceived { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - dAtA[i] = 0x18 - i++ - if m.DeliverAllAvailable { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - dAtA[i] = 0x22 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.StartAtSequence))) - i += copy(dAtA[i:], m.StartAtSequence) - dAtA[i] = 0x2a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.StartAtTime))) - i += copy(dAtA[i:], m.StartAtTime) - dAtA[i] = 0x32 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.StartAtTimeDelta))) - i += copy(dAtA[i:], m.StartAtTimeDelta) - dAtA[i] = 0x38 - i++ - if m.Durable { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - dAtA[i] = 0x42 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ClusterId))) - i += copy(dAtA[i:], m.ClusterId) - dAtA[i] = 0x4a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ClientId))) - i += copy(dAtA[i:], m.ClientId) - dAtA[i] = 0x52 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i += copy(dAtA[i:], m.Type) - return i, nil -} - -func (m *S3Artifact) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *S3Artifact) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Endpoint))) - i += copy(dAtA[i:], m.Endpoint) - if m.Bucket != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Bucket.Size())) - n7, err := m.Bucket.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n7 - } - dAtA[i] = 0x1a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Region))) - i += copy(dAtA[i:], m.Region) - dAtA[i] = 0x20 - i++ - if m.Insecure { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - if m.AccessKey != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.AccessKey.Size())) - n8, err := m.AccessKey.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n8 - } - if m.SecretKey != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.SecretKey.Size())) - n9, err := m.SecretKey.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n9 - } - dAtA[i] = 0x3a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Event))) - i += copy(dAtA[i:], m.Event) - if m.Filter != nil { - dAtA[i] = 0x42 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Filter.Size())) - n10, err := m.Filter.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n10 - } - return i, nil -} - -func (m *S3Bucket) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *S3Bucket) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Key))) - i += copy(dAtA[i:], m.Key) - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - return i, nil -} - -func (m *S3Filter) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *S3Filter) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Prefix))) - i += copy(dAtA[i:], m.Prefix) - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Suffix))) - i += copy(dAtA[i:], m.Suffix) - return i, nil -} - -func (m *ServiceTemplateSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ServiceTemplateSpec) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n11, err := m.ObjectMeta.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n11 - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size())) - n12, err := m.Spec.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n12 - return i, nil -} - -func (m *URI) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *URI) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Scheme))) - i += copy(dAtA[i:], m.Scheme) - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.User))) - i += copy(dAtA[i:], m.User) - dAtA[i] = 0x1a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Password))) - i += copy(dAtA[i:], m.Password) - dAtA[i] = 0x22 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Host))) - i += copy(dAtA[i:], m.Host) - dAtA[i] = 0x28 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Port)) - dAtA[i] = 0x32 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path))) - i += copy(dAtA[i:], m.Path) - dAtA[i] = 0x3a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Query))) - i += copy(dAtA[i:], m.Query) - dAtA[i] = 0x42 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Fragment))) - i += copy(dAtA[i:], m.Fragment) - return i, nil -} - -func encodeVarintGenerated(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 *Event) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Context.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.Payload != nil { - l = len(m.Payload) - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *EventContext) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.EventType) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.EventTypeVersion) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.CloudEventsVersion) - n += 1 + l + sovGenerated(uint64(l)) - if m.Source != nil { - l = m.Source.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - l = len(m.EventID) - n += 1 + l + sovGenerated(uint64(l)) - l = m.EventTime.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.SchemaURL != nil { - l = m.SchemaURL.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - l = len(m.ContentType) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Extensions) > 0 { - for k, v := range m.Extensions { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } - } - return n -} - -func (m *EventProtocol) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - l = m.Http.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Nats.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *Http) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Port) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *Nats) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.URL) - n += 1 + l + sovGenerated(uint64(l)) - n += 2 - n += 2 - l = len(m.StartAtSequence) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.StartAtTime) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.StartAtTimeDelta) - n += 1 + l + sovGenerated(uint64(l)) - n += 2 - l = len(m.ClusterId) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.ClientId) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *S3Artifact) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Endpoint) - n += 1 + l + sovGenerated(uint64(l)) - if m.Bucket != nil { - l = m.Bucket.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - l = len(m.Region) - n += 1 + l + sovGenerated(uint64(l)) - n += 2 - if m.AccessKey != nil { - l = m.AccessKey.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.SecretKey != nil { - l = m.SecretKey.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - l = len(m.Event) - n += 1 + l + sovGenerated(uint64(l)) - if m.Filter != nil { - l = m.Filter.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *S3Bucket) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Key) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *S3Filter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Prefix) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Suffix) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ServiceTemplateSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *URI) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Scheme) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.User) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Password) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Host) - n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.Port)) - l = len(m.Path) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Query) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Fragment) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func sovGenerated(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Event) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Event{`, - `Context:` + strings.Replace(strings.Replace(this.Context.String(), "EventContext", "EventContext", 1), `&`, ``, 1) + `,`, - `Payload:` + valueToStringGenerated(this.Payload) + `,`, - `}`, - }, "") - return s -} -func (this *EventContext) String() string { - if this == nil { - return "nil" - } - keysForExtensions := make([]string, 0, len(this.Extensions)) - for k := range this.Extensions { - keysForExtensions = append(keysForExtensions, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForExtensions) - mapStringForExtensions := "map[string]string{" - for _, k := range keysForExtensions { - mapStringForExtensions += fmt.Sprintf("%v: %v,", k, this.Extensions[k]) - } - mapStringForExtensions += "}" - s := strings.Join([]string{`&EventContext{`, - `EventType:` + fmt.Sprintf("%v", this.EventType) + `,`, - `EventTypeVersion:` + fmt.Sprintf("%v", this.EventTypeVersion) + `,`, - `CloudEventsVersion:` + fmt.Sprintf("%v", this.CloudEventsVersion) + `,`, - `Source:` + strings.Replace(fmt.Sprintf("%v", this.Source), "URI", "URI", 1) + `,`, - `EventID:` + fmt.Sprintf("%v", this.EventID) + `,`, - `EventTime:` + strings.Replace(strings.Replace(this.EventTime.String(), "MicroTime", "v1.MicroTime", 1), `&`, ``, 1) + `,`, - `SchemaURL:` + strings.Replace(fmt.Sprintf("%v", this.SchemaURL), "URI", "URI", 1) + `,`, - `ContentType:` + fmt.Sprintf("%v", this.ContentType) + `,`, - `Extensions:` + mapStringForExtensions + `,`, - `}`, - }, "") - return s -} -func (this *EventProtocol) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&EventProtocol{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Http:` + strings.Replace(strings.Replace(this.Http.String(), "Http", "Http", 1), `&`, ``, 1) + `,`, - `Nats:` + strings.Replace(strings.Replace(this.Nats.String(), "Nats", "Nats", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *Http) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Http{`, - `Port:` + fmt.Sprintf("%v", this.Port) + `,`, - `}`, - }, "") - return s -} -func (this *Nats) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Nats{`, - `URL:` + fmt.Sprintf("%v", this.URL) + `,`, - `StartWithLastReceived:` + fmt.Sprintf("%v", this.StartWithLastReceived) + `,`, - `DeliverAllAvailable:` + fmt.Sprintf("%v", this.DeliverAllAvailable) + `,`, - `StartAtSequence:` + fmt.Sprintf("%v", this.StartAtSequence) + `,`, - `StartAtTime:` + fmt.Sprintf("%v", this.StartAtTime) + `,`, - `StartAtTimeDelta:` + fmt.Sprintf("%v", this.StartAtTimeDelta) + `,`, - `Durable:` + fmt.Sprintf("%v", this.Durable) + `,`, - `ClusterId:` + fmt.Sprintf("%v", this.ClusterId) + `,`, - `ClientId:` + fmt.Sprintf("%v", this.ClientId) + `,`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `}`, - }, "") - return s -} -func (this *S3Artifact) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&S3Artifact{`, - `Endpoint:` + fmt.Sprintf("%v", this.Endpoint) + `,`, - `Bucket:` + strings.Replace(fmt.Sprintf("%v", this.Bucket), "S3Bucket", "S3Bucket", 1) + `,`, - `Region:` + fmt.Sprintf("%v", this.Region) + `,`, - `Insecure:` + fmt.Sprintf("%v", this.Insecure) + `,`, - `AccessKey:` + strings.Replace(fmt.Sprintf("%v", this.AccessKey), "SecretKeySelector", "v11.SecretKeySelector", 1) + `,`, - `SecretKey:` + strings.Replace(fmt.Sprintf("%v", this.SecretKey), "SecretKeySelector", "v11.SecretKeySelector", 1) + `,`, - `Event:` + fmt.Sprintf("%v", this.Event) + `,`, - `Filter:` + strings.Replace(fmt.Sprintf("%v", this.Filter), "S3Filter", "S3Filter", 1) + `,`, - `}`, - }, "") - return s -} -func (this *S3Bucket) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&S3Bucket{`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `}`, - }, "") - return s -} -func (this *S3Filter) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&S3Filter{`, - `Prefix:` + fmt.Sprintf("%v", this.Prefix) + `,`, - `Suffix:` + fmt.Sprintf("%v", this.Suffix) + `,`, - `}`, - }, "") - return s -} -func (this *ServiceTemplateSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ServiceTemplateSpec{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ServiceSpec", "v11.ServiceSpec", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *URI) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&URI{`, - `Scheme:` + fmt.Sprintf("%v", this.Scheme) + `,`, - `User:` + fmt.Sprintf("%v", this.User) + `,`, - `Password:` + fmt.Sprintf("%v", this.Password) + `,`, - `Host:` + fmt.Sprintf("%v", this.Host) + `,`, - `Port:` + fmt.Sprintf("%v", this.Port) + `,`, - `Path:` + fmt.Sprintf("%v", this.Path) + `,`, - `Query:` + fmt.Sprintf("%v", this.Query) + `,`, - `Fragment:` + fmt.Sprintf("%v", this.Fragment) + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Event) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Event: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Event: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Context", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Context.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Payload = append(m.Payload[:0], dAtA[iNdEx:postIndex]...) - if m.Payload == nil { - m.Payload = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventContext) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EventContext: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventContext: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EventType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EventType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EventTypeVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EventTypeVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CloudEventsVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CloudEventsVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Source == nil { - m.Source = &URI{} - } - if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EventID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EventID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EventTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.EventTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SchemaURL", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SchemaURL == nil { - m.SchemaURL = &URI{} - } - if err := m.SchemaURL.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContentType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContentType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Extensions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Extensions == nil { - m.Extensions = 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 ErrIntOverflowGenerated - } - if iNdEx >= 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 ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenerated - } - 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 ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Extensions[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventProtocol) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EventProtocol: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventProtocol: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = EventProtocolType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Http", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Http.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nats", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Nats.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Http) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Http: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Http: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Port = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Nats) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Nats: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Nats: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field URL", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.URL = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartWithLastReceived", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.StartWithLastReceived = bool(v != 0) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DeliverAllAvailable", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.DeliverAllAvailable = bool(v != 0) - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StartAtSequence", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StartAtSequence = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StartAtTime", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StartAtTime = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StartAtTimeDelta", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StartAtTimeDelta = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Durable", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Durable = bool(v != 0) - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClusterId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClusterId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClientId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = NatsType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *S3Artifact) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: S3Artifact: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: S3Artifact: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Endpoint", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Endpoint = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bucket", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Bucket == nil { - m.Bucket = &S3Bucket{} - } - if err := m.Bucket.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Region", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Region = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Insecure", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Insecure = bool(v != 0) - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccessKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AccessKey == nil { - m.AccessKey = &v11.SecretKeySelector{} - } - if err := m.AccessKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SecretKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SecretKey == nil { - m.SecretKey = &v11.SecretKeySelector{} - } - if err := m.SecretKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Event", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Event = github_com_minio_minio_go.NotificationEventType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Filter", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Filter == nil { - m.Filter = &S3Filter{} - } - if err := m.Filter.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *S3Bucket) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: S3Bucket: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: S3Bucket: 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 ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - 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 Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *S3Filter) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: S3Filter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: S3Filter: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Prefix", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Prefix = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Suffix", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Suffix = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ServiceTemplateSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ServiceTemplateSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ServiceTemplateSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *URI) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: URI: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: URI: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scheme", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Scheme = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.User = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Password = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Host", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Host = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) - } - m.Port = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Port |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Path = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Query = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Fragment", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Fragment = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenerated(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, ErrIntOverflowGenerated - } - 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, ErrIntOverflowGenerated - } - 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, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - 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 := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - 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 ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") -) diff --git a/pkg/apis/common/generated.proto b/pkg/apis/common/generated.proto index f87447cf04..679421ef29 100644 --- a/pkg/apis/common/generated.proto +++ b/pkg/apis/common/generated.proto @@ -19,20 +19,30 @@ syntax = 'proto2'; package github.com.argoproj.argo_events.pkg.apis.common; +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; import "k8s.io/api/core/v1/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". +option (gogoproto.marshaler_all) = true; +option (gogoproto.stable_marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.stringer_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.goproto_unrecognized_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; option go_package = "common"; // Event is a data record expressing an occurrence and its context. // Adheres to the CloudEvents v0.1 specification message Event { - optional EventContext context = 1; + optional EventContext context = 1 [(gogoproto.customname) = "Context", (gogoproto.nullable) = false]; - optional bytes data = 2; + optional bytes data = 2 [(gogoproto.customname) = "Payload"]; } // EventContext contains metadata that provides circumstantial information about the occurrence. @@ -41,120 +51,120 @@ message EventContext { // routing, observability, policy enforcement, etc. // should be prefixed with a reverse-DNS name. The prefixed domain dictates // the organization which defines the semantics of this event type. ex: com.github.pull.create - optional string eventType = 1; + optional string eventType = 1 [(gogoproto.customname) = "EventType", (gogoproto.nullable) = false]; // The version of the eventType. Enables the interpretation of data by eventual consumers, // requires the consumer to be knowledgeable about the producer. - optional string eventTypeVersion = 2; + optional string eventTypeVersion = 2 [(gogoproto.customname) = "EventTypeVersion", (gogoproto.nullable) = false]; // The version of the CloudEvents specification which the event uses. // Enables the interpretation of the context. - optional string cloudEventsVersion = 3; + optional string cloudEventsVersion = 3 [(gogoproto.customname) = "CloudEventsVersion", (gogoproto.nullable) = false]; // This describes the event producer. - optional URI source = 4; + optional URI source = 4 [(gogoproto.customname) = "Source"]; // ID of the event. The semantics are explicitly undefined to ease the implementation of producers. // Enables deduplication. Must be unique within scope of producer. - optional string eventID = 5; + optional string eventID = 5 [(gogoproto.customname) = "EventID", (gogoproto.nullable) = false]; - optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime eventTime = 6; + optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime eventTime = 6 [(gogoproto.customname) = "EventTime", (gogoproto.nullable) = false]; // A link to the schema that the data attribute adheres to. // Must adhere to the format specified in RFC 3986. - optional URI schemaURL = 7; + optional URI schemaURL = 7 [(gogoproto.customname) = "SchemaURL"]; // Content type of the data attribute value. Enables the data attribute to carry any type of content, // whereby format and encoding might differ from that of the chosen event format. // For example, the data attribute may carry an XML or JSON payload and the consumer is informed // by this attribute being set to "application/xml" or "application/json" respectively. - optional string contentType = 8; + optional string contentType = 8 [(gogoproto.customname) = "ContentType", (gogoproto.nullable) = false]; // This is for additional metadata and does not have a mandated structure. // Enables a place for custom fields a producer or middleware might want to include and provides a place // to test metadata before adding them to the CloudEvents specification. - map extensions = 9; + map extensions = 9 [(gogoproto.customname) = "Extensions", (gogoproto.nullable) = false]; } // Dispatch protocol contains configuration necessary to dispatch an event to sensor over different communication protocols message EventProtocol { - optional string type = 1; + optional string type = 1 [(gogoproto.casttype) = "EventProtocolType", (gogoproto.customname) = "Type", (gogoproto.nullable) = false]; - optional Http http = 2; + optional Http http = 2 [(gogoproto.customname) = "Http", (gogoproto.nullable) = false]; - optional Nats nats = 3; + optional Nats nats = 3 [(gogoproto.customname) = "Nats", (gogoproto.nullable) = false]; } // Http contains the information required to setup a http server and listen to incoming events message Http { // Port on which server will run - optional string port = 1; + optional string port = 1 [(gogoproto.customname) = "Port", (gogoproto.nullable) = false]; } // Nats contains the information required to connect to nats server and get subscriptions message Nats { // URL is nats server/service URL - optional string url = 1; + optional string url = 1 [(gogoproto.customname) = "URL", (gogoproto.nullable) = false]; // Subscribe starting with most recently published value. Refer https://github.com/nats-io/go-nats-streaming - optional bool startWithLastReceived = 2; + optional bool startWithLastReceived = 2 [(gogoproto.customname) = "StartWithLastReceived", (gogoproto.nullable) = false]; // Receive all stored values in order. - optional bool deliverAllAvailable = 3; + optional bool deliverAllAvailable = 3 [(gogoproto.customname) = "DeliverAllAvailable", (gogoproto.nullable) = false]; // Receive messages starting at a specific sequence number - optional string startAtSequence = 4; + optional string startAtSequence = 4 [(gogoproto.customname) = "StartAtSequence", (gogoproto.nullable) = false]; // Subscribe starting at a specific time - optional string startAtTime = 5; + optional string startAtTime = 5 [(gogoproto.customname) = "StartAtTime", (gogoproto.nullable) = false]; // Subscribe starting a specific amount of time in the past (e.g. 30 seconds ago) - optional string startAtTimeDelta = 6; + optional string startAtTimeDelta = 6 [(gogoproto.customname) = "StartAtTimeDelta", (gogoproto.nullable) = false]; // Durable subscriptions allow clients to assign a durable name to a subscription when it is created - optional bool durable = 7; + optional bool durable = 7 [(gogoproto.customname) = "Durable", (gogoproto.nullable) = false]; // The NATS Streaming cluster ID - optional string clusterId = 8; + optional string clusterId = 8 [(gogoproto.customname) = "ClusterId", (gogoproto.nullable) = false]; // The NATS Streaming cluster ID - optional string clientId = 9; + optional string clientId = 9 [(gogoproto.customname) = "ClientId", (gogoproto.nullable) = false]; // Type of the connection. either standard or streaming - optional string type = 10; + optional string type = 10 [(gogoproto.casttype) = "NatsType", (gogoproto.customname) = "Type", (gogoproto.nullable) = false]; } // S3Artifact contains information about an artifact in S3 message S3Artifact { - optional string endpoint = 1; + optional string endpoint = 1 [(gogoproto.customname) = "Endpoint", (gogoproto.nullable) = false]; - optional S3Bucket bucket = 2; + optional S3Bucket bucket = 2 [(gogoproto.customname) = "Bucket"]; - optional string region = 3; + optional string region = 3 [(gogoproto.customname) = "Region", (gogoproto.nullable) = false]; - optional bool insecure = 4; + optional bool insecure = 4 [(gogoproto.customname) = "Insecure", (gogoproto.nullable) = false]; - optional k8s.io.api.core.v1.SecretKeySelector accessKey = 5; + optional k8s.io.api.core.v1.SecretKeySelector accessKey = 5 [(gogoproto.customname) = "AccessKey"]; - optional k8s.io.api.core.v1.SecretKeySelector secretKey = 6; + optional k8s.io.api.core.v1.SecretKeySelector secretKey = 6 [(gogoproto.customname) = "SecretKey"]; - optional string event = 7; + optional string event = 7 [(gogoproto.casttype) = "github.com/minio/minio-go.NotificationEventType", (gogoproto.customname) = "Event", (gogoproto.nullable) = false]; - optional S3Filter filter = 8; + optional S3Filter filter = 8 [(gogoproto.customname) = "Filter"]; } // S3Bucket contains information to describe an S3 Bucket message S3Bucket { - optional string key = 1; + optional string key = 1 [(gogoproto.customname) = "Key", (gogoproto.nullable) = false]; - optional string name = 2; + optional string name = 2 [(gogoproto.customname) = "Name", (gogoproto.nullable) = false]; } // S3Filter represents filters to apply to bucket nofifications for specifying constraints on objects message S3Filter { - optional string prefix = 1; + optional string prefix = 1 [(gogoproto.customname) = "Prefix", (gogoproto.nullable) = false]; - optional string suffix = 2; + optional string suffix = 2 [(gogoproto.customname) = "Suffix", (gogoproto.nullable) = false]; } // ServiceTemplateSpec is the template spec contains metadata and service spec. @@ -162,30 +172,30 @@ message ServiceTemplateSpec { // Standard object's metadata. // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata // +optional - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1 [(gogoproto.customname) = "ObjectMeta", (gogoproto.nullable) = false]; // Specification of the desired behavior of the pod. // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status // +optional - optional k8s.io.api.core.v1.ServiceSpec spec = 2; + optional k8s.io.api.core.v1.ServiceSpec spec = 2 [(gogoproto.customname) = "Spec", (gogoproto.nullable) = false]; } // URI is a Uniform Resource Identifier based on RFC 3986 message URI { - optional string scheme = 1; + optional string scheme = 1 [(gogoproto.customname) = "Scheme", (gogoproto.nullable) = false]; - optional string user = 2; + optional string user = 2 [(gogoproto.customname) = "User", (gogoproto.nullable) = false]; - optional string password = 3; + optional string password = 3 [(gogoproto.customname) = "Password", (gogoproto.nullable) = false]; - optional string host = 4; + optional string host = 4 [(gogoproto.customname) = "Host", (gogoproto.nullable) = false]; - optional int32 port = 5; + optional int32 port = 5 [(gogoproto.customname) = "Port", (gogoproto.nullable) = false]; - optional string path = 6; + optional string path = 6 [(gogoproto.customname) = "Path", (gogoproto.nullable) = false]; - optional string query = 7; + optional string query = 7 [(gogoproto.customname) = "Query", (gogoproto.nullable) = false]; - optional string fragment = 8; + optional string fragment = 8 [(gogoproto.customname) = "Fragment", (gogoproto.nullable) = false]; } diff --git a/pkg/apis/gateway/v1alpha1/generated.pb.go b/pkg/apis/gateway/v1alpha1/generated.pb.go deleted file mode 100644 index 8de37056e0..0000000000 --- a/pkg/apis/gateway/v1alpha1/generated.pb.go +++ /dev/null @@ -1,2645 +0,0 @@ -/* -Copyright 2018 BlackRock, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1/generated.proto - -package v1alpha1 - -import ( - "fmt" - - "github.com/argoproj/argo-events/pkg/apis/common" - - "io" - - "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - v11 "k8s.io/api/core/v1" - - "math" - "reflect" - "strings" -) - -// 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 *Gateway) Reset() { *m = Gateway{} } -func (*Gateway) ProtoMessage() {} -func (*Gateway) Descriptor() ([]byte, []int) { - return fileDescriptor_ba11c13056ce1980, []int{0} -} -func (m *Gateway) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Gateway) 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 (m *Gateway) XXX_Merge(src proto.Message) { - xxx_messageInfo_Gateway.Merge(m, src) -} -func (m *Gateway) XXX_Size() int { - return m.Size() -} -func (m *Gateway) XXX_DiscardUnknown() { - xxx_messageInfo_Gateway.DiscardUnknown(m) -} - -var xxx_messageInfo_Gateway proto.InternalMessageInfo - -func (m *GatewayList) Reset() { *m = GatewayList{} } -func (*GatewayList) ProtoMessage() {} -func (*GatewayList) Descriptor() ([]byte, []int) { - return fileDescriptor_ba11c13056ce1980, []int{1} -} -func (m *GatewayList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GatewayList) 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 (m *GatewayList) XXX_Merge(src proto.Message) { - xxx_messageInfo_GatewayList.Merge(m, src) -} -func (m *GatewayList) XXX_Size() int { - return m.Size() -} -func (m *GatewayList) XXX_DiscardUnknown() { - xxx_messageInfo_GatewayList.DiscardUnknown(m) -} - -var xxx_messageInfo_GatewayList proto.InternalMessageInfo - -func (m *GatewayNotificationWatcher) Reset() { *m = GatewayNotificationWatcher{} } -func (*GatewayNotificationWatcher) ProtoMessage() {} -func (*GatewayNotificationWatcher) Descriptor() ([]byte, []int) { - return fileDescriptor_ba11c13056ce1980, []int{2} -} -func (m *GatewayNotificationWatcher) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GatewayNotificationWatcher) 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 (m *GatewayNotificationWatcher) XXX_Merge(src proto.Message) { - xxx_messageInfo_GatewayNotificationWatcher.Merge(m, src) -} -func (m *GatewayNotificationWatcher) XXX_Size() int { - return m.Size() -} -func (m *GatewayNotificationWatcher) XXX_DiscardUnknown() { - xxx_messageInfo_GatewayNotificationWatcher.DiscardUnknown(m) -} - -var xxx_messageInfo_GatewayNotificationWatcher proto.InternalMessageInfo - -func (m *GatewaySpec) Reset() { *m = GatewaySpec{} } -func (*GatewaySpec) ProtoMessage() {} -func (*GatewaySpec) Descriptor() ([]byte, []int) { - return fileDescriptor_ba11c13056ce1980, []int{3} -} -func (m *GatewaySpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GatewaySpec) 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 (m *GatewaySpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_GatewaySpec.Merge(m, src) -} -func (m *GatewaySpec) XXX_Size() int { - return m.Size() -} -func (m *GatewaySpec) XXX_DiscardUnknown() { - xxx_messageInfo_GatewaySpec.DiscardUnknown(m) -} - -var xxx_messageInfo_GatewaySpec proto.InternalMessageInfo - -func (m *GatewayStatus) Reset() { *m = GatewayStatus{} } -func (*GatewayStatus) ProtoMessage() {} -func (*GatewayStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_ba11c13056ce1980, []int{4} -} -func (m *GatewayStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GatewayStatus) 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 (m *GatewayStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_GatewayStatus.Merge(m, src) -} -func (m *GatewayStatus) XXX_Size() int { - return m.Size() -} -func (m *GatewayStatus) XXX_DiscardUnknown() { - xxx_messageInfo_GatewayStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_GatewayStatus proto.InternalMessageInfo - -func (m *NodeStatus) Reset() { *m = NodeStatus{} } -func (*NodeStatus) ProtoMessage() {} -func (*NodeStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_ba11c13056ce1980, []int{5} -} -func (m *NodeStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeStatus) 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 (m *NodeStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeStatus.Merge(m, src) -} -func (m *NodeStatus) XXX_Size() int { - return m.Size() -} -func (m *NodeStatus) XXX_DiscardUnknown() { - xxx_messageInfo_NodeStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeStatus proto.InternalMessageInfo - -func (m *NotificationWatchers) Reset() { *m = NotificationWatchers{} } -func (*NotificationWatchers) ProtoMessage() {} -func (*NotificationWatchers) Descriptor() ([]byte, []int) { - return fileDescriptor_ba11c13056ce1980, []int{6} -} -func (m *NotificationWatchers) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NotificationWatchers) 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 (m *NotificationWatchers) XXX_Merge(src proto.Message) { - xxx_messageInfo_NotificationWatchers.Merge(m, src) -} -func (m *NotificationWatchers) XXX_Size() int { - return m.Size() -} -func (m *NotificationWatchers) XXX_DiscardUnknown() { - xxx_messageInfo_NotificationWatchers.DiscardUnknown(m) -} - -var xxx_messageInfo_NotificationWatchers proto.InternalMessageInfo - -func (m *SensorNotificationWatcher) Reset() { *m = SensorNotificationWatcher{} } -func (*SensorNotificationWatcher) ProtoMessage() {} -func (*SensorNotificationWatcher) Descriptor() ([]byte, []int) { - return fileDescriptor_ba11c13056ce1980, []int{7} -} -func (m *SensorNotificationWatcher) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SensorNotificationWatcher) 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 (m *SensorNotificationWatcher) XXX_Merge(src proto.Message) { - xxx_messageInfo_SensorNotificationWatcher.Merge(m, src) -} -func (m *SensorNotificationWatcher) XXX_Size() int { - return m.Size() -} -func (m *SensorNotificationWatcher) XXX_DiscardUnknown() { - xxx_messageInfo_SensorNotificationWatcher.DiscardUnknown(m) -} - -var xxx_messageInfo_SensorNotificationWatcher proto.InternalMessageInfo - -func init() { - proto.RegisterType((*Gateway)(nil), "github.com.argoproj.argo_events.pkg.apis.gateway.v1alpha1.Gateway") - proto.RegisterType((*GatewayList)(nil), "github.com.argoproj.argo_events.pkg.apis.gateway.v1alpha1.GatewayList") - proto.RegisterType((*GatewayNotificationWatcher)(nil), "github.com.argoproj.argo_events.pkg.apis.gateway.v1alpha1.GatewayNotificationWatcher") - proto.RegisterType((*GatewaySpec)(nil), "github.com.argoproj.argo_events.pkg.apis.gateway.v1alpha1.GatewaySpec") - proto.RegisterType((*GatewayStatus)(nil), "github.com.argoproj.argo_events.pkg.apis.gateway.v1alpha1.GatewayStatus") - proto.RegisterMapType((map[string]NodeStatus)(nil), "github.com.argoproj.argo_events.pkg.apis.gateway.v1alpha1.GatewayStatus.NodesEntry") - proto.RegisterType((*NodeStatus)(nil), "github.com.argoproj.argo_events.pkg.apis.gateway.v1alpha1.NodeStatus") - proto.RegisterType((*NotificationWatchers)(nil), "github.com.argoproj.argo_events.pkg.apis.gateway.v1alpha1.NotificationWatchers") - proto.RegisterType((*SensorNotificationWatcher)(nil), "github.com.argoproj.argo_events.pkg.apis.gateway.v1alpha1.SensorNotificationWatcher") -} - -func init() { - proto.RegisterFile("github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1/generated.proto", fileDescriptor_ba11c13056ce1980) -} - -var fileDescriptor_ba11c13056ce1980 = []byte{ - // 1072 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xcf, 0xda, 0x71, 0x6c, 0x8f, 0x1b, 0x68, 0x87, 0x22, 0x2d, 0x3e, 0x38, 0x95, 0xb9, 0x14, - 0x44, 0x77, 0x9b, 0xf2, 0x47, 0x01, 0x04, 0x08, 0x93, 0x40, 0x23, 0x91, 0x34, 0x1a, 0xa7, 0x20, - 0x51, 0x24, 0x3a, 0xd9, 0x9d, 0xac, 0xa7, 0xf6, 0xee, 0x8c, 0x76, 0xc6, 0x0e, 0x3e, 0x15, 0x89, - 0x03, 0x37, 0xc4, 0x17, 0xe0, 0xc8, 0x37, 0x41, 0x22, 0xc7, 0x1e, 0x38, 0xf4, 0x14, 0x11, 0xf3, - 0x2d, 0x38, 0xa1, 0x99, 0x9d, 0xfd, 0xe3, 0xc6, 0x56, 0xdc, 0xba, 0xb7, 0x9d, 0x37, 0xbf, 0xf7, - 0x7b, 0xef, 0xfd, 0xde, 0xdb, 0xb7, 0x0b, 0x76, 0x03, 0x2a, 0x7b, 0xc3, 0x23, 0xc7, 0x63, 0xa1, - 0x8b, 0xe3, 0x80, 0xf1, 0x98, 0x3d, 0xd2, 0x0f, 0xb7, 0xc8, 0x88, 0x44, 0x52, 0xb8, 0xbc, 0x1f, - 0xb8, 0x98, 0x53, 0xe1, 0x06, 0x58, 0x92, 0x13, 0x3c, 0x76, 0x47, 0x9b, 0x78, 0xc0, 0x7b, 0x78, - 0xd3, 0x0d, 0x48, 0x44, 0x62, 0x2c, 0x89, 0xef, 0xf0, 0x98, 0x49, 0x06, 0x3f, 0xcc, 0xa9, 0x9c, - 0x94, 0x4a, 0x3f, 0xfc, 0x90, 0x50, 0x39, 0xbc, 0x1f, 0x38, 0x8a, 0xca, 0x31, 0x54, 0x4e, 0x4a, - 0xd5, 0xfc, 0x6c, 0xe1, 0x2c, 0x3c, 0x16, 0x86, 0x2c, 0x7a, 0x36, 0x76, 0xf3, 0xee, 0xc2, 0x04, - 0x82, 0x44, 0x82, 0xc5, 0x73, 0xab, 0x68, 0xde, 0x2a, 0x30, 0x05, 0x2c, 0x60, 0xae, 0x36, 0x1f, - 0x0d, 0x8f, 0xf5, 0x49, 0x1f, 0xf4, 0x93, 0x81, 0xb7, 0xfb, 0x5b, 0xc2, 0xa1, 0x4c, 0x71, 0xbb, - 0x1e, 0x8b, 0x89, 0x3b, 0xba, 0x48, 0xf9, 0x5e, 0x8e, 0x09, 0xb1, 0xd7, 0xa3, 0x11, 0x89, 0xc7, - 0x79, 0x42, 0x21, 0x91, 0x78, 0x96, 0x97, 0x3b, 0xcf, 0x2b, 0x1e, 0x46, 0x92, 0x86, 0xe4, 0x82, - 0xc3, 0x07, 0x97, 0x39, 0x08, 0xaf, 0x47, 0x42, 0x7c, 0xc1, 0xef, 0xdd, 0x79, 0x7e, 0x43, 0x49, - 0x07, 0x2e, 0x8d, 0xa4, 0x90, 0xf1, 0xb3, 0x4e, 0xed, 0xbf, 0x4a, 0xa0, 0xfa, 0x55, 0xd2, 0x46, - 0xf8, 0x10, 0xd4, 0x54, 0x11, 0x3e, 0x96, 0xd8, 0xb6, 0x6e, 0x58, 0x37, 0x1b, 0x77, 0x6e, 0x3b, - 0x09, 0xa7, 0x53, 0xe4, 0xcc, 0xfb, 0xaf, 0xd0, 0xce, 0x68, 0xd3, 0xb9, 0x77, 0xf4, 0x88, 0x78, - 0x72, 0x8f, 0x48, 0xdc, 0x81, 0xa7, 0x67, 0x1b, 0x2b, 0x93, 0xb3, 0x0d, 0x90, 0xdb, 0x50, 0xc6, - 0x0a, 0x39, 0x58, 0x13, 0x12, 0xcb, 0xa1, 0xb0, 0x4b, 0x9a, 0xff, 0xae, 0xf3, 0xc2, 0xb3, 0xe6, - 0x98, 0xac, 0xbb, 0x9a, 0xaf, 0xf3, 0x8a, 0x89, 0xbb, 0x96, 0x9c, 0x91, 0x89, 0x03, 0x7b, 0x60, - 0x55, 0x70, 0xe2, 0xd9, 0x65, 0x1d, 0xef, 0xcb, 0x97, 0x10, 0x8f, 0x13, 0xaf, 0x73, 0xc5, 0x44, - 0x5b, 0x55, 0x27, 0xa4, 0x23, 0xb4, 0xff, 0xb6, 0x40, 0xc3, 0x60, 0xbe, 0xa6, 0x42, 0xc2, 0xef, - 0x2f, 0xa8, 0xe9, 0x2c, 0xa6, 0xa6, 0xf2, 0xd6, 0x5a, 0x5e, 0x35, 0x51, 0x6a, 0xa9, 0xa5, 0xa0, - 0x64, 0x00, 0x2a, 0x54, 0x92, 0x50, 0x09, 0x59, 0xbe, 0xd9, 0xb8, 0xd3, 0x59, 0xbe, 0xb0, 0xce, - 0xba, 0x09, 0x57, 0xd9, 0x55, 0xc4, 0x28, 0xe1, 0x6f, 0xff, 0x6a, 0x81, 0xa6, 0x41, 0xec, 0x33, - 0x49, 0x8f, 0xa9, 0x87, 0x25, 0x65, 0xd1, 0xb7, 0x58, 0x7a, 0x3d, 0x12, 0xc3, 0x1b, 0x60, 0x35, - 0xc2, 0x21, 0xd1, 0x15, 0xd6, 0x73, 0x5d, 0xf6, 0x71, 0x48, 0x90, 0xbe, 0x51, 0x08, 0xce, 0x62, - 0xa9, 0x3b, 0x5e, 0x40, 0x1c, 0xb0, 0x58, 0x22, 0x7d, 0x03, 0xdf, 0x01, 0x35, 0x12, 0xf9, 0x9c, - 0xd1, 0x48, 0xea, 0x3e, 0xd5, 0xf3, 0xca, 0x77, 0x8c, 0x1d, 0x65, 0x88, 0xf6, 0x2f, 0x95, 0x4c, - 0x67, 0xa5, 0x3e, 0xdc, 0x03, 0x35, 0x49, 0x42, 0x3e, 0xc0, 0x92, 0x18, 0x9d, 0xdf, 0x2c, 0xe8, - 0xec, 0xa8, 0x97, 0x59, 0xa9, 0x7a, 0xc0, 0xfc, 0x43, 0x03, 0x4b, 0x5a, 0xa8, 0xe8, 0x53, 0x0b, - 0xca, 0x28, 0xa0, 0x0b, 0xea, 0x1e, 0x8b, 0x8e, 0x69, 0x10, 0x62, 0x6e, 0x72, 0xbe, 0x66, 0xb2, - 0xa9, 0x7f, 0xa1, 0x2f, 0xf6, 0x30, 0x47, 0x39, 0x46, 0xd5, 0x27, 0xc7, 0x9c, 0x98, 0xcc, 0xb3, - 0xfa, 0x0e, 0xc7, 0x9c, 0x20, 0x7d, 0x03, 0xb7, 0xc0, 0x15, 0xdd, 0x84, 0x6f, 0x48, 0x2c, 0x28, - 0x8b, 0xec, 0x55, 0x8d, 0xbc, 0x6e, 0x90, 0x57, 0x76, 0x0a, 0x77, 0x68, 0x0a, 0x09, 0xfb, 0xa0, - 0x2a, 0x48, 0x3c, 0xa2, 0x1e, 0xb1, 0x2b, 0xba, 0xb4, 0xed, 0xc5, 0xfb, 0x9c, 0x6c, 0x58, 0xa7, - 0x9b, 0xf8, 0x4f, 0xd5, 0xde, 0x98, 0x9c, 0x6d, 0x54, 0xcd, 0x05, 0x4a, 0x23, 0xc0, 0x31, 0xa8, - 0x9d, 0x24, 0x5d, 0x15, 0xf6, 0x9a, 0x8e, 0x76, 0x6f, 0x89, 0xa9, 0x9a, 0x31, 0x2c, 0x22, 0x11, - 0x3d, 0x3d, 0xa1, 0x2c, 0x1c, 0xfc, 0x18, 0xac, 0xf3, 0x98, 0x79, 0x44, 0x08, 0x16, 0xab, 0xc1, - 0xb0, 0xab, 0x5a, 0xa2, 0xd7, 0x8d, 0x44, 0xeb, 0x07, 0xc5, 0x4b, 0x34, 0x8d, 0x85, 0x27, 0x60, - 0x5d, 0x67, 0x73, 0xa0, 0x16, 0x9a, 0xc7, 0x06, 0x76, 0x4d, 0x27, 0xff, 0xe9, 0x73, 0x4b, 0xb5, - 0x53, 0x64, 0xe9, 0x5c, 0x53, 0x81, 0xa7, 0x4c, 0x68, 0x3a, 0x4e, 0xfb, 0xcf, 0x32, 0x58, 0x9f, - 0xda, 0x42, 0xf0, 0x36, 0xa8, 0xf0, 0x1e, 0x16, 0xe9, 0xeb, 0xd0, 0x4c, 0xdf, 0xa8, 0x03, 0x65, - 0xfc, 0xef, 0x6c, 0xa3, 0xbe, 0xcf, 0x7c, 0xa2, 0x0f, 0x28, 0x01, 0xc2, 0x07, 0xa0, 0x2e, 0x24, - 0x8e, 0x25, 0xf1, 0x3f, 0x97, 0x66, 0x29, 0xbe, 0xbd, 0xd8, 0x9a, 0x38, 0xa4, 0x21, 0xc9, 0x47, - 0xb3, 0x9b, 0x92, 0xa0, 0x9c, 0x0f, 0xbe, 0x05, 0xaa, 0x21, 0x11, 0x02, 0x07, 0xc4, 0xcc, 0xdc, - 0xab, 0x06, 0x5e, 0xdd, 0x4b, 0xcc, 0x28, 0xbd, 0x87, 0x3f, 0x82, 0x4a, 0xc4, 0x7c, 0x22, 0xec, - 0x8a, 0xde, 0x27, 0xdd, 0x97, 0xb5, 0x98, 0x1d, 0x55, 0xb1, 0xd8, 0x89, 0x64, 0x5c, 0x58, 0x30, - 0xda, 0x86, 0x92, 0x80, 0xcd, 0xc7, 0x00, 0xe4, 0x18, 0x78, 0x15, 0x94, 0xfb, 0x64, 0x9c, 0xe8, - 0x87, 0xd4, 0x23, 0x7c, 0x00, 0x2a, 0x23, 0x3c, 0x18, 0x12, 0xa3, 0xce, 0xce, 0x52, 0x33, 0xe9, - 0x13, 0xf3, 0x7d, 0x48, 0x38, 0x3f, 0x2a, 0x6d, 0x59, 0xed, 0x3f, 0xca, 0x49, 0x06, 0xa6, 0x87, - 0x4d, 0x50, 0xa2, 0xbe, 0x69, 0x20, 0x30, 0x19, 0x97, 0x76, 0xb7, 0x51, 0x89, 0xfa, 0xd9, 0xb6, - 0x2b, 0xcf, 0xdd, 0x76, 0xef, 0x83, 0x86, 0x4f, 0x05, 0x1f, 0xe0, 0xb1, 0x32, 0xea, 0xb7, 0xb6, - 0xde, 0x79, 0xcd, 0x00, 0x1b, 0xdb, 0xf9, 0x15, 0x2a, 0xe2, 0xf2, 0xc1, 0x59, 0x5b, 0x74, 0x70, - 0x1e, 0x16, 0x07, 0xa7, 0xaa, 0xa5, 0x71, 0x17, 0x1b, 0x9c, 0x3d, 0xea, 0xc5, 0xec, 0xf9, 0xa6, - 0xa7, 0x76, 0xc9, 0xf4, 0x78, 0x00, 0x0c, 0xb9, 0x8f, 0x25, 0x51, 0xb4, 0x76, 0xfd, 0xc5, 0xb2, - 0xc9, 0x7e, 0x1d, 0xee, 0x67, 0x54, 0xa8, 0x40, 0xdb, 0xfe, 0xbd, 0x04, 0xae, 0xcf, 0xda, 0x2a, - 0xf0, 0x67, 0x0b, 0xd4, 0x4c, 0xaf, 0x85, 0x6d, 0xe9, 0xf9, 0xbd, 0xbf, 0xfc, 0xfc, 0xce, 0x08, - 0x95, 0x7f, 0x97, 0x0c, 0x46, 0xa0, 0x2c, 0x30, 0x7c, 0xac, 0x76, 0xb5, 0xfa, 0x27, 0x4d, 0xbf, - 0xc9, 0x87, 0x4b, 0xe4, 0xd0, 0xd5, 0x4c, 0xb3, 0x52, 0xc8, 0x9a, 0x90, 0x40, 0x04, 0x4a, 0xa3, - 0xb6, 0x3f, 0x01, 0x6f, 0xcc, 0x75, 0xbb, 0xfc, 0x3b, 0xdd, 0x71, 0x4e, 0xcf, 0x5b, 0x2b, 0x4f, - 0xce, 0x5b, 0x2b, 0x4f, 0xcf, 0x5b, 0x2b, 0x3f, 0x4d, 0x5a, 0xd6, 0xe9, 0xa4, 0x65, 0x3d, 0x99, - 0xb4, 0xac, 0xa7, 0x93, 0x96, 0xf5, 0xcf, 0xa4, 0x65, 0xfd, 0xf6, 0x6f, 0x6b, 0xe5, 0xbb, 0x5a, - 0x9a, 0xe2, 0xff, 0x01, 0x00, 0x00, 0xff, 0xff, 0x40, 0xaf, 0x33, 0x4e, 0x72, 0x0c, 0x00, 0x00, -} - -func (m *Gateway) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Gateway) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n1, err := m.ObjectMeta.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size())) - n2, err := m.Status.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - dAtA[i] = 0x1a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size())) - n3, err := m.Spec.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - return i, nil -} - -func (m *GatewayList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GatewayList) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) - n4, err := m.ListMeta.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - if len(m.Items) > 0 { - for _, msg := range m.Items { - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *GatewayNotificationWatcher) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GatewayNotificationWatcher) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Port))) - i += copy(dAtA[i:], m.Port) - dAtA[i] = 0x1a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Endpoint))) - i += copy(dAtA[i:], m.Endpoint) - return i, nil -} - -func (m *GatewaySpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GatewaySpec) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Template != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size())) - n5, err := m.Template.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ConfigMap))) - i += copy(dAtA[i:], m.ConfigMap) - dAtA[i] = 0x1a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i += copy(dAtA[i:], m.Type) - dAtA[i] = 0x22 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.EventVersion))) - i += copy(dAtA[i:], m.EventVersion) - if m.Service != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Service.Size())) - n6, err := m.Service.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - } - if m.Watchers != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Watchers.Size())) - n7, err := m.Watchers.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n7 - } - dAtA[i] = 0x3a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ProcessorPort))) - i += copy(dAtA[i:], m.ProcessorPort) - if m.EventProtocol != nil { - dAtA[i] = 0x42 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.EventProtocol.Size())) - n8, err := m.EventProtocol.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n8 - } - return i, nil -} - -func (m *GatewayStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GatewayStatus) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Phase))) - i += copy(dAtA[i:], m.Phase) - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.StartedAt.Size())) - n9, err := m.StartedAt.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n9 - dAtA[i] = 0x22 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) - i += copy(dAtA[i:], m.Message) - if len(m.Nodes) > 0 { - keysForNodes := make([]string, 0, len(m.Nodes)) - for k := range m.Nodes { - keysForNodes = append(keysForNodes, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForNodes) - for _, k := range keysForNodes { - dAtA[i] = 0x2a - i++ - v := m.Nodes[string(k)] - msgSize := 0 - if (&v) != nil { - msgSize = (&v).Size() - msgSize += 1 + sovGenerated(uint64(msgSize)) - } - mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize - i = encodeVarintGenerated(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64((&v).Size())) - n10, err := (&v).MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n10 - } - } - return i, nil -} - -func (m *NodeStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NodeStatus) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) - dAtA[i] = 0x1a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - dAtA[i] = 0x2a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DisplayName))) - i += copy(dAtA[i:], m.DisplayName) - dAtA[i] = 0x32 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Phase))) - i += copy(dAtA[i:], m.Phase) - dAtA[i] = 0x3a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.StartedAt.Size())) - n11, err := m.StartedAt.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n11 - dAtA[i] = 0x42 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) - i += copy(dAtA[i:], m.Message) - dAtA[i] = 0x4a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.UpdateTime.Size())) - n12, err := m.UpdateTime.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n12 - return i, nil -} - -func (m *NotificationWatchers) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NotificationWatchers) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Gateways) > 0 { - for _, msg := range m.Gateways { - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Sensors) > 0 { - for _, msg := range m.Sensors { - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *SensorNotificationWatcher) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SensorNotificationWatcher) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - return i, nil -} - -func encodeVarintGenerated(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 *Gateway) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *GatewayList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *GatewayNotificationWatcher) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Port) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Endpoint) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *GatewaySpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Template != nil { - l = m.Template.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - l = len(m.ConfigMap) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.EventVersion) - n += 1 + l + sovGenerated(uint64(l)) - if m.Service != nil { - l = m.Service.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Watchers != nil { - l = m.Watchers.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - l = len(m.ProcessorPort) - n += 1 + l + sovGenerated(uint64(l)) - if m.EventProtocol != nil { - l = m.EventProtocol.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *GatewayStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Phase) - n += 1 + l + sovGenerated(uint64(l)) - l = m.StartedAt.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Message) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Nodes) > 0 { - for k, v := range m.Nodes { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } - } - return n -} - -func (m *NodeStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ID) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.DisplayName) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Phase) - n += 1 + l + sovGenerated(uint64(l)) - l = m.StartedAt.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Message) - n += 1 + l + sovGenerated(uint64(l)) - l = m.UpdateTime.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *NotificationWatchers) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Gateways) > 0 { - for _, e := range m.Gateways { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.Sensors) > 0 { - for _, e := range m.Sensors { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *SensorNotificationWatcher) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func sovGenerated(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Gateway) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Gateway{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "GatewayStatus", "GatewayStatus", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "GatewaySpec", "GatewaySpec", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *GatewayList) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&GatewayList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Gateway", "Gateway", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *GatewayNotificationWatcher) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&GatewayNotificationWatcher{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Port:` + fmt.Sprintf("%v", this.Port) + `,`, - `Endpoint:` + fmt.Sprintf("%v", this.Endpoint) + `,`, - `}`, - }, "") - return s -} -func (this *GatewaySpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&GatewaySpec{`, - `Template:` + strings.Replace(fmt.Sprintf("%v", this.Template), "PodTemplateSpec", "v11.PodTemplateSpec", 1) + `,`, - `ConfigMap:` + fmt.Sprintf("%v", this.ConfigMap) + `,`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `EventVersion:` + fmt.Sprintf("%v", this.EventVersion) + `,`, - `Service:` + strings.Replace(fmt.Sprintf("%v", this.Service), "ServiceTemplateSpec", "common.ServiceTemplateSpec", 1) + `,`, - `Watchers:` + strings.Replace(fmt.Sprintf("%v", this.Watchers), "NotificationWatchers", "NotificationWatchers", 1) + `,`, - `ProcessorPort:` + fmt.Sprintf("%v", this.ProcessorPort) + `,`, - `EventProtocol:` + strings.Replace(fmt.Sprintf("%v", this.EventProtocol), "EventProtocol", "common.EventProtocol", 1) + `,`, - `}`, - }, "") - return s -} -func (this *GatewayStatus) String() string { - if this == nil { - return "nil" - } - keysForNodes := make([]string, 0, len(this.Nodes)) - for k := range this.Nodes { - keysForNodes = append(keysForNodes, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForNodes) - mapStringForNodes := "map[string]NodeStatus{" - for _, k := range keysForNodes { - mapStringForNodes += fmt.Sprintf("%v: %v,", k, this.Nodes[k]) - } - mapStringForNodes += "}" - s := strings.Join([]string{`&GatewayStatus{`, - `Phase:` + fmt.Sprintf("%v", this.Phase) + `,`, - `StartedAt:` + strings.Replace(strings.Replace(this.StartedAt.String(), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `Nodes:` + mapStringForNodes + `,`, - `}`, - }, "") - return s -} -func (this *NodeStatus) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NodeStatus{`, - `ID:` + fmt.Sprintf("%v", this.ID) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `DisplayName:` + fmt.Sprintf("%v", this.DisplayName) + `,`, - `Phase:` + fmt.Sprintf("%v", this.Phase) + `,`, - `StartedAt:` + strings.Replace(strings.Replace(this.StartedAt.String(), "MicroTime", "v1.MicroTime", 1), `&`, ``, 1) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `UpdateTime:` + strings.Replace(strings.Replace(this.UpdateTime.String(), "MicroTime", "v1.MicroTime", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *NotificationWatchers) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NotificationWatchers{`, - `Gateways:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Gateways), "GatewayNotificationWatcher", "GatewayNotificationWatcher", 1), `&`, ``, 1) + `,`, - `Sensors:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Sensors), "SensorNotificationWatcher", "SensorNotificationWatcher", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *SensorNotificationWatcher) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SensorNotificationWatcher{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Gateway) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Gateway: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Gateway: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GatewayList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GatewayList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GatewayList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, Gateway{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GatewayNotificationWatcher) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GatewayNotificationWatcher: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GatewayNotificationWatcher: 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 ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - 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 Port", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Port = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Endpoint", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Endpoint = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GatewaySpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GatewaySpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GatewaySpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Template == nil { - m.Template = &v11.PodTemplateSpec{} - } - if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConfigMap", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConfigMap = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EventVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EventVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Service == nil { - m.Service = &common.ServiceTemplateSpec{} - } - if err := m.Service.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Watchers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Watchers == nil { - m.Watchers = &NotificationWatchers{} - } - if err := m.Watchers.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProcessorPort", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProcessorPort = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EventProtocol", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.EventProtocol == nil { - m.EventProtocol = &common.EventProtocol{} - } - if err := m.EventProtocol.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GatewayStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GatewayStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GatewayStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Phase", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Phase = NodePhase(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.StartedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nodes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Nodes == nil { - m.Nodes = make(map[string]NodeStatus) - } - var mapkey string - mapvalue := &NodeStatus{} - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= 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 ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenerated - } - 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 ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthGenerated - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthGenerated - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &NodeStatus{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Nodes[mapkey] = *mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NodeStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NodeStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NodeStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - 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 ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DisplayName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DisplayName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Phase", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Phase = NodePhase(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.StartedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UpdateTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.UpdateTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NotificationWatchers) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NotificationWatchers: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NotificationWatchers: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Gateways", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Gateways = append(m.Gateways, GatewayNotificationWatcher{}) - if err := m.Gateways[len(m.Gateways)-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 Sensors", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sensors = append(m.Sensors, SensorNotificationWatcher{}) - if err := m.Sensors[len(m.Sensors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SensorNotificationWatcher) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SensorNotificationWatcher: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SensorNotificationWatcher: 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 ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenerated(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, ErrIntOverflowGenerated - } - 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, ErrIntOverflowGenerated - } - 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, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - 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 := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - 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 ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") -) diff --git a/pkg/apis/gateway/v1alpha1/generated.proto b/pkg/apis/gateway/v1alpha1/generated.proto index 5fd594e1eb..2fb2cf22f5 100644 --- a/pkg/apis/gateway/v1alpha1/generated.proto +++ b/pkg/apis/gateway/v1alpha1/generated.proto @@ -21,6 +21,7 @@ package github.com.argoproj.argo_events.pkg.apis.gateway.v1alpha1; import "github.com/argoproj/argo-events/pkg/apis/common/generated.proto"; import "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1/generated.proto"; +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; import "k8s.io/api/core/v1/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; @@ -28,6 +29,15 @@ import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". +option (gogoproto.marshaler_all) = true; +option (gogoproto.stable_marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.stringer_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.goproto_unrecognized_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; option go_package = "v1alpha1"; // Gateway is the definition of a gateway resource @@ -35,80 +45,80 @@ option go_package = "v1alpha1"; // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:openapi-gen=true message Gateway { - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1 [(gogoproto.customname) = "ObjectMeta", (gogoproto.nullable) = false]; - optional GatewayStatus status = 2; + optional GatewayStatus status = 2 [(gogoproto.customname) = "Status", (gogoproto.nullable) = false]; - optional GatewaySpec spec = 3; + optional GatewaySpec spec = 3 [(gogoproto.customname) = "Spec", (gogoproto.nullable) = false]; } // GatewayList is the list of Gateway resources // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object message GatewayList { - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1 [(gogoproto.customname) = "ListMeta", (gogoproto.nullable) = false]; - repeated Gateway items = 2; + repeated Gateway items = 2 [(gogoproto.customname) = "Items", (gogoproto.nullable) = false]; } // GatewayNotificationWatcher is the gateway interested in listening to notifications from this gateway message GatewayNotificationWatcher { // Name is the gateway name - optional string name = 1; + optional string name = 1 [(gogoproto.customname) = "Name", (gogoproto.nullable) = false]; // Port is http server port on which gateway is running - optional string port = 2; + optional string port = 2 [(gogoproto.customname) = "Port", (gogoproto.nullable) = false]; // Endpoint is REST API endpoint to post event to. // Events are sent using HTTP POST method to this endpoint. - optional string endpoint = 3; + optional string endpoint = 3 [(gogoproto.customname) = "Endpoint", (gogoproto.nullable) = false]; } // GatewaySpec represents gateway specifications message GatewaySpec { // Template is the pod specification for the gateway // Refer https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#pod-v1-core - optional k8s.io.api.core.v1.PodTemplateSpec template = 1; + optional k8s.io.api.core.v1.PodTemplateSpec template = 1 [(gogoproto.customname) = "Template"]; // ConfigMap is name of the configmap for gateway. This configmap contains event sources. - optional string configmap = 2; + optional string configmap = 2 [(gogoproto.customname) = "ConfigMap", (gogoproto.nullable) = false]; // Type is the type of gateway. Used as metadata. - optional string type = 3; + optional string type = 3 [(gogoproto.customname) = "Type", (gogoproto.nullable) = false]; // Version is used for marking event version - optional string eventVersion = 4; + optional string eventVersion = 4 [(gogoproto.customname) = "EventVersion", (gogoproto.nullable) = false]; // Service is the specifications of the service to expose the gateway // Refer https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#service-v1-core - optional github.com.argoproj.argo_events.pkg.apis.common.ServiceTemplateSpec service = 5; + optional github.com.argoproj.argo_events.pkg.apis.common.ServiceTemplateSpec service = 5 [(gogoproto.customname) = "Service"]; // Watchers are components which are interested listening to notifications from this gateway // These only need to be specified when gateway dispatch mechanism is through HTTP POST notifications. // In future, support for NATS, KAFKA will be added as a means to dispatch notifications in which case // specifying watchers would be unnecessary. - optional NotificationWatchers watchers = 6; + optional NotificationWatchers watchers = 6 [(gogoproto.customname) = "Watchers"]; // Port on which the gateway event source processor is running on. - optional string processorPort = 7; + optional string processorPort = 7 [(gogoproto.customname) = "ProcessorPort", (gogoproto.nullable) = false]; // EventProtocol is the underlying protocol used to send events from gateway to watchers(components interested in listening to event from this gateway) - optional github.com.argoproj.argo_events.pkg.apis.common.EventProtocol eventProtocol = 8; + optional github.com.argoproj.argo_events.pkg.apis.common.EventProtocol eventProtocol = 8 [(gogoproto.customname) = "EventProtocol"]; } // GatewayStatus contains information about the status of a gateway. message GatewayStatus { // Phase is the high-level summary of the gateway - optional string phase = 1; + optional string phase = 1 [(gogoproto.casttype) = "NodePhase", (gogoproto.customname) = "Phase", (gogoproto.nullable) = false]; // StartedAt is the time at which this gateway was initiated - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startedAt = 2; + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startedAt = 2 [(gogoproto.customname) = "StartedAt", (gogoproto.nullable) = false]; // Message is a human readable string indicating details about a gateway in its phase - optional string message = 4; + optional string message = 4 [(gogoproto.customname) = "Message", (gogoproto.nullable) = false]; // Nodes is a mapping between a node ID and the node's status // it records the states for the configurations of gateway. - map nodes = 5; + map nodes = 5 [(gogoproto.customname) = "Nodes", (gogoproto.nullable) = false]; } // NodeStatus describes the status for an individual node in the gateway configurations. @@ -116,40 +126,40 @@ message GatewayStatus { message NodeStatus { // ID is a unique identifier of a node within a sensor // It is a hash of the node name - optional string id = 1; + optional string id = 1 [(gogoproto.customname) = "ID", (gogoproto.nullable) = false]; // Name is a unique name in the node tree used to generate the node ID - optional string name = 3; + optional string name = 3 [(gogoproto.customname) = "Name", (gogoproto.nullable) = false]; // DisplayName is the human readable representation of the node - optional string displayName = 5; + optional string displayName = 5 [(gogoproto.customname) = "DisplayName", (gogoproto.nullable) = false]; // Phase of the node - optional string phase = 6; + optional string phase = 6 [(gogoproto.casttype) = "NodePhase", (gogoproto.customname) = "Phase", (gogoproto.nullable) = false]; // StartedAt is the time at which this node started // +k8s:openapi-gen=false - optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime startedAt = 7; + optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime startedAt = 7 [(gogoproto.customname) = "StartedAt", (gogoproto.nullable) = false]; // Message store data or something to save for configuration - optional string message = 8; + optional string message = 8 [(gogoproto.customname) = "Message", (gogoproto.nullable) = false]; // UpdateTime is the time when node(gateway configuration) was updated - optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime updateTime = 9; + optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime updateTime = 9 [(gogoproto.customname) = "UpdateTime", (gogoproto.nullable) = false]; } // NotificationWatchers are components which are interested listening to notifications from this gateway message NotificationWatchers { // Gateways is the list of gateways interested in listening to notifications from this gateway - repeated GatewayNotificationWatcher gateways = 1; + repeated GatewayNotificationWatcher gateways = 1 [(gogoproto.customname) = "Gateways", (gogoproto.nullable) = false]; // Sensors is the list of sensors interested in listening to notifications from this gateway - repeated SensorNotificationWatcher sensors = 2; + repeated SensorNotificationWatcher sensors = 2 [(gogoproto.customname) = "Sensors", (gogoproto.nullable) = false]; } // SensorNotificationWatcher is the sensor interested in listening to notifications from this gateway message SensorNotificationWatcher { // Name is name of the sensor - optional string name = 1; + optional string name = 1 [(gogoproto.customname) = "Name", (gogoproto.nullable) = false]; } diff --git a/pkg/apis/sensor/v1alpha1/generated.pb.go b/pkg/apis/sensor/v1alpha1/generated.pb.go deleted file mode 100644 index b8975c00d0..0000000000 --- a/pkg/apis/sensor/v1alpha1/generated.pb.go +++ /dev/null @@ -1,7180 +0,0 @@ -/* -Copyright 2018 BlackRock, Inc. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1/generated.proto - -package v1alpha1 - -import ( - "fmt" - - "github.com/argoproj/argo-events/pkg/apis/common" - - "io" - - "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" - "k8s.io/api/core/v1" - - "math" - "reflect" - "strings" -) - -// 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 *ArtifactLocation) Reset() { *m = ArtifactLocation{} } -func (*ArtifactLocation) ProtoMessage() {} -func (*ArtifactLocation) Descriptor() ([]byte, []int) { - return fileDescriptor_6c4bded897df1f16, []int{0} -} -func (m *ArtifactLocation) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ArtifactLocation) 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 (m *ArtifactLocation) XXX_Merge(src proto.Message) { - xxx_messageInfo_ArtifactLocation.Merge(m, src) -} -func (m *ArtifactLocation) XXX_Size() int { - return m.Size() -} -func (m *ArtifactLocation) XXX_DiscardUnknown() { - xxx_messageInfo_ArtifactLocation.DiscardUnknown(m) -} - -var xxx_messageInfo_ArtifactLocation proto.InternalMessageInfo - -func (m *ConfigmapArtifact) Reset() { *m = ConfigmapArtifact{} } -func (*ConfigmapArtifact) ProtoMessage() {} -func (*ConfigmapArtifact) Descriptor() ([]byte, []int) { - return fileDescriptor_6c4bded897df1f16, []int{1} -} -func (m *ConfigmapArtifact) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ConfigmapArtifact) 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 (m *ConfigmapArtifact) XXX_Merge(src proto.Message) { - xxx_messageInfo_ConfigmapArtifact.Merge(m, src) -} -func (m *ConfigmapArtifact) XXX_Size() int { - return m.Size() -} -func (m *ConfigmapArtifact) XXX_DiscardUnknown() { - xxx_messageInfo_ConfigmapArtifact.DiscardUnknown(m) -} - -var xxx_messageInfo_ConfigmapArtifact proto.InternalMessageInfo - -func (m *DataFilter) Reset() { *m = DataFilter{} } -func (*DataFilter) ProtoMessage() {} -func (*DataFilter) Descriptor() ([]byte, []int) { - return fileDescriptor_6c4bded897df1f16, []int{2} -} -func (m *DataFilter) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DataFilter) 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 (m *DataFilter) XXX_Merge(src proto.Message) { - xxx_messageInfo_DataFilter.Merge(m, src) -} -func (m *DataFilter) XXX_Size() int { - return m.Size() -} -func (m *DataFilter) XXX_DiscardUnknown() { - xxx_messageInfo_DataFilter.DiscardUnknown(m) -} - -var xxx_messageInfo_DataFilter proto.InternalMessageInfo - -func (m *DependencyGroup) Reset() { *m = DependencyGroup{} } -func (*DependencyGroup) ProtoMessage() {} -func (*DependencyGroup) Descriptor() ([]byte, []int) { - return fileDescriptor_6c4bded897df1f16, []int{3} -} -func (m *DependencyGroup) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *DependencyGroup) 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 (m *DependencyGroup) XXX_Merge(src proto.Message) { - xxx_messageInfo_DependencyGroup.Merge(m, src) -} -func (m *DependencyGroup) XXX_Size() int { - return m.Size() -} -func (m *DependencyGroup) XXX_DiscardUnknown() { - xxx_messageInfo_DependencyGroup.DiscardUnknown(m) -} - -var xxx_messageInfo_DependencyGroup proto.InternalMessageInfo - -func (m *EventDependency) Reset() { *m = EventDependency{} } -func (*EventDependency) ProtoMessage() {} -func (*EventDependency) Descriptor() ([]byte, []int) { - return fileDescriptor_6c4bded897df1f16, []int{4} -} -func (m *EventDependency) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventDependency) 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 (m *EventDependency) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventDependency.Merge(m, src) -} -func (m *EventDependency) XXX_Size() int { - return m.Size() -} -func (m *EventDependency) XXX_DiscardUnknown() { - xxx_messageInfo_EventDependency.DiscardUnknown(m) -} - -var xxx_messageInfo_EventDependency proto.InternalMessageInfo - -func (m *EventDependencyFilter) Reset() { *m = EventDependencyFilter{} } -func (*EventDependencyFilter) ProtoMessage() {} -func (*EventDependencyFilter) Descriptor() ([]byte, []int) { - return fileDescriptor_6c4bded897df1f16, []int{5} -} -func (m *EventDependencyFilter) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *EventDependencyFilter) 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 (m *EventDependencyFilter) XXX_Merge(src proto.Message) { - xxx_messageInfo_EventDependencyFilter.Merge(m, src) -} -func (m *EventDependencyFilter) XXX_Size() int { - return m.Size() -} -func (m *EventDependencyFilter) XXX_DiscardUnknown() { - xxx_messageInfo_EventDependencyFilter.DiscardUnknown(m) -} - -var xxx_messageInfo_EventDependencyFilter proto.InternalMessageInfo - -func (m *FileArtifact) Reset() { *m = FileArtifact{} } -func (*FileArtifact) ProtoMessage() {} -func (*FileArtifact) Descriptor() ([]byte, []int) { - return fileDescriptor_6c4bded897df1f16, []int{6} -} -func (m *FileArtifact) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FileArtifact) 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 (m *FileArtifact) XXX_Merge(src proto.Message) { - xxx_messageInfo_FileArtifact.Merge(m, src) -} -func (m *FileArtifact) XXX_Size() int { - return m.Size() -} -func (m *FileArtifact) XXX_DiscardUnknown() { - xxx_messageInfo_FileArtifact.DiscardUnknown(m) -} - -var xxx_messageInfo_FileArtifact proto.InternalMessageInfo - -func (m *GitArtifact) Reset() { *m = GitArtifact{} } -func (*GitArtifact) ProtoMessage() {} -func (*GitArtifact) Descriptor() ([]byte, []int) { - return fileDescriptor_6c4bded897df1f16, []int{7} -} -func (m *GitArtifact) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GitArtifact) 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 (m *GitArtifact) XXX_Merge(src proto.Message) { - xxx_messageInfo_GitArtifact.Merge(m, src) -} -func (m *GitArtifact) XXX_Size() int { - return m.Size() -} -func (m *GitArtifact) XXX_DiscardUnknown() { - xxx_messageInfo_GitArtifact.DiscardUnknown(m) -} - -var xxx_messageInfo_GitArtifact proto.InternalMessageInfo - -func (m *GitCreds) Reset() { *m = GitCreds{} } -func (*GitCreds) ProtoMessage() {} -func (*GitCreds) Descriptor() ([]byte, []int) { - return fileDescriptor_6c4bded897df1f16, []int{8} -} -func (m *GitCreds) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GitCreds) 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 (m *GitCreds) XXX_Merge(src proto.Message) { - xxx_messageInfo_GitCreds.Merge(m, src) -} -func (m *GitCreds) XXX_Size() int { - return m.Size() -} -func (m *GitCreds) XXX_DiscardUnknown() { - xxx_messageInfo_GitCreds.DiscardUnknown(m) -} - -var xxx_messageInfo_GitCreds proto.InternalMessageInfo - -func (m *GitRemoteConfig) Reset() { *m = GitRemoteConfig{} } -func (*GitRemoteConfig) ProtoMessage() {} -func (*GitRemoteConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_6c4bded897df1f16, []int{9} -} -func (m *GitRemoteConfig) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GitRemoteConfig) 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 (m *GitRemoteConfig) XXX_Merge(src proto.Message) { - xxx_messageInfo_GitRemoteConfig.Merge(m, src) -} -func (m *GitRemoteConfig) XXX_Size() int { - return m.Size() -} -func (m *GitRemoteConfig) XXX_DiscardUnknown() { - xxx_messageInfo_GitRemoteConfig.DiscardUnknown(m) -} - -var xxx_messageInfo_GitRemoteConfig proto.InternalMessageInfo - -func (m *GroupVersionKind) Reset() { *m = GroupVersionKind{} } -func (*GroupVersionKind) ProtoMessage() {} -func (*GroupVersionKind) Descriptor() ([]byte, []int) { - return fileDescriptor_6c4bded897df1f16, []int{10} -} -func (m *GroupVersionKind) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GroupVersionKind) 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 (m *GroupVersionKind) XXX_Merge(src proto.Message) { - xxx_messageInfo_GroupVersionKind.Merge(m, src) -} -func (m *GroupVersionKind) XXX_Size() int { - return m.Size() -} -func (m *GroupVersionKind) XXX_DiscardUnknown() { - xxx_messageInfo_GroupVersionKind.DiscardUnknown(m) -} - -var xxx_messageInfo_GroupVersionKind proto.InternalMessageInfo - -func (m *NodeStatus) Reset() { *m = NodeStatus{} } -func (*NodeStatus) ProtoMessage() {} -func (*NodeStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_6c4bded897df1f16, []int{11} -} -func (m *NodeStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *NodeStatus) 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 (m *NodeStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_NodeStatus.Merge(m, src) -} -func (m *NodeStatus) XXX_Size() int { - return m.Size() -} -func (m *NodeStatus) XXX_DiscardUnknown() { - xxx_messageInfo_NodeStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_NodeStatus proto.InternalMessageInfo - -func (m *ResourceObject) Reset() { *m = ResourceObject{} } -func (*ResourceObject) ProtoMessage() {} -func (*ResourceObject) Descriptor() ([]byte, []int) { - return fileDescriptor_6c4bded897df1f16, []int{12} -} -func (m *ResourceObject) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceObject) 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 (m *ResourceObject) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceObject.Merge(m, src) -} -func (m *ResourceObject) XXX_Size() int { - return m.Size() -} -func (m *ResourceObject) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceObject.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceObject proto.InternalMessageInfo - -func (m *ResourceParameter) Reset() { *m = ResourceParameter{} } -func (*ResourceParameter) ProtoMessage() {} -func (*ResourceParameter) Descriptor() ([]byte, []int) { - return fileDescriptor_6c4bded897df1f16, []int{13} -} -func (m *ResourceParameter) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceParameter) 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 (m *ResourceParameter) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceParameter.Merge(m, src) -} -func (m *ResourceParameter) XXX_Size() int { - return m.Size() -} -func (m *ResourceParameter) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceParameter.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceParameter proto.InternalMessageInfo - -func (m *ResourceParameterSource) Reset() { *m = ResourceParameterSource{} } -func (*ResourceParameterSource) ProtoMessage() {} -func (*ResourceParameterSource) Descriptor() ([]byte, []int) { - return fileDescriptor_6c4bded897df1f16, []int{14} -} -func (m *ResourceParameterSource) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ResourceParameterSource) 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 (m *ResourceParameterSource) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResourceParameterSource.Merge(m, src) -} -func (m *ResourceParameterSource) XXX_Size() int { - return m.Size() -} -func (m *ResourceParameterSource) XXX_DiscardUnknown() { - xxx_messageInfo_ResourceParameterSource.DiscardUnknown(m) -} - -var xxx_messageInfo_ResourceParameterSource proto.InternalMessageInfo - -func (m *RetryStrategy) Reset() { *m = RetryStrategy{} } -func (*RetryStrategy) ProtoMessage() {} -func (*RetryStrategy) Descriptor() ([]byte, []int) { - return fileDescriptor_6c4bded897df1f16, []int{15} -} -func (m *RetryStrategy) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *RetryStrategy) 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 (m *RetryStrategy) XXX_Merge(src proto.Message) { - xxx_messageInfo_RetryStrategy.Merge(m, src) -} -func (m *RetryStrategy) XXX_Size() int { - return m.Size() -} -func (m *RetryStrategy) XXX_DiscardUnknown() { - xxx_messageInfo_RetryStrategy.DiscardUnknown(m) -} - -var xxx_messageInfo_RetryStrategy proto.InternalMessageInfo - -func (m *Sensor) Reset() { *m = Sensor{} } -func (*Sensor) ProtoMessage() {} -func (*Sensor) Descriptor() ([]byte, []int) { - return fileDescriptor_6c4bded897df1f16, []int{16} -} -func (m *Sensor) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Sensor) 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 (m *Sensor) XXX_Merge(src proto.Message) { - xxx_messageInfo_Sensor.Merge(m, src) -} -func (m *Sensor) XXX_Size() int { - return m.Size() -} -func (m *Sensor) XXX_DiscardUnknown() { - xxx_messageInfo_Sensor.DiscardUnknown(m) -} - -var xxx_messageInfo_Sensor proto.InternalMessageInfo - -func (m *SensorList) Reset() { *m = SensorList{} } -func (*SensorList) ProtoMessage() {} -func (*SensorList) Descriptor() ([]byte, []int) { - return fileDescriptor_6c4bded897df1f16, []int{17} -} -func (m *SensorList) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SensorList) 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 (m *SensorList) XXX_Merge(src proto.Message) { - xxx_messageInfo_SensorList.Merge(m, src) -} -func (m *SensorList) XXX_Size() int { - return m.Size() -} -func (m *SensorList) XXX_DiscardUnknown() { - xxx_messageInfo_SensorList.DiscardUnknown(m) -} - -var xxx_messageInfo_SensorList proto.InternalMessageInfo - -func (m *SensorSpec) Reset() { *m = SensorSpec{} } -func (*SensorSpec) ProtoMessage() {} -func (*SensorSpec) Descriptor() ([]byte, []int) { - return fileDescriptor_6c4bded897df1f16, []int{18} -} -func (m *SensorSpec) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SensorSpec) 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 (m *SensorSpec) XXX_Merge(src proto.Message) { - xxx_messageInfo_SensorSpec.Merge(m, src) -} -func (m *SensorSpec) XXX_Size() int { - return m.Size() -} -func (m *SensorSpec) XXX_DiscardUnknown() { - xxx_messageInfo_SensorSpec.DiscardUnknown(m) -} - -var xxx_messageInfo_SensorSpec proto.InternalMessageInfo - -func (m *SensorStatus) Reset() { *m = SensorStatus{} } -func (*SensorStatus) ProtoMessage() {} -func (*SensorStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_6c4bded897df1f16, []int{19} -} -func (m *SensorStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SensorStatus) 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 (m *SensorStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_SensorStatus.Merge(m, src) -} -func (m *SensorStatus) XXX_Size() int { - return m.Size() -} -func (m *SensorStatus) XXX_DiscardUnknown() { - xxx_messageInfo_SensorStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_SensorStatus proto.InternalMessageInfo - -func (m *TimeFilter) Reset() { *m = TimeFilter{} } -func (*TimeFilter) ProtoMessage() {} -func (*TimeFilter) Descriptor() ([]byte, []int) { - return fileDescriptor_6c4bded897df1f16, []int{20} -} -func (m *TimeFilter) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TimeFilter) 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 (m *TimeFilter) XXX_Merge(src proto.Message) { - xxx_messageInfo_TimeFilter.Merge(m, src) -} -func (m *TimeFilter) XXX_Size() int { - return m.Size() -} -func (m *TimeFilter) XXX_DiscardUnknown() { - xxx_messageInfo_TimeFilter.DiscardUnknown(m) -} - -var xxx_messageInfo_TimeFilter proto.InternalMessageInfo - -func (m *Trigger) Reset() { *m = Trigger{} } -func (*Trigger) ProtoMessage() {} -func (*Trigger) Descriptor() ([]byte, []int) { - return fileDescriptor_6c4bded897df1f16, []int{21} -} -func (m *Trigger) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Trigger) 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 (m *Trigger) XXX_Merge(src proto.Message) { - xxx_messageInfo_Trigger.Merge(m, src) -} -func (m *Trigger) XXX_Size() int { - return m.Size() -} -func (m *Trigger) XXX_DiscardUnknown() { - xxx_messageInfo_Trigger.DiscardUnknown(m) -} - -var xxx_messageInfo_Trigger proto.InternalMessageInfo - -func (m *TriggerCondition) Reset() { *m = TriggerCondition{} } -func (*TriggerCondition) ProtoMessage() {} -func (*TriggerCondition) Descriptor() ([]byte, []int) { - return fileDescriptor_6c4bded897df1f16, []int{22} -} -func (m *TriggerCondition) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *TriggerCondition) 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 (m *TriggerCondition) XXX_Merge(src proto.Message) { - xxx_messageInfo_TriggerCondition.Merge(m, src) -} -func (m *TriggerCondition) XXX_Size() int { - return m.Size() -} -func (m *TriggerCondition) XXX_DiscardUnknown() { - xxx_messageInfo_TriggerCondition.DiscardUnknown(m) -} - -var xxx_messageInfo_TriggerCondition proto.InternalMessageInfo - -func (m *URLArtifact) Reset() { *m = URLArtifact{} } -func (*URLArtifact) ProtoMessage() {} -func (*URLArtifact) Descriptor() ([]byte, []int) { - return fileDescriptor_6c4bded897df1f16, []int{23} -} -func (m *URLArtifact) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *URLArtifact) 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 (m *URLArtifact) XXX_Merge(src proto.Message) { - xxx_messageInfo_URLArtifact.Merge(m, src) -} -func (m *URLArtifact) XXX_Size() int { - return m.Size() -} -func (m *URLArtifact) XXX_DiscardUnknown() { - xxx_messageInfo_URLArtifact.DiscardUnknown(m) -} - -var xxx_messageInfo_URLArtifact proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ArtifactLocation)(nil), "github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.ArtifactLocation") - proto.RegisterType((*ConfigmapArtifact)(nil), "github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.ConfigmapArtifact") - proto.RegisterType((*DataFilter)(nil), "github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.DataFilter") - proto.RegisterType((*DependencyGroup)(nil), "github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.DependencyGroup") - proto.RegisterType((*EventDependency)(nil), "github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.EventDependency") - proto.RegisterType((*EventDependencyFilter)(nil), "github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.EventDependencyFilter") - proto.RegisterType((*FileArtifact)(nil), "github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.FileArtifact") - proto.RegisterType((*GitArtifact)(nil), "github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.GitArtifact") - proto.RegisterType((*GitCreds)(nil), "github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.GitCreds") - proto.RegisterType((*GitRemoteConfig)(nil), "github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.GitRemoteConfig") - proto.RegisterType((*GroupVersionKind)(nil), "github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.GroupVersionKind") - proto.RegisterType((*NodeStatus)(nil), "github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.NodeStatus") - proto.RegisterType((*ResourceObject)(nil), "github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.ResourceObject") - proto.RegisterMapType((map[string]string)(nil), "github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.ResourceObject.LabelsEntry") - proto.RegisterType((*ResourceParameter)(nil), "github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.ResourceParameter") - proto.RegisterType((*ResourceParameterSource)(nil), "github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.ResourceParameterSource") - proto.RegisterType((*RetryStrategy)(nil), "github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.RetryStrategy") - proto.RegisterType((*Sensor)(nil), "github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.Sensor") - proto.RegisterType((*SensorList)(nil), "github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.SensorList") - proto.RegisterType((*SensorSpec)(nil), "github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.SensorSpec") - proto.RegisterType((*SensorStatus)(nil), "github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.SensorStatus") - proto.RegisterMapType((map[string]NodeStatus)(nil), "github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.SensorStatus.NodesEntry") - proto.RegisterType((*TimeFilter)(nil), "github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.TimeFilter") - proto.RegisterType((*Trigger)(nil), "github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.Trigger") - proto.RegisterType((*TriggerCondition)(nil), "github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.TriggerCondition") - proto.RegisterType((*URLArtifact)(nil), "github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1.URLArtifact") -} - -func init() { - proto.RegisterFile("github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1/generated.proto", fileDescriptor_6c4bded897df1f16) -} - -var fileDescriptor_6c4bded897df1f16 = []byte{ - // 2125 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x59, 0xcb, 0x6f, 0x1b, 0xc7, - 0x19, 0xf7, 0xf2, 0x25, 0xf2, 0xa3, 0x64, 0xc9, 0xd3, 0xb4, 0x61, 0x85, 0x56, 0x34, 0x36, 0x68, - 0x91, 0x16, 0xc9, 0xd2, 0x96, 0xd3, 0xc0, 0x6d, 0xd1, 0xb4, 0x26, 0xe5, 0x87, 0x22, 0xd9, 0x96, - 0x87, 0xb2, 0x03, 0xa4, 0x05, 0xea, 0xd5, 0xee, 0x88, 0xdc, 0x68, 0xb9, 0xb3, 0x98, 0x19, 0xca, - 0x61, 0xd1, 0x47, 0xfa, 0x02, 0x7a, 0x6a, 0x73, 0xee, 0xb5, 0xd7, 0x02, 0x3d, 0xf6, 0xde, 0x93, - 0x8f, 0xe9, 0x2d, 0x27, 0xa2, 0x66, 0x81, 0x5e, 0xfa, 0x1f, 0xe4, 0x54, 0xcc, 0x63, 0x1f, 0xa4, - 0xa4, 0x8a, 0x16, 0x7d, 0x12, 0xe7, 0x9b, 0x6f, 0x7e, 0xbf, 0x99, 0x6f, 0xe6, 0xfb, 0xe6, 0x37, - 0x2b, 0xb8, 0xd7, 0x0b, 0x44, 0x7f, 0x78, 0xe0, 0x78, 0x74, 0xd0, 0x72, 0x59, 0x8f, 0xc6, 0x8c, - 0x7e, 0xa4, 0x7e, 0xbc, 0x4d, 0x8e, 0x49, 0x24, 0x78, 0x2b, 0x3e, 0xea, 0xb5, 0xdc, 0x38, 0xe0, - 0x2d, 0x4e, 0x22, 0x4e, 0x59, 0xeb, 0xf8, 0xba, 0x1b, 0xc6, 0x7d, 0xf7, 0x7a, 0xab, 0x47, 0x22, - 0xc2, 0x5c, 0x41, 0x7c, 0x27, 0x66, 0x54, 0x50, 0x74, 0x33, 0x43, 0x72, 0x12, 0x24, 0xf5, 0xe3, - 0xa7, 0x1a, 0xc9, 0x89, 0x8f, 0x7a, 0x8e, 0x44, 0x72, 0x34, 0x92, 0x93, 0x20, 0xad, 0xff, 0x70, - 0xee, 0x39, 0x78, 0x74, 0x30, 0xa0, 0xd1, 0x2c, 0xf5, 0xfa, 0xdb, 0x39, 0x80, 0x1e, 0xed, 0xd1, - 0x96, 0x32, 0x1f, 0x0c, 0x0f, 0x55, 0x4b, 0x35, 0xd4, 0x2f, 0xe3, 0x6e, 0x1f, 0xdd, 0xe4, 0x4e, - 0x40, 0x25, 0x64, 0xcb, 0xa3, 0x8c, 0xb4, 0x8e, 0x4f, 0xac, 0x66, 0xfd, 0x9d, 0xcc, 0x67, 0xe0, - 0x7a, 0xfd, 0x20, 0x22, 0x6c, 0x94, 0xcd, 0x63, 0x40, 0x84, 0x7b, 0xda, 0xa8, 0xd6, 0x59, 0xa3, - 0xd8, 0x30, 0x12, 0xc1, 0x80, 0x9c, 0x18, 0xf0, 0xee, 0x79, 0x03, 0xb8, 0xd7, 0x27, 0x03, 0xf7, - 0xc4, 0xb8, 0x1b, 0x67, 0x8d, 0x1b, 0x8a, 0x20, 0x6c, 0x05, 0x91, 0xe0, 0x82, 0xcd, 0x0e, 0xb2, - 0xff, 0x56, 0x82, 0xb5, 0x5b, 0x4c, 0x04, 0x87, 0xae, 0x27, 0x76, 0xa9, 0xe7, 0x8a, 0x80, 0x46, - 0xa8, 0x0b, 0x05, 0x7e, 0xa3, 0x61, 0x5d, 0xb5, 0xde, 0xac, 0x6f, 0x7e, 0xdf, 0x99, 0x7b, 0x0f, - 0xf5, 0x4e, 0x38, 0xdd, 0x1b, 0x09, 0x60, 0xbb, 0x32, 0x19, 0x37, 0x0b, 0xdd, 0x1b, 0xb8, 0xc0, - 0x6f, 0x20, 0x1b, 0x2a, 0x41, 0x14, 0x06, 0x11, 0x69, 0x14, 0xae, 0x5a, 0x6f, 0xd6, 0xda, 0x30, - 0x19, 0x37, 0x2b, 0xdb, 0xca, 0x82, 0x4d, 0x0f, 0xf2, 0xa1, 0x74, 0x18, 0x84, 0xa4, 0x51, 0x54, - 0xd4, 0x77, 0x9c, 0x8b, 0x1e, 0x1f, 0xe7, 0x4e, 0x10, 0x92, 0x74, 0x16, 0xd5, 0xc9, 0xb8, 0x59, - 0x92, 0x16, 0xac, 0xd0, 0xd1, 0x53, 0x28, 0x0e, 0x59, 0xd8, 0x28, 0x29, 0x92, 0xdb, 0x17, 0x27, - 0x79, 0x8c, 0x77, 0x53, 0x8e, 0xa5, 0xc9, 0xb8, 0x59, 0x7c, 0x8c, 0x77, 0xb1, 0x84, 0x46, 0x1f, - 0x43, 0xcd, 0xa3, 0xd1, 0x61, 0xd0, 0x1b, 0xb8, 0x71, 0xa3, 0xac, 0x78, 0x76, 0x2e, 0xce, 0xd3, - 0x49, 0xa0, 0x52, 0xb6, 0x95, 0xc9, 0xb8, 0x59, 0x4b, 0xcd, 0x38, 0x23, 0x93, 0x6b, 0xeb, 0x05, - 0xa2, 0x51, 0x59, 0x74, 0x6d, 0x77, 0x03, 0x31, 0xbd, 0xb6, 0xbb, 0x81, 0xc0, 0x12, 0xda, 0xfe, - 0xbd, 0x05, 0x57, 0x4e, 0xcc, 0x08, 0x5d, 0x85, 0x52, 0xe4, 0x0e, 0x88, 0x3a, 0x34, 0xb5, 0xf6, - 0xf2, 0xf3, 0x71, 0xf3, 0x92, 0x8c, 0xfa, 0x03, 0x77, 0x40, 0xb0, 0xea, 0x41, 0x2d, 0xa8, 0xc9, - 0xbf, 0x3c, 0x76, 0xbd, 0xe4, 0x08, 0x5c, 0x31, 0x6e, 0xb5, 0x07, 0x49, 0x07, 0xce, 0x7c, 0xd0, - 0xd7, 0xa1, 0x78, 0x44, 0x46, 0xea, 0x2c, 0xd4, 0xda, 0x75, 0xe3, 0x5a, 0xdc, 0x21, 0x23, 0x2c, - 0xed, 0xf6, 0x2f, 0x00, 0xb6, 0x5c, 0xe1, 0xde, 0x09, 0x42, 0x41, 0x98, 0xe4, 0x8f, 0x5d, 0xd1, - 0x9f, 0xe5, 0xdf, 0x73, 0x45, 0x1f, 0xab, 0x1e, 0xf4, 0x16, 0x94, 0xc4, 0x28, 0x4e, 0xa8, 0x1b, - 0x89, 0xc7, 0xfe, 0x28, 0x26, 0x5f, 0x8c, 0x9b, 0xd5, 0xf7, 0xbb, 0x0f, 0x1f, 0xc8, 0xdf, 0x58, - 0x79, 0xa1, 0x26, 0x94, 0x8f, 0xdd, 0x70, 0x28, 0x8f, 0x62, 0xf1, 0xcd, 0x5a, 0xbb, 0x36, 0x19, - 0x37, 0xcb, 0x4f, 0xa4, 0x01, 0x6b, 0xbb, 0x1d, 0xc0, 0xea, 0x16, 0x89, 0x49, 0xe4, 0x93, 0xc8, - 0x1b, 0xdd, 0x65, 0x74, 0x18, 0xcf, 0x11, 0x83, 0x77, 0x60, 0xd9, 0x4f, 0x06, 0x05, 0x84, 0x37, - 0x0a, 0x0a, 0x7c, 0x6d, 0x32, 0x6e, 0x2e, 0x6f, 0xe5, 0xec, 0x78, 0xca, 0xcb, 0xfe, 0x63, 0x01, - 0x56, 0x6f, 0xcb, 0xfd, 0xca, 0x08, 0xe7, 0xe0, 0x7a, 0x0b, 0xaa, 0x3e, 0x71, 0xfd, 0x34, 0xe3, - 0x8a, 0xed, 0x35, 0xe3, 0x55, 0xdd, 0x32, 0x76, 0x9c, 0x7a, 0xa0, 0x9f, 0xc1, 0xd2, 0xa1, 0x8a, - 0x24, 0x37, 0xc9, 0xf7, 0xf0, 0xe2, 0x67, 0x67, 0x66, 0xae, 0x7a, 0x87, 0xda, 0xab, 0x86, 0x7d, - 0x49, 0xb7, 0x39, 0x4e, 0x08, 0xe5, 0xc9, 0xf0, 0x68, 0x14, 0x11, 0x4f, 0x10, 0x5f, 0x65, 0x65, - 0x35, 0x3b, 0x19, 0x9d, 0xa4, 0x03, 0x67, 0x3e, 0xf6, 0x7f, 0x0b, 0xf0, 0xe5, 0x53, 0x49, 0xe6, - 0x08, 0xcb, 0x01, 0x94, 0x64, 0x11, 0x55, 0x21, 0xa9, 0x6f, 0x6e, 0x5d, 0x7c, 0x95, 0xfb, 0xc1, - 0x80, 0x98, 0xa5, 0xa9, 0x02, 0x23, 0xdb, 0x58, 0x61, 0x23, 0x1f, 0x96, 0x3c, 0x1a, 0x09, 0xf2, - 0xb1, 0x30, 0xc1, 0xfc, 0xc1, 0x4b, 0x17, 0x51, 0xb5, 0xbc, 0x8e, 0x06, 0x69, 0xd7, 0x65, 0xd8, - 0x4c, 0x03, 0x27, 0xd0, 0xe8, 0x10, 0x4a, 0xbe, 0x2b, 0xdc, 0x46, 0xe9, 0x6a, 0x71, 0xb1, 0x95, - 0x64, 0x69, 0x94, 0x45, 0x4c, 0xda, 0xb0, 0xc2, 0xb7, 0xaf, 0xc1, 0x72, 0xbe, 0x9c, 0x9e, 0x9f, - 0x6a, 0xf6, 0x9f, 0x4b, 0x50, 0xcf, 0x15, 0x10, 0x99, 0xc9, 0xb2, 0xe0, 0x5a, 0xd3, 0x99, 0x9c, - 0x56, 0xcb, 0xf7, 0xe0, 0xb2, 0x17, 0xd2, 0x88, 0x6c, 0x05, 0x8c, 0x78, 0x82, 0xb2, 0x91, 0xc9, - 0xd1, 0xaf, 0x18, 0xcf, 0xcb, 0x9d, 0xa9, 0x5e, 0x3c, 0xe3, 0x8d, 0x3c, 0x28, 0x7b, 0x8c, 0xf8, - 0xc9, 0xc9, 0x6d, 0x2f, 0x54, 0xf5, 0x3a, 0x12, 0x49, 0xe7, 0xbb, 0xfa, 0x89, 0x35, 0xf6, 0x74, - 0xf9, 0x2a, 0xcd, 0x51, 0xbe, 0x36, 0x01, 0x38, 0xef, 0xef, 0x90, 0x91, 0x0c, 0x8c, 0xba, 0x04, - 0x6a, 0x6d, 0x64, 0x46, 0x40, 0xb7, 0x7b, 0xcf, 0xf4, 0xe0, 0x9c, 0x97, 0xcc, 0x59, 0x79, 0x43, - 0xa9, 0x11, 0x15, 0x35, 0x22, 0xcd, 0xd9, 0x3b, 0xc6, 0x8e, 0x53, 0x0f, 0xf4, 0x4d, 0xa8, 0x1c, - 0x30, 0x37, 0xf2, 0xfa, 0x8d, 0x25, 0xe5, 0x7b, 0xd9, 0xf8, 0x56, 0xda, 0xca, 0x8a, 0x4d, 0xaf, - 0x0c, 0xbf, 0x70, 0x7b, 0x8d, 0xea, 0x74, 0xf8, 0xf7, 0xdd, 0x1e, 0x96, 0x76, 0x34, 0x80, 0x0a, - 0x23, 0x03, 0x2a, 0x48, 0xa3, 0xa6, 0xe2, 0xb7, 0xbd, 0x50, 0xfc, 0xb0, 0x82, 0xd2, 0x17, 0x84, - 0xbe, 0xe3, 0xb5, 0x05, 0x1b, 0x12, 0xfb, 0xaf, 0x16, 0x54, 0x93, 0x38, 0xa3, 0x87, 0x50, 0x1d, - 0x72, 0xc2, 0xd2, 0x9c, 0xad, 0x6f, 0x7e, 0xc3, 0xd1, 0x32, 0x46, 0x12, 0x38, 0x52, 0x89, 0x39, - 0xc7, 0xd7, 0x9d, 0x2e, 0xf1, 0x18, 0x11, 0x3b, 0x64, 0xd4, 0x25, 0xa1, 0xda, 0xf4, 0xf6, 0xb2, - 0x8c, 0xc9, 0x63, 0x33, 0x14, 0xa7, 0x20, 0x12, 0x30, 0x76, 0x39, 0x7f, 0x46, 0x99, 0x6f, 0x52, - 0xfc, 0x65, 0x00, 0xf7, 0xcc, 0x50, 0x9c, 0x82, 0xd8, 0x8f, 0x60, 0x75, 0x66, 0x55, 0x73, 0x14, - 0x99, 0xaf, 0x41, 0x69, 0xc8, 0xc2, 0xa4, 0xbe, 0xab, 0xf2, 0xf0, 0x18, 0xef, 0x76, 0xb1, 0xb2, - 0xda, 0xbf, 0xb3, 0x60, 0x4d, 0xdd, 0x18, 0x4f, 0x08, 0xe3, 0x01, 0x8d, 0x76, 0x82, 0xc8, 0x47, - 0x6f, 0x40, 0xb9, 0x27, 0x6d, 0x06, 0x75, 0xc5, 0xa0, 0x96, 0x95, 0x23, 0xd6, 0x7d, 0xe8, 0x5b, - 0xb0, 0x74, 0xac, 0xc7, 0x98, 0x14, 0x49, 0x8b, 0xaa, 0x81, 0xc2, 0x49, 0xbf, 0x9c, 0xe4, 0x51, - 0x10, 0xf9, 0xe6, 0xfa, 0x4c, 0x27, 0x29, 0xb9, 0xb0, 0xea, 0x91, 0xd2, 0x0f, 0x1e, 0x50, 0x9f, - 0x74, 0x85, 0x2b, 0x86, 0x1c, 0xad, 0x43, 0x21, 0xf0, 0x0d, 0x3b, 0x18, 0xf7, 0xc2, 0xf6, 0x16, - 0x2e, 0x04, 0x7e, 0xba, 0xe2, 0xc2, 0x99, 0x2b, 0xfe, 0x0e, 0xd4, 0xfd, 0x80, 0xc7, 0xa1, 0x3b, - 0x92, 0x46, 0xc3, 0xfa, 0x25, 0xe3, 0x58, 0xdf, 0xca, 0xba, 0x70, 0xde, 0x2f, 0xbd, 0x94, 0x4b, - 0xa7, 0x5f, 0xca, 0x72, 0x7a, 0xb9, 0x4b, 0xf9, 0x1a, 0x94, 0xe3, 0xbe, 0xcb, 0x89, 0xc9, 0xa6, - 0xf5, 0x24, 0x46, 0x7b, 0xd2, 0xf8, 0x85, 0x4c, 0x44, 0xea, 0x13, 0xd5, 0xc0, 0xda, 0x11, 0x3d, - 0x85, 0x1a, 0x17, 0x2e, 0x13, 0xc4, 0xbf, 0x95, 0x88, 0xa2, 0x56, 0xee, 0x3c, 0xa4, 0x3a, 0x39, - 0x3b, 0xd2, 0x52, 0xc6, 0xcb, 0x13, 0x72, 0x3f, 0xf0, 0x18, 0x95, 0x35, 0x3d, 0x4b, 0xf3, 0x6e, - 0x82, 0x84, 0x33, 0x50, 0x74, 0x08, 0x75, 0x8f, 0x0e, 0xe2, 0x90, 0x68, 0x8e, 0xa5, 0x8b, 0x71, - 0xa4, 0x91, 0xea, 0x64, 0x58, 0x38, 0x0f, 0x2c, 0xb7, 0x7e, 0x40, 0x38, 0x77, 0x7b, 0xc4, 0x24, - 0x72, 0xba, 0xf5, 0xf7, 0xb5, 0x19, 0x27, 0xfd, 0xe8, 0x03, 0x28, 0xab, 0x44, 0x35, 0xf9, 0xfc, - 0xee, 0xc5, 0x2e, 0x1f, 0x5d, 0x03, 0xd5, 0x4f, 0xac, 0xf1, 0xec, 0xdf, 0x94, 0xe1, 0x32, 0x26, - 0x9c, 0x0e, 0x99, 0x47, 0x1e, 0x1e, 0x7c, 0x44, 0x3c, 0x81, 0x3e, 0xb5, 0x60, 0xad, 0x37, 0x73, - 0x96, 0x8d, 0xe2, 0x7d, 0x7f, 0x81, 0x3a, 0x32, 0x83, 0x98, 0x9e, 0x8c, 0x13, 0x79, 0x83, 0x4f, - 0xb0, 0x4f, 0x57, 0x6a, 0x6b, 0x8e, 0x4a, 0xcd, 0xa0, 0xa2, 0xd7, 0x64, 0x4e, 0xc8, 0x02, 0x13, - 0x9f, 0x7d, 0x4a, 0x65, 0x35, 0xb9, 0xab, 0x18, 0xb0, 0x61, 0x42, 0x3f, 0x87, 0x4a, 0xe8, 0x1e, - 0x90, 0x90, 0x2b, 0x81, 0x59, 0xdf, 0xdc, 0xbf, 0x38, 0xe7, 0xf4, 0x8e, 0x38, 0xbb, 0x0a, 0xf6, - 0x76, 0x24, 0xd8, 0x28, 0x63, 0xd7, 0x46, 0x6c, 0x38, 0xd1, 0xaf, 0x00, 0x62, 0x97, 0xb9, 0x03, - 0xa2, 0x04, 0x9f, 0x16, 0x10, 0x3b, 0x8b, 0xcf, 0x60, 0x2f, 0xc1, 0xcc, 0x2e, 0xba, 0xd4, 0xc4, - 0x71, 0x8e, 0x72, 0xfd, 0xbb, 0x50, 0xcf, 0xcd, 0x13, 0xad, 0x69, 0xa9, 0xaf, 0x36, 0x4b, 0xa9, - 0x7b, 0xf4, 0x5a, 0xa2, 0xbf, 0x55, 0xc9, 0x31, 0xa2, 0xfb, 0x7b, 0x85, 0x9b, 0x96, 0xfd, 0x17, - 0x0b, 0xae, 0x9c, 0x20, 0x44, 0x21, 0x14, 0x39, 0xf3, 0xcc, 0x1d, 0xf2, 0xe8, 0x15, 0x2e, 0x45, - 0xef, 0x9b, 0x7e, 0x03, 0x75, 0x99, 0x87, 0x25, 0x8d, 0xac, 0x87, 0x3e, 0xe1, 0x62, 0xb6, 0x1e, - 0x6e, 0x11, 0x2e, 0xb0, 0xea, 0xb1, 0x7f, 0x6d, 0xc1, 0xeb, 0x67, 0x60, 0xc9, 0x52, 0xaf, 0xf3, - 0x73, 0xa6, 0xd4, 0xe7, 0x73, 0x2d, 0x55, 0x59, 0x85, 0x33, 0x1f, 0x34, 0xb9, 0x27, 0x8a, 0x75, - 0xea, 0x13, 0x65, 0x15, 0x56, 0x30, 0x11, 0x6c, 0xd4, 0x15, 0xf2, 0xc5, 0xdf, 0x1b, 0xd9, 0xff, - 0x28, 0x40, 0xa5, 0xab, 0x16, 0x8c, 0x9e, 0x42, 0x55, 0x56, 0x21, 0x25, 0x20, 0x75, 0xd0, 0xae, - 0xcd, 0x57, 0xb3, 0xf4, 0x29, 0xbb, 0x4f, 0x84, 0x9b, 0x6d, 0x72, 0x66, 0xc3, 0x29, 0xaa, 0x94, - 0xa7, 0x3c, 0x26, 0xde, 0xe2, 0x42, 0x5b, 0xcf, 0xb8, 0x1b, 0x13, 0x2f, 0x0b, 0x83, 0x6c, 0x61, - 0x85, 0x8f, 0x22, 0xa8, 0x70, 0x75, 0x83, 0x2d, 0xfe, 0xd5, 0xc0, 0x30, 0x29, 0xb4, 0x5c, 0xe6, - 0xaa, 0x36, 0x36, 0x2c, 0xf6, 0x3f, 0x2d, 0x00, 0xed, 0xb8, 0x1b, 0x70, 0x81, 0x7e, 0x72, 0x22, - 0x90, 0xce, 0x7c, 0x81, 0x94, 0xa3, 0x55, 0x18, 0x53, 0x89, 0x97, 0x58, 0x72, 0x41, 0x24, 0x50, - 0x0e, 0x04, 0x19, 0x68, 0x25, 0x51, 0xdf, 0xfc, 0xd1, 0xa2, 0x6b, 0xcb, 0x0e, 0xdb, 0xb6, 0x84, - 0xc5, 0x1a, 0xdd, 0xfe, 0x43, 0x39, 0x59, 0x93, 0x0c, 0x2c, 0xfa, 0xad, 0x35, 0xf3, 0x4e, 0xb5, - 0x14, 0xfb, 0xf6, 0x2b, 0x7b, 0x12, 0xb6, 0x5f, 0x33, 0xd3, 0xf8, 0x3f, 0xcf, 0x5e, 0x44, 0xa1, - 0x2a, 0x58, 0xd0, 0xeb, 0xc9, 0x12, 0xa5, 0x97, 0x7f, 0x6b, 0x81, 0xd7, 0x9a, 0x46, 0xca, 0x82, - 0x6d, 0x0c, 0x1c, 0xa7, 0x24, 0xe8, 0x3e, 0x54, 0x05, 0x19, 0xc4, 0xa1, 0x2b, 0x92, 0x2f, 0x50, - 0x6f, 0x9c, 0xa6, 0x1d, 0xf7, 0xa8, 0xbf, 0x6f, 0xdc, 0xf4, 0xa1, 0x54, 0x70, 0xc6, 0x82, 0x53, - 0x08, 0xf4, 0x0c, 0x56, 0xd4, 0xac, 0xf6, 0x18, 0x15, 0xd4, 0xa3, 0xc9, 0x07, 0xa7, 0xf7, 0x2e, - 0x76, 0x1d, 0x27, 0x28, 0xed, 0x2b, 0x93, 0x71, 0x73, 0x65, 0xca, 0x84, 0xa7, 0x79, 0xa4, 0x54, - 0xf0, 0x02, 0xe6, 0x0d, 0x03, 0x61, 0x84, 0x52, 0x2a, 0x15, 0x3a, 0xda, 0x8c, 0x93, 0x7e, 0xf4, - 0x27, 0x0b, 0xd6, 0xfc, 0xe9, 0xcf, 0x18, 0xbc, 0x51, 0x59, 0x74, 0xb7, 0x67, 0x3e, 0x8c, 0x64, - 0xb7, 0xf7, 0x4c, 0x07, 0xc7, 0x27, 0xc8, 0xed, 0xff, 0x94, 0x60, 0x39, 0x9f, 0x87, 0x99, 0xe8, - 0xb3, 0xe6, 0x15, 0x7d, 0x3f, 0xce, 0x8b, 0x3e, 0x5d, 0x7e, 0xbe, 0x3d, 0x5f, 0x4e, 0xce, 0xa1, - 0xf7, 0xdc, 0x69, 0xbd, 0x57, 0x7c, 0x69, 0xf8, 0xf3, 0xa5, 0xde, 0x2d, 0x58, 0x35, 0xcd, 0x80, - 0x46, 0x1d, 0x3a, 0x8c, 0xb4, 0x74, 0x2d, 0xb7, 0x5f, 0x37, 0x43, 0x57, 0x3b, 0xd3, 0xdd, 0x78, - 0xd6, 0x3f, 0xaf, 0x16, 0x4b, 0xe7, 0xa8, 0xc5, 0x63, 0x28, 0x47, 0xd4, 0x27, 0xbc, 0x51, 0x56, - 0xdb, 0xfe, 0xe8, 0xd5, 0x94, 0x4f, 0x47, 0xee, 0x8a, 0x51, 0x21, 0x69, 0xcd, 0x51, 0x36, 0xac, - 0xe9, 0xd6, 0x7f, 0xa9, 0x5f, 0x1f, 0x67, 0x2a, 0x80, 0x0f, 0xf3, 0x0a, 0x60, 0xa1, 0x0b, 0x24, - 0x7b, 0xe4, 0xe4, 0x75, 0x44, 0x17, 0x20, 0xfb, 0x84, 0x23, 0xef, 0x64, 0xb5, 0xc7, 0xb3, 0x77, - 0xb2, 0x3a, 0x03, 0x58, 0xf7, 0xc9, 0x3b, 0x99, 0x0b, 0x1a, 0xcf, 0xde, 0xc9, 0x5d, 0x41, 0x63, - 0xac, 0x7a, 0xec, 0xbf, 0x17, 0x61, 0xc9, 0x54, 0x96, 0x39, 0x9e, 0x89, 0x0c, 0xaa, 0xcc, 0x68, - 0x04, 0xb3, 0xca, 0x7b, 0xaf, 0x4a, 0x06, 0xea, 0xaa, 0x94, 0xd8, 0x70, 0xca, 0x93, 0x3f, 0x19, - 0xc5, 0x73, 0x4e, 0xc6, 0x27, 0x16, 0xac, 0x30, 0x12, 0x87, 0xa9, 0x80, 0x30, 0x15, 0xec, 0xee, - 0x22, 0x93, 0xcc, 0xe9, 0x11, 0x5d, 0xca, 0xa6, 0x4c, 0x78, 0x9a, 0x10, 0xf5, 0xa1, 0xf4, 0xac, - 0x4f, 0xa2, 0xc5, 0x5f, 0x14, 0x66, 0x53, 0x3a, 0x34, 0xf2, 0x03, 0x25, 0xcc, 0xd5, 0xa3, 0xfc, - 0x83, 0x3e, 0x89, 0xb0, 0x62, 0xb0, 0xef, 0xc1, 0xda, 0xac, 0x0f, 0xfa, 0x2a, 0x14, 0xdd, 0x68, - 0xa4, 0x6e, 0xbf, 0x9a, 0x56, 0x80, 0xb7, 0xa2, 0x11, 0x96, 0x36, 0xd5, 0x15, 0x86, 0xe6, 0x81, - 0xaf, 0xbb, 0xc2, 0x10, 0x4b, 0x9b, 0xed, 0x41, 0x3d, 0xf7, 0x9f, 0x81, 0x39, 0xbe, 0x4c, 0x6f, - 0x02, 0x1c, 0x13, 0x16, 0x1c, 0x8e, 0x3a, 0x84, 0xe9, 0x82, 0x55, 0xcd, 0xb4, 0xd5, 0x93, 0xb4, - 0x07, 0xe7, 0xbc, 0xda, 0xce, 0xf3, 0x17, 0x1b, 0x97, 0x3e, 0x7b, 0xb1, 0x71, 0xe9, 0xf3, 0x17, - 0x1b, 0x97, 0x3e, 0x99, 0x6c, 0x58, 0xcf, 0x27, 0x1b, 0xd6, 0x67, 0x93, 0x0d, 0xeb, 0xf3, 0xc9, - 0x86, 0xf5, 0xaf, 0xc9, 0x86, 0xf5, 0xe9, 0xbf, 0x37, 0x2e, 0x7d, 0x58, 0x4d, 0xd6, 0xff, 0xbf, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x9a, 0xf6, 0xe3, 0x37, 0xd4, 0x1b, 0x00, 0x00, -} - -func (m *ArtifactLocation) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ArtifactLocation) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.S3 != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.S3.Size())) - n1, err := m.S3.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n1 - } - if m.Inline != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Inline))) - i += copy(dAtA[i:], *m.Inline) - } - if m.File != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.File.Size())) - n2, err := m.File.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n2 - } - if m.URL != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.URL.Size())) - n3, err := m.URL.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n3 - } - if m.Configmap != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Configmap.Size())) - n4, err := m.Configmap.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n4 - } - if m.Git != nil { - dAtA[i] = 0x32 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Git.Size())) - n5, err := m.Git.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n5 - } - return i, nil -} - -func (m *ConfigmapArtifact) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ConfigmapArtifact) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) - i += copy(dAtA[i:], m.Namespace) - dAtA[i] = 0x1a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Key))) - i += copy(dAtA[i:], m.Key) - return i, nil -} - -func (m *DataFilter) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DataFilter) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path))) - i += copy(dAtA[i:], m.Path) - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i += copy(dAtA[i:], m.Type) - if len(m.Value) > 0 { - for _, s := range m.Value { - dAtA[i] = 0x1a - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - return i, nil -} - -func (m *DependencyGroup) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DependencyGroup) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - if len(m.Dependencies) > 0 { - for _, s := range m.Dependencies { - dAtA[i] = 0x12 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - return i, nil -} - -func (m *EventDependency) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EventDependency) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - dAtA[i] = 0x10 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Deadline)) - dAtA[i] = 0x1a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Filters.Size())) - n6, err := m.Filters.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n6 - dAtA[i] = 0x20 - i++ - if m.Connected { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - return i, nil -} - -func (m *EventDependencyFilter) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EventDependencyFilter) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - if m.Time != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Time.Size())) - n7, err := m.Time.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n7 - } - if m.Context != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Context.Size())) - n8, err := m.Context.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n8 - } - if len(m.Data) > 0 { - for _, msg := range m.Data { - dAtA[i] = 0x22 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *FileArtifact) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FileArtifact) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path))) - i += copy(dAtA[i:], m.Path) - return i, nil -} - -func (m *GitArtifact) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GitArtifact) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.URL))) - i += copy(dAtA[i:], m.URL) - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.CloneDirectory))) - i += copy(dAtA[i:], m.CloneDirectory) - if m.Creds != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Creds.Size())) - n9, err := m.Creds.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n9 - } - dAtA[i] = 0x22 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) - i += copy(dAtA[i:], m.Namespace) - dAtA[i] = 0x2a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.SSHKeyPath))) - i += copy(dAtA[i:], m.SSHKeyPath) - dAtA[i] = 0x32 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.FilePath))) - i += copy(dAtA[i:], m.FilePath) - dAtA[i] = 0x3a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Branch))) - i += copy(dAtA[i:], m.Branch) - dAtA[i] = 0x42 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Tag))) - i += copy(dAtA[i:], m.Tag) - if m.Remote != nil { - dAtA[i] = 0x4a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Remote.Size())) - n10, err := m.Remote.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n10 - } - return i, nil -} - -func (m *GitCreds) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GitCreds) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Username != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Username.Size())) - n11, err := m.Username.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n11 - } - if m.Password != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Password.Size())) - n12, err := m.Password.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n12 - } - return i, nil -} - -func (m *GitRemoteConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GitRemoteConfig) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - if len(m.URLS) > 0 { - for _, s := range m.URLS { - dAtA[i] = 0x12 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - return i, nil -} - -func (m *GroupVersionKind) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GroupVersionKind) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group))) - i += copy(dAtA[i:], m.Group) - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Version))) - i += copy(dAtA[i:], m.Version) - dAtA[i] = 0x1a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind))) - i += copy(dAtA[i:], m.Kind) - return i, nil -} - -func (m *NodeStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NodeStatus) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ID))) - i += copy(dAtA[i:], m.ID) - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - dAtA[i] = 0x1a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DisplayName))) - i += copy(dAtA[i:], m.DisplayName) - dAtA[i] = 0x22 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i += copy(dAtA[i:], m.Type) - dAtA[i] = 0x2a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Phase))) - i += copy(dAtA[i:], m.Phase) - dAtA[i] = 0x32 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.StartedAt.Size())) - n13, err := m.StartedAt.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n13 - dAtA[i] = 0x3a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.CompletedAt.Size())) - n14, err := m.CompletedAt.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n14 - dAtA[i] = 0x42 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) - i += copy(dAtA[i:], m.Message) - if m.Event != nil { - dAtA[i] = 0x4a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Event.Size())) - n15, err := m.Event.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n15 - } - return i, nil -} - -func (m *ResourceObject) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResourceObject) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) - i += copy(dAtA[i:], m.Namespace) - if len(m.Labels) > 0 { - keysForLabels := make([]string, 0, len(m.Labels)) - for k := range m.Labels { - keysForLabels = append(keysForLabels, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) - for _, k := range keysForLabels { - dAtA[i] = 0x1a - i++ - v := m.Labels[string(k)] - mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) - i = encodeVarintGenerated(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(v))) - i += copy(dAtA[i:], v) - } - } - if len(m.Parameters) > 0 { - for _, msg := range m.Parameters { - dAtA[i] = 0x22 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - dAtA[i] = 0x2a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.GroupVersionKind.Size())) - n16, err := m.GroupVersionKind.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n16 - dAtA[i] = 0x32 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Source.Size())) - n17, err := m.Source.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n17 - return i, nil -} - -func (m *ResourceParameter) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResourceParameter) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if m.Src != nil { - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Src.Size())) - n18, err := m.Src.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n18 - } - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Dest))) - i += copy(dAtA[i:], m.Dest) - return i, nil -} - -func (m *ResourceParameterSource) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResourceParameterSource) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Event))) - i += copy(dAtA[i:], m.Event) - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path))) - i += copy(dAtA[i:], m.Path) - if m.Value != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Value))) - i += copy(dAtA[i:], *m.Value) - } - return i, nil -} - -func (m *RetryStrategy) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RetryStrategy) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - return i, nil -} - -func (m *Sensor) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Sensor) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.ObjectMeta.Size())) - n19, err := m.ObjectMeta.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n19 - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Spec.Size())) - n20, err := m.Spec.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n20 - dAtA[i] = 0x1a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Status.Size())) - n21, err := m.Status.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n21 - return i, nil -} - -func (m *SensorList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SensorList) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.ListMeta.Size())) - n22, err := m.ListMeta.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n22 - if len(m.Items) > 0 { - for _, msg := range m.Items { - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *SensorSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SensorSpec) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Dependencies) > 0 { - for _, msg := range m.Dependencies { - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if len(m.Triggers) > 0 { - for _, msg := range m.Triggers { - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - if m.Template != nil { - dAtA[i] = 0x1a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Template.Size())) - n23, err := m.Template.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n23 - } - if m.EventProtocol != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.EventProtocol.Size())) - n24, err := m.EventProtocol.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n24 - } - dAtA[i] = 0x2a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Circuit))) - i += copy(dAtA[i:], m.Circuit) - if len(m.DependencyGroups) > 0 { - for _, msg := range m.DependencyGroups { - dAtA[i] = 0x32 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(msg.Size())) - n, err := msg.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n - } - } - return i, nil -} - -func (m *SensorStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SensorStatus) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Phase))) - i += copy(dAtA[i:], m.Phase) - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.StartedAt.Size())) - n25, err := m.StartedAt.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n25 - dAtA[i] = 0x1a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.CompletedAt.Size())) - n26, err := m.CompletedAt.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n26 - dAtA[i] = 0x22 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) - i += copy(dAtA[i:], m.Message) - if len(m.Nodes) > 0 { - keysForNodes := make([]string, 0, len(m.Nodes)) - for k := range m.Nodes { - keysForNodes = append(keysForNodes, string(k)) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForNodes) - for _, k := range keysForNodes { - dAtA[i] = 0x2a - i++ - v := m.Nodes[string(k)] - msgSize := 0 - if (&v) != nil { - msgSize = (&v).Size() - msgSize += 1 + sovGenerated(uint64(msgSize)) - } - mapSize := 1 + len(k) + sovGenerated(uint64(len(k))) + msgSize - i = encodeVarintGenerated(dAtA, i, uint64(mapSize)) - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(k))) - i += copy(dAtA[i:], k) - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64((&v).Size())) - n27, err := (&v).MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n27 - } - } - dAtA[i] = 0x30 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.CompletionCount)) - return i, nil -} - -func (m *TimeFilter) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TimeFilter) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Start))) - i += copy(dAtA[i:], m.Start) - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Stop))) - i += copy(dAtA[i:], m.Stop) - return i, nil -} - -func (m *Trigger) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Trigger) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i += copy(dAtA[i:], m.Name) - if m.Resource != nil { - dAtA[i] = 0x12 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.Resource.Size())) - n28, err := m.Resource.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n28 - } - dAtA[i] = 0x1a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) - i += copy(dAtA[i:], m.Message) - if m.RetryStrategy != nil { - dAtA[i] = 0x22 - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.RetryStrategy.Size())) - n29, err := m.RetryStrategy.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n29 - } - if m.When != nil { - dAtA[i] = 0x2a - i++ - i = encodeVarintGenerated(dAtA, i, uint64(m.When.Size())) - n30, err := m.When.MarshalTo(dAtA[i:]) - if err != nil { - return 0, err - } - i += n30 - } - return i, nil -} - -func (m *TriggerCondition) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TriggerCondition) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - if len(m.Any) > 0 { - for _, s := range m.Any { - dAtA[i] = 0xa - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - if len(m.All) > 0 { - for _, s := range m.All { - dAtA[i] = 0x12 - i++ - l = len(s) - for l >= 1<<7 { - dAtA[i] = uint8(uint64(l)&0x7f | 0x80) - l >>= 7 - i++ - } - dAtA[i] = uint8(l) - i++ - i += copy(dAtA[i:], s) - } - } - return i, nil -} - -func (m *URLArtifact) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalTo(dAtA) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *URLArtifact) MarshalTo(dAtA []byte) (int, error) { - var i int - _ = i - var l int - _ = l - dAtA[i] = 0xa - i++ - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path))) - i += copy(dAtA[i:], m.Path) - dAtA[i] = 0x10 - i++ - if m.VerifyCert { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i++ - return i, nil -} - -func encodeVarintGenerated(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 *ArtifactLocation) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.S3 != nil { - l = m.S3.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Inline != nil { - l = len(*m.Inline) - n += 1 + l + sovGenerated(uint64(l)) - } - if m.File != nil { - l = m.File.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.URL != nil { - l = m.URL.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Configmap != nil { - l = m.Configmap.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Git != nil { - l = m.Git.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *ConfigmapArtifact) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Namespace) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Key) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *DataFilter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Path) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Value) > 0 { - for _, s := range m.Value { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *DependencyGroup) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Dependencies) > 0 { - for _, s := range m.Dependencies { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *EventDependency) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.Deadline)) - l = m.Filters.Size() - n += 1 + l + sovGenerated(uint64(l)) - n += 2 - return n -} - -func (m *EventDependencyFilter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - if m.Time != nil { - l = m.Time.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Context != nil { - l = m.Context.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.Data) > 0 { - for _, e := range m.Data { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *FileArtifact) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Path) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *GitArtifact) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.URL) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.CloneDirectory) - n += 1 + l + sovGenerated(uint64(l)) - if m.Creds != nil { - l = m.Creds.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - l = len(m.Namespace) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.SSHKeyPath) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.FilePath) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Branch) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Tag) - n += 1 + l + sovGenerated(uint64(l)) - if m.Remote != nil { - l = m.Remote.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *GitCreds) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Username != nil { - l = m.Username.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Password != nil { - l = m.Password.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *GitRemoteConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.URLS) > 0 { - for _, s := range m.URLS { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *GroupVersionKind) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Group) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Version) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Kind) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *NodeStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ID) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.DisplayName) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Phase) - n += 1 + l + sovGenerated(uint64(l)) - l = m.StartedAt.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.CompletedAt.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Message) - n += 1 + l + sovGenerated(uint64(l)) - if m.Event != nil { - l = m.Event.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *ResourceObject) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Namespace) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Labels) > 0 { - for k, v := range m.Labels { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } - } - if len(m.Parameters) > 0 { - for _, e := range m.Parameters { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = m.GroupVersionKind.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Source.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ResourceParameter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Src != nil { - l = m.Src.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - l = len(m.Dest) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ResourceParameterSource) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Event) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Path) - n += 1 + l + sovGenerated(uint64(l)) - if m.Value != nil { - l = len(*m.Value) - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *RetryStrategy) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *Sensor) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *SensorList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *SensorSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Dependencies) > 0 { - for _, e := range m.Dependencies { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.Triggers) > 0 { - for _, e := range m.Triggers { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if m.Template != nil { - l = m.Template.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.EventProtocol != nil { - l = m.EventProtocol.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - l = len(m.Circuit) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.DependencyGroups) > 0 { - for _, e := range m.DependencyGroups { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *SensorStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Phase) - n += 1 + l + sovGenerated(uint64(l)) - l = m.StartedAt.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.CompletedAt.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Message) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Nodes) > 0 { - for k, v := range m.Nodes { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } - } - n += 1 + sovGenerated(uint64(m.CompletionCount)) - return n -} - -func (m *TimeFilter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Start) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Stop) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *Trigger) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - if m.Resource != nil { - l = m.Resource.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - l = len(m.Message) - n += 1 + l + sovGenerated(uint64(l)) - if m.RetryStrategy != nil { - l = m.RetryStrategy.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.When != nil { - l = m.When.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *TriggerCondition) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Any) > 0 { - for _, s := range m.Any { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.All) > 0 { - for _, s := range m.All { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *URLArtifact) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Path) - n += 1 + l + sovGenerated(uint64(l)) - n += 2 - return n -} - -func sovGenerated(x uint64) (n int) { - for { - n++ - x >>= 7 - if x == 0 { - break - } - } - return n -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *ArtifactLocation) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ArtifactLocation{`, - `S3:` + strings.Replace(fmt.Sprintf("%v", this.S3), "S3Artifact", "common.S3Artifact", 1) + `,`, - `Inline:` + valueToStringGenerated(this.Inline) + `,`, - `File:` + strings.Replace(fmt.Sprintf("%v", this.File), "FileArtifact", "FileArtifact", 1) + `,`, - `URL:` + strings.Replace(fmt.Sprintf("%v", this.URL), "URLArtifact", "URLArtifact", 1) + `,`, - `Configmap:` + strings.Replace(fmt.Sprintf("%v", this.Configmap), "ConfigmapArtifact", "ConfigmapArtifact", 1) + `,`, - `Git:` + strings.Replace(fmt.Sprintf("%v", this.Git), "GitArtifact", "GitArtifact", 1) + `,`, - `}`, - }, "") - return s -} -func (this *ConfigmapArtifact) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ConfigmapArtifact{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `}`, - }, "") - return s -} -func (this *DataFilter) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DataFilter{`, - `Path:` + fmt.Sprintf("%v", this.Path) + `,`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `}`, - }, "") - return s -} -func (this *DependencyGroup) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DependencyGroup{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Dependencies:` + fmt.Sprintf("%v", this.Dependencies) + `,`, - `}`, - }, "") - return s -} -func (this *EventDependency) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&EventDependency{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Deadline:` + fmt.Sprintf("%v", this.Deadline) + `,`, - `Filters:` + strings.Replace(strings.Replace(this.Filters.String(), "EventDependencyFilter", "EventDependencyFilter", 1), `&`, ``, 1) + `,`, - `Connected:` + fmt.Sprintf("%v", this.Connected) + `,`, - `}`, - }, "") - return s -} -func (this *EventDependencyFilter) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&EventDependencyFilter{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Time:` + strings.Replace(fmt.Sprintf("%v", this.Time), "TimeFilter", "TimeFilter", 1) + `,`, - `Context:` + strings.Replace(fmt.Sprintf("%v", this.Context), "EventContext", "common.EventContext", 1) + `,`, - `Data:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Data), "DataFilter", "DataFilter", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *FileArtifact) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&FileArtifact{`, - `Path:` + fmt.Sprintf("%v", this.Path) + `,`, - `}`, - }, "") - return s -} -func (this *GitArtifact) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&GitArtifact{`, - `URL:` + fmt.Sprintf("%v", this.URL) + `,`, - `CloneDirectory:` + fmt.Sprintf("%v", this.CloneDirectory) + `,`, - `Creds:` + strings.Replace(fmt.Sprintf("%v", this.Creds), "GitCreds", "GitCreds", 1) + `,`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `SSHKeyPath:` + fmt.Sprintf("%v", this.SSHKeyPath) + `,`, - `FilePath:` + fmt.Sprintf("%v", this.FilePath) + `,`, - `Branch:` + fmt.Sprintf("%v", this.Branch) + `,`, - `Tag:` + fmt.Sprintf("%v", this.Tag) + `,`, - `Remote:` + strings.Replace(fmt.Sprintf("%v", this.Remote), "GitRemoteConfig", "GitRemoteConfig", 1) + `,`, - `}`, - }, "") - return s -} -func (this *GitCreds) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&GitCreds{`, - `Username:` + strings.Replace(fmt.Sprintf("%v", this.Username), "SecretKeySelector", "v1.SecretKeySelector", 1) + `,`, - `Password:` + strings.Replace(fmt.Sprintf("%v", this.Password), "SecretKeySelector", "v1.SecretKeySelector", 1) + `,`, - `}`, - }, "") - return s -} -func (this *GitRemoteConfig) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&GitRemoteConfig{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `URLS:` + fmt.Sprintf("%v", this.URLS) + `,`, - `}`, - }, "") - return s -} -func (this *GroupVersionKind) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&GroupVersionKind{`, - `Group:` + fmt.Sprintf("%v", this.Group) + `,`, - `Version:` + fmt.Sprintf("%v", this.Version) + `,`, - `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, - `}`, - }, "") - return s -} -func (this *NodeStatus) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NodeStatus{`, - `ID:` + fmt.Sprintf("%v", this.ID) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `DisplayName:` + fmt.Sprintf("%v", this.DisplayName) + `,`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Phase:` + fmt.Sprintf("%v", this.Phase) + `,`, - `StartedAt:` + strings.Replace(strings.Replace(this.StartedAt.String(), "MicroTime", "v11.MicroTime", 1), `&`, ``, 1) + `,`, - `CompletedAt:` + strings.Replace(strings.Replace(this.CompletedAt.String(), "MicroTime", "v11.MicroTime", 1), `&`, ``, 1) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `Event:` + strings.Replace(fmt.Sprintf("%v", this.Event), "Event", "common.Event", 1) + `,`, - `}`, - }, "") - return s -} -func (this *ResourceObject) String() string { - if this == nil { - return "nil" - } - keysForLabels := make([]string, 0, len(this.Labels)) - for k := range this.Labels { - keysForLabels = append(keysForLabels, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) - mapStringForLabels := "map[string]string{" - for _, k := range keysForLabels { - mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) - } - mapStringForLabels += "}" - s := strings.Join([]string{`&ResourceObject{`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `Labels:` + mapStringForLabels + `,`, - `Parameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Parameters), "ResourceParameter", "ResourceParameter", 1), `&`, ``, 1) + `,`, - `GroupVersionKind:` + strings.Replace(strings.Replace(this.GroupVersionKind.String(), "GroupVersionKind", "GroupVersionKind", 1), `&`, ``, 1) + `,`, - `Source:` + strings.Replace(strings.Replace(this.Source.String(), "ArtifactLocation", "ArtifactLocation", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ResourceParameter) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ResourceParameter{`, - `Src:` + strings.Replace(fmt.Sprintf("%v", this.Src), "ResourceParameterSource", "ResourceParameterSource", 1) + `,`, - `Dest:` + fmt.Sprintf("%v", this.Dest) + `,`, - `}`, - }, "") - return s -} -func (this *ResourceParameterSource) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ResourceParameterSource{`, - `Event:` + fmt.Sprintf("%v", this.Event) + `,`, - `Path:` + fmt.Sprintf("%v", this.Path) + `,`, - `Value:` + valueToStringGenerated(this.Value) + `,`, - `}`, - }, "") - return s -} -func (this *RetryStrategy) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RetryStrategy{`, - `}`, - }, "") - return s -} -func (this *Sensor) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Sensor{`, - `ObjectMeta:` + strings.Replace(strings.Replace(this.ObjectMeta.String(), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SensorSpec", "SensorSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SensorStatus", "SensorStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *SensorList) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SensorList{`, - `ListMeta:` + strings.Replace(strings.Replace(this.ListMeta.String(), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Items), "Sensor", "Sensor", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *SensorSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SensorSpec{`, - `Dependencies:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Dependencies), "EventDependency", "EventDependency", 1), `&`, ``, 1) + `,`, - `Triggers:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Triggers), "Trigger", "Trigger", 1), `&`, ``, 1) + `,`, - `Template:` + strings.Replace(fmt.Sprintf("%v", this.Template), "PodTemplateSpec", "v1.PodTemplateSpec", 1) + `,`, - `EventProtocol:` + strings.Replace(fmt.Sprintf("%v", this.EventProtocol), "EventProtocol", "common.EventProtocol", 1) + `,`, - `Circuit:` + fmt.Sprintf("%v", this.Circuit) + `,`, - `DependencyGroups:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.DependencyGroups), "DependencyGroup", "DependencyGroup", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *SensorStatus) String() string { - if this == nil { - return "nil" - } - keysForNodes := make([]string, 0, len(this.Nodes)) - for k := range this.Nodes { - keysForNodes = append(keysForNodes, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForNodes) - mapStringForNodes := "map[string]NodeStatus{" - for _, k := range keysForNodes { - mapStringForNodes += fmt.Sprintf("%v: %v,", k, this.Nodes[k]) - } - mapStringForNodes += "}" - s := strings.Join([]string{`&SensorStatus{`, - `Phase:` + fmt.Sprintf("%v", this.Phase) + `,`, - `StartedAt:` + strings.Replace(strings.Replace(this.StartedAt.String(), "Time", "v11.Time", 1), `&`, ``, 1) + `,`, - `CompletedAt:` + strings.Replace(strings.Replace(this.CompletedAt.String(), "Time", "v11.Time", 1), `&`, ``, 1) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `Nodes:` + mapStringForNodes + `,`, - `CompletionCount:` + fmt.Sprintf("%v", this.CompletionCount) + `,`, - `}`, - }, "") - return s -} -func (this *TimeFilter) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TimeFilter{`, - `Start:` + fmt.Sprintf("%v", this.Start) + `,`, - `Stop:` + fmt.Sprintf("%v", this.Stop) + `,`, - `}`, - }, "") - return s -} -func (this *Trigger) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Trigger{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Resource:` + strings.Replace(fmt.Sprintf("%v", this.Resource), "ResourceObject", "ResourceObject", 1) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `RetryStrategy:` + strings.Replace(fmt.Sprintf("%v", this.RetryStrategy), "RetryStrategy", "RetryStrategy", 1) + `,`, - `When:` + strings.Replace(fmt.Sprintf("%v", this.When), "TriggerCondition", "TriggerCondition", 1) + `,`, - `}`, - }, "") - return s -} -func (this *TriggerCondition) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TriggerCondition{`, - `Any:` + fmt.Sprintf("%v", this.Any) + `,`, - `All:` + fmt.Sprintf("%v", this.All) + `,`, - `}`, - }, "") - return s -} -func (this *URLArtifact) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&URLArtifact{`, - `Path:` + fmt.Sprintf("%v", this.Path) + `,`, - `VerifyCert:` + fmt.Sprintf("%v", this.VerifyCert) + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *ArtifactLocation) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ArtifactLocation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ArtifactLocation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field S3", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.S3 == nil { - m.S3 = &common.S3Artifact{} - } - if err := m.S3.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Inline", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Inline = &s - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field File", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.File == nil { - m.File = &FileArtifact{} - } - if err := m.File.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field URL", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.URL == nil { - m.URL = &URLArtifact{} - } - if err := m.URL.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Configmap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Configmap == nil { - m.Configmap = &ConfigmapArtifact{} - } - if err := m.Configmap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Git", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Git == nil { - m.Git = &GitArtifact{} - } - if err := m.Git.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ConfigmapArtifact) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ConfigmapArtifact: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConfigmapArtifact: 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 ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - 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 Namespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - 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 ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DataFilter) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DataFilter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DataFilter: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Path = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = JSONType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - 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 ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = append(m.Value, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DependencyGroup) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DependencyGroup: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DependencyGroup: 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 ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - 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 Dependencies", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Dependencies = append(m.Dependencies, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventDependency) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EventDependency: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventDependency: 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 ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - 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 Deadline", wireType) - } - m.Deadline = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Deadline |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Filters", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Filters.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Connected", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Connected = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EventDependencyFilter) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EventDependencyFilter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EventDependencyFilter: 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 ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - 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 Time", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Time == nil { - m.Time = &TimeFilter{} - } - if err := m.Time.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Context", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Context == nil { - m.Context = &common.EventContext{} - } - if err := m.Context.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data, DataFilter{}) - if err := m.Data[len(m.Data)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FileArtifact) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FileArtifact: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FileArtifact: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Path = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GitArtifact) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GitArtifact: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GitArtifact: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field URL", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.URL = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CloneDirectory", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CloneDirectory = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Creds", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Creds == nil { - m.Creds = &GitCreds{} - } - if err := m.Creds.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SSHKeyPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SSHKeyPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FilePath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FilePath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Branch", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Branch = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tag", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Tag = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Remote", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Remote == nil { - m.Remote = &GitRemoteConfig{} - } - if err := m.Remote.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GitCreds) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GitCreds: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GitCreds: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Username == nil { - m.Username = &v1.SecretKeySelector{} - } - if err := m.Username.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Password", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Password == nil { - m.Password = &v1.SecretKeySelector{} - } - if err := m.Password.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GitRemoteConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GitRemoteConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GitRemoteConfig: 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 ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - 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 URLS", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.URLS = append(m.URLS, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GroupVersionKind) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GroupVersionKind: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GroupVersionKind: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Group = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - 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 ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Kind = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NodeStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NodeStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NodeStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DisplayName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DisplayName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = NodeType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Phase", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Phase = NodePhase(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.StartedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CompletedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.CompletedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Event", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Event == nil { - m.Event = &common.Event{} - } - if err := m.Event.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ResourceObject) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResourceObject: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceObject: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Labels == nil { - m.Labels = 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 ErrIntOverflowGenerated - } - if iNdEx >= 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 ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenerated - } - 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 ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Labels[mapkey] = mapvalue - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Parameters", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Parameters = append(m.Parameters, ResourceParameter{}) - if err := m.Parameters[len(m.Parameters)-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 GroupVersionKind", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.GroupVersionKind.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ResourceParameter) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResourceParameter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceParameter: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Src", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Src == nil { - m.Src = &ResourceParameterSource{} - } - if err := m.Src.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Dest", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Dest = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ResourceParameterSource) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResourceParameterSource: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceParameterSource: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Event", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Event = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Path = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - 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 ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Value = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RetryStrategy) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RetryStrategy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RetryStrategy: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Sensor) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Sensor: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Sensor: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SensorList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SensorList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SensorList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, Sensor{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SensorSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SensorSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SensorSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Dependencies", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Dependencies = append(m.Dependencies, EventDependency{}) - if err := m.Dependencies[len(m.Dependencies)-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 Triggers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Triggers = append(m.Triggers, Trigger{}) - if err := m.Triggers[len(m.Triggers)-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 Template", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Template == nil { - m.Template = &v1.PodTemplateSpec{} - } - if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EventProtocol", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.EventProtocol == nil { - m.EventProtocol = &common.EventProtocol{} - } - if err := m.EventProtocol.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Circuit", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Circuit = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DependencyGroups", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DependencyGroups = append(m.DependencyGroups, DependencyGroup{}) - if err := m.DependencyGroups[len(m.DependencyGroups)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SensorStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SensorStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SensorStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Phase", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Phase = NodePhase(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StartedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.StartedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CompletedAt", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.CompletedAt.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Nodes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Nodes == nil { - m.Nodes = make(map[string]NodeStatus) - } - var mapkey string - mapvalue := &NodeStatus{} - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= 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 ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenerated - } - 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 ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthGenerated - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthGenerated - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &NodeStatus{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Nodes[mapkey] = *mapvalue - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CompletionCount", wireType) - } - m.CompletionCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CompletionCount |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TimeFilter) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TimeFilter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TimeFilter: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Start = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Stop", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Stop = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Trigger) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Trigger: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Trigger: 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 ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - 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 Resource", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Resource == nil { - m.Resource = &ResourceObject{} - } - if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RetryStrategy", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RetryStrategy == nil { - m.RetryStrategy = &RetryStrategy{} - } - if err := m.RetryStrategy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field When", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.When == nil { - m.When = &TriggerCondition{} - } - if err := m.When.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TriggerCondition) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TriggerCondition: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TriggerCondition: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Any", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Any = append(m.Any, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field All", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.All = append(m.All, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *URLArtifact) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: URLArtifact: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: URLArtifact: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - 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 ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Path = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field VerifyCert", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.VerifyCert = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenerated(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, ErrIntOverflowGenerated - } - 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, ErrIntOverflowGenerated - } - 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, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - iNdEx += length - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - return iNdEx, nil - case 3: - for { - var innerWire uint64 - var start int = iNdEx - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - 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 := skipGenerated(dAtA[start:]) - if err != nil { - return 0, err - } - iNdEx = start + next - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - } - 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 ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") -) diff --git a/pkg/apis/sensor/v1alpha1/generated.proto b/pkg/apis/sensor/v1alpha1/generated.proto index e24a1aa161..1030e8f383 100644 --- a/pkg/apis/sensor/v1alpha1/generated.proto +++ b/pkg/apis/sensor/v1alpha1/generated.proto @@ -20,6 +20,7 @@ syntax = 'proto2'; package github.com.argoproj.argo_events.pkg.apis.sensor.v1alpha1; import "github.com/argoproj/argo-events/pkg/apis/common/generated.proto"; +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; import "k8s.io/api/core/v1/generated.proto"; import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; import "k8s.io/apimachinery/pkg/runtime/generated.proto"; @@ -27,33 +28,42 @@ import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; // Package-wide variables from generator "generated". +option (gogoproto.marshaler_all) = true; +option (gogoproto.stable_marshaler_all) = true; +option (gogoproto.sizer_all) = true; +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.stringer_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.goproto_unrecognized_all) = false; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_getters_all) = false; option go_package = "v1alpha1"; // ArtifactLocation describes the source location for an external artifact message ArtifactLocation { - optional github.com.argoproj.argo_events.pkg.apis.common.S3Artifact s3 = 1; + optional github.com.argoproj.argo_events.pkg.apis.common.S3Artifact s3 = 1 [(gogoproto.customname) = "S3"]; - optional string inline = 2; + optional string inline = 2 [(gogoproto.customname) = "Inline"]; - optional FileArtifact file = 3; + optional FileArtifact file = 3 [(gogoproto.customname) = "File"]; - optional URLArtifact url = 4; + optional URLArtifact url = 4 [(gogoproto.customname) = "URL"]; - optional ConfigmapArtifact configmap = 5; + optional ConfigmapArtifact configmap = 5 [(gogoproto.customname) = "Configmap"]; - optional GitArtifact git = 6; + optional GitArtifact git = 6 [(gogoproto.customname) = "Git"]; } // ConfigmapArtifact contains information about artifact in k8 configmap message ConfigmapArtifact { // Name of the configmap - optional string name = 1; + optional string name = 1 [(gogoproto.customname) = "Name", (gogoproto.nullable) = false]; // Namespace where configmap is deployed - optional string namespace = 2; + optional string namespace = 2 [(gogoproto.customname) = "Namespace", (gogoproto.nullable) = false]; // Key within configmap data which contains trigger resource definition - optional string key = 3; + optional string key = 3 [(gogoproto.customname) = "Key", (gogoproto.nullable) = false]; } // DataFilter describes constraints and filters for event data @@ -64,131 +74,121 @@ message DataFilter { // Path is a series of keys separated by a dot. A key may contain wildcard characters '*' and '?'. // To access an array value use the index as the key. The dot and wildcard characters can be escaped with '\\'. // See https://github.com/tidwall/gjson#path-syntax for more information on how to use this. - optional string path = 1; + optional string path = 1 [(gogoproto.customname) = "Path", (gogoproto.nullable) = false]; // Type contains the JSON type of the data - optional string type = 2; + optional string type = 2 [(gogoproto.casttype) = "JSONType", (gogoproto.customname) = "Type", (gogoproto.nullable) = false]; // Value is the allowed string values for this key // Booleans are passed using strconv.ParseBool() // Numbers are parsed using as float64 using strconv.ParseFloat() // Strings are taken as is // Nils this value is ignored - repeated string value = 3; + repeated string value = 3 [(gogoproto.customname) = "Value"]; } // DependencyGroup is the group of dependencies message DependencyGroup { // Name of the group - optional string name = 1; + optional string name = 1 [(gogoproto.customname) = "Name", (gogoproto.nullable) = false]; // Dependencies of events - repeated string dependencies = 2; + repeated string dependencies = 2 [(gogoproto.customname) = "Dependencies"]; } // EventDependency describes a dependency message EventDependency { // Name is a unique name of this dependency - optional string name = 1; + optional string name = 1 [(gogoproto.customname) = "Name", (gogoproto.nullable) = false]; // Deadline is the duration in seconds after the StartedAt time of the sensor after which this event is terminated. // Note: this functionality is not yet respected, but it's theoretical behavior is as follows: // This trumps the recurrence patterns of calendar events and allows any event to have a strict defined life. // After the deadline is reached and this event has not in a Resolved state, this event is marked as Failed // and proper escalations should proceed. - optional int64 deadline = 2; + optional int64 deadline = 2 [(gogoproto.customname) = "Deadline", (gogoproto.nullable) = false]; // Filters and rules governing tolerations of success and constraints on the context and data of an event - optional EventDependencyFilter filters = 3; + optional EventDependencyFilter filters = 3 [(gogoproto.customname) = "Filters", (gogoproto.nullable) = false]; // Connected tells if subscription is already setup in case of nats protocol. - optional bool connected = 4; + optional bool connected = 4 [(gogoproto.customname) = "Connected", (gogoproto.nullable) = false]; } // EventDependencyFilter defines filters and constraints for a event. message EventDependencyFilter { // Name is the name of event filter - optional string name = 1; + optional string name = 1 [(gogoproto.customname) = "Name", (gogoproto.nullable) = false]; // Time filter on the event with escalation - optional TimeFilter time = 2; + optional TimeFilter time = 2 [(gogoproto.customname) = "Time"]; // Context filter constraints with escalation - optional github.com.argoproj.argo_events.pkg.apis.common.EventContext context = 3; + optional github.com.argoproj.argo_events.pkg.apis.common.EventContext context = 3 [(gogoproto.customname) = "Context"]; // Data filter constraints with escalation - repeated DataFilter data = 4; + repeated DataFilter data = 4 [(gogoproto.customname) = "Data", (gogoproto.nullable) = false]; } // FileArtifact contains information about an artifact in a filesystem message FileArtifact { - optional string path = 1; + optional string path = 1 [(gogoproto.customname) = "Path", (gogoproto.nullable) = false]; } // GitArtifact contains information about an artifact stored in git message GitArtifact { // Git URL - optional string url = 1; + optional string url = 1 [(gogoproto.customname) = "URL", (gogoproto.nullable) = false]; // Directory to clone the repository. We clone complete directory because GitArtifact is not limited to any specific Git service providers. // Hence we don't use any specific git provider client. - optional string cloneDirectory = 2; + optional string cloneDirectory = 2 [(gogoproto.customname) = "CloneDirectory", (gogoproto.nullable) = false]; // Creds contain reference to git username and password // +optional - optional GitCreds creds = 3; + optional GitCreds creds = 3 [(gogoproto.customname) = "Creds"]; // Namespace where creds are stored. // +optional - optional string namespace = 4; + optional string namespace = 4 [(gogoproto.customname) = "Namespace", (gogoproto.nullable) = false]; // SSHKeyPath is path to your ssh key path. Use this if you don't want to provide username and password. // ssh key path must be mounted in sensor pod. // +optional - optional string sshKeyPath = 5; + optional string sshKeyPath = 5 [(gogoproto.customname) = "SSHKeyPath", (gogoproto.nullable) = false]; // Path to file that contains trigger resource definition - optional string filePath = 6; + optional string filePath = 6 [(gogoproto.customname) = "FilePath", (gogoproto.nullable) = false]; // Branch to use to pull trigger resource // +optional - optional string branch = 7; + optional string branch = 7 [(gogoproto.customname) = "Branch", (gogoproto.nullable) = false]; // Tag to use to pull trigger resource // +optional - optional string tag = 8; + optional string tag = 8 [(gogoproto.customname) = "Tag", (gogoproto.nullable) = false]; // Remote to manage set of tracked repositories. Defaults to "origin". // Refer https://git-scm.com/docs/git-remote // +optional - optional GitRemoteConfig remote = 9; + optional GitRemoteConfig remote = 9 [(gogoproto.customname) = "Remote"]; } // GitCreds contain reference to git username and password message GitCreds { - optional k8s.io.api.core.v1.SecretKeySelector username = 1; + optional k8s.io.api.core.v1.SecretKeySelector username = 1 [(gogoproto.customname) = "Username"]; - optional k8s.io.api.core.v1.SecretKeySelector password = 2; + optional k8s.io.api.core.v1.SecretKeySelector password = 2 [(gogoproto.customname) = "Password"]; } // GitRemoteConfig contains the configuration of a Git remote message GitRemoteConfig { // Name of the remote to fetch from. - optional string name = 1; + optional string name = 1 [(gogoproto.customname) = "Name", (gogoproto.nullable) = false]; // URLs the URLs of a remote repository. It must be non-empty. Fetch will // always use the first URL, while push will use all of them. - repeated string urls = 2; -} - -// GroupVersionKind unambiguously identifies a kind. It doesn't anonymously include GroupVersion -// to avoid automatic coercion. It doesn't use a GroupVersion to avoid custom marshalling. -message GroupVersionKind { - optional string group = 1; - - optional string version = 2; - - optional string kind = 3; + repeated string urls = 2 [(gogoproto.customname) = "URLS"]; } // NodeStatus describes the status for an individual node in the sensor's FSM. @@ -196,85 +196,31 @@ message GroupVersionKind { message NodeStatus { // ID is a unique identifier of a node within a sensor // It is a hash of the node name - optional string id = 1; + optional string id = 1 [(gogoproto.customname) = "ID", (gogoproto.nullable) = false]; // Name is a unique name in the node tree used to generate the node ID - optional string name = 2; + optional string name = 2 [(gogoproto.customname) = "Name", (gogoproto.nullable) = false]; // DisplayName is the human readable representation of the node - optional string displayName = 3; + optional string displayName = 3 [(gogoproto.customname) = "DisplayName", (gogoproto.nullable) = false]; // Type is the type of the node - optional string type = 4; + optional string type = 4 [(gogoproto.casttype) = "NodeType", (gogoproto.customname) = "Type", (gogoproto.nullable) = false]; // Phase of the node - optional string phase = 5; + optional string phase = 5 [(gogoproto.casttype) = "NodePhase", (gogoproto.customname) = "Phase", (gogoproto.nullable) = false]; // StartedAt is the time at which this node started - optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime startedAt = 6; + optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime startedAt = 6 [(gogoproto.customname) = "StartedAt", (gogoproto.nullable) = false]; // CompletedAt is the time at which this node completed - optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime completedAt = 7; + optional k8s.io.apimachinery.pkg.apis.meta.v1.MicroTime completedAt = 7 [(gogoproto.customname) = "CompletedAt", (gogoproto.nullable) = false]; // store data or something to save for event notifications or trigger events - optional string message = 8; + optional string message = 8 [(gogoproto.customname) = "Message", (gogoproto.nullable) = false]; // Event stores the last seen event for this node - optional github.com.argoproj.argo_events.pkg.apis.common.Event event = 9; -} - -// ResourceObject is the resource object to create on kubernetes -message ResourceObject { - // The unambiguous kind of this object - used in order to retrieve the appropriate kubernetes api client for this resource - optional GroupVersionKind groupVersionKind = 5; - - // Namespace in which to create this object - // defaults to the sensor namespace - optional string namespace = 1; - - // Source of the K8 resource file(s) - optional ArtifactLocation source = 6; - - // Map of string keys and values that can be used to organize and categorize - // (scope and select) objects. This overrides any labels in the unstructured object with the same key. - map labels = 3; - - // Parameters is the list of resource parameters to pass in the object - repeated ResourceParameter parameters = 4; -} - -// ResourceParameter indicates a passed parameter to a service template -message ResourceParameter { - // Src contains a source reference to the value of the resource parameter from a event event - optional ResourceParameterSource src = 1; - - // Dest is the JSONPath of a resource key. - // A path is a series of keys separated by a dot. The colon character can be escaped with '.' - // The -1 key can be used to append a value to an existing array. - // See https://github.com/tidwall/sjson#path-syntax for more information about how this is used. - optional string dest = 2; -} - -// ResourceParameterSource defines the source for a resource parameter from a event event -message ResourceParameterSource { - // Event is the name of the event for which to retrieve this event - optional string event = 1; - - // Path is the JSONPath of the event's (JSON decoded) data key - // Path is a series of keys separated by a dot. A key may contain wildcard characters '*' and '?'. - // To access an array value use the index as the key. The dot and wildcard characters can be escaped with '\\'. - // See https://github.com/tidwall/gjson#path-syntax for more information on how to use this. - optional string path = 2; - - // Value is the default literal value to use for this parameter source - // This is only used if the path is invalid. - // If the path is invalid and this is not defined, this param source will produce an error. - optional string value = 3; -} - -// RetryStrategy represents a strategy for retrying operations -// TODO: implement me -message RetryStrategy { + optional github.com.argoproj.argo_events.pkg.apis.common.Event event = 9 [(gogoproto.customname) = "Event"]; } // Sensor is the definition of a sensor resource @@ -283,62 +229,62 @@ message RetryStrategy { // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:openapi-gen=true message Sensor { - optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1 [(gogoproto.customname) = "ObjectMeta", (gogoproto.nullable) = false]; - optional SensorSpec spec = 2; + optional SensorSpec spec = 2 [(gogoproto.customname) = "Spec", (gogoproto.nullable) = false]; - optional SensorStatus status = 3; + optional SensorStatus status = 3 [(gogoproto.customname) = "Status", (gogoproto.nullable) = false]; } // SensorList is the list of Sensor resources // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object message SensorList { - optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; + optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1 [(gogoproto.customname) = "ListMeta", (gogoproto.nullable) = false]; - repeated Sensor items = 2; + repeated Sensor items = 2 [(gogoproto.customname) = "Items", (gogoproto.nullable) = false]; } // SensorSpec represents desired sensor state message SensorSpec { // Dependencies is a list of the events that this sensor is dependent on. - repeated EventDependency dependencies = 1; + repeated EventDependency dependencies = 1 [(gogoproto.customname) = "Dependencies", (gogoproto.nullable) = false]; // Triggers is a list of the things that this sensor evokes. These are the outputs from this sensor. - repeated Trigger triggers = 2; + repeated Trigger triggers = 2 [(gogoproto.customname) = "Triggers", (gogoproto.nullable) = false]; // Template contains sensor pod specification. For more information, read https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#pod-v1-core - optional k8s.io.api.core.v1.PodTemplateSpec template = 3; + optional k8s.io.api.core.v1.PodTemplateSpec template = 3 [(gogoproto.customname) = "Template"]; // EventProtocol is the protocol through which sensor receives events from gateway - optional github.com.argoproj.argo_events.pkg.apis.common.EventProtocol eventProtocol = 4; + optional github.com.argoproj.argo_events.pkg.apis.common.EventProtocol eventProtocol = 4 [(gogoproto.customname) = "EventProtocol"]; // Circuit is a boolean expression of dependency groups - optional string circuit = 5; + optional string circuit = 5 [(gogoproto.customname) = "Circuit", (gogoproto.nullable) = false]; // DependencyGroups is a list of the groups of events. - repeated DependencyGroup dependencyGroups = 6; + repeated DependencyGroup dependencyGroups = 6 [(gogoproto.customname) = "DependencyGroups", (gogoproto.nullable) = false]; } // SensorStatus contains information about the status of a sensor. message SensorStatus { // Phase is the high-level summary of the sensor - optional string phase = 1; + optional string phase = 1 [(gogoproto.casttype) = "NodePhase", (gogoproto.customname) = "Phase", (gogoproto.nullable) = false]; // StartedAt is the time at which this sensor was initiated - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startedAt = 2; + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time startedAt = 2 [(gogoproto.customname) = "StartedAt", (gogoproto.nullable) = false]; // CompletedAt is the time at which this sensor was completed - optional k8s.io.apimachinery.pkg.apis.meta.v1.Time completedAt = 3; + optional k8s.io.apimachinery.pkg.apis.meta.v1.Time completedAt = 3 [(gogoproto.customname) = "CompletedAt", (gogoproto.nullable) = false]; // CompletionCount is the count of sensor's successful runs. - optional int32 completionCount = 6; + optional int32 completionCount = 6 [(gogoproto.customname) = "CompletionCount", (gogoproto.nullable) = false]; // Message is a human readable string indicating details about a sensor in its phase - optional string message = 4; + optional string message = 4 [(gogoproto.customname) = "Message", (gogoproto.nullable) = false]; // Nodes is a mapping between a node ID and the node's status // it records the states for the FSM of this sensor. - map nodes = 5; + map nodes = 5 [(gogoproto.customname) = "Nodes", (gogoproto.nullable) = false]; } // TimeFilter describes a window in time. @@ -349,46 +295,84 @@ message TimeFilter { // Start is the beginning of a time window. // Before this time, events for this event are ignored and // format is hh:mm:ss - optional string start = 1; + optional string start = 1 [(gogoproto.customname) = "Start", (gogoproto.nullable) = false]; // StopPattern is the end of a time window. // After this time, events for this event are ignored and // format is hh:mm:ss - optional string stop = 2; + optional string stop = 2 [(gogoproto.customname) = "Stop", (gogoproto.nullable) = false]; } // Trigger is an action taken, output produced, an event created, a message sent message Trigger { - // Name is a unique name of the action to take - optional string name = 1; - - // Resource describes the resource that will be created by this action - optional ResourceObject resource = 2; + // Template describes the trigger specification. + optional TriggerTemplate template = 1 [(gogoproto.customname) = "Template"]; - // Message describes a message that will be sent on a queue - optional string message = 3; + // TemplateParameters is the list of resource parameters to pass to the template object + repeated TriggerParameter templateParameters = 2 [(gogoproto.customname) = "TemplateParameters", (gogoproto.nullable) = false]; - // RetryStrategy is the strategy to retry a trigger if it fails - optional RetryStrategy replyStrategy = 4; - - // When is the condition to execute the trigger - optional TriggerCondition when = 5; + // ResourceParameters is the list of resource parameters to pass to resolved resource object in template object + repeated TriggerParameter resourceParameters = 3 [(gogoproto.customname) = "ResourceParameters", (gogoproto.nullable) = false]; } // TriggerCondition describes condition which must be satisfied in order to execute a trigger. // Depending upon condition type, status of dependency groups is used to evaluate the result. message TriggerCondition { // Any acts as a OR operator between dependencies - repeated string any = 1; + repeated string any = 1 [(gogoproto.customname) = "Any"]; // All acts as a AND operator between dependencies - repeated string all = 2; + repeated string all = 2 [(gogoproto.customname) = "All"]; +} + +// TriggerParameter indicates a passed parameter to a service template +message TriggerParameter { + // Src contains a source reference to the value of the parameter from a event event + optional TriggerParameterSource src = 1 [(gogoproto.customname) = "Src"]; + + // Dest is the JSONPath of a resource key. + // A path is a series of keys separated by a dot. The colon character can be escaped with '.' + // The -1 key can be used to append a value to an existing array. + // See https://github.com/tidwall/sjson#path-syntax for more information about how this is used. + optional string dest = 2 [(gogoproto.customname) = "Dest", (gogoproto.nullable) = false]; +} + +// TriggerParameterSource defines the source for a parameter from a event event +message TriggerParameterSource { + // Event is the name of the event for which to retrieve this event + optional string event = 1 [(gogoproto.customname) = "Event", (gogoproto.nullable) = false]; + + // Path is the JSONPath of the event's (JSON decoded) data key + // Path is a series of keys separated by a dot. A key may contain wildcard characters '*' and '?'. + // To access an array value use the index as the key. The dot and wildcard characters can be escaped with '\\'. + // See https://github.com/tidwall/gjson#path-syntax for more information on how to use this. + optional string path = 2 [(gogoproto.customname) = "Path", (gogoproto.nullable) = false]; + + // Value is the default literal value to use for this parameter source + // This is only used if the path is invalid. + // If the path is invalid and this is not defined, this param source will produce an error. + optional string value = 3 [(gogoproto.customname) = "Value"]; +} + +// TriggerTemplate is the template that describes trigger specification. +message TriggerTemplate { + // Name is a unique name of the action to take + optional string name = 1 [(gogoproto.customname) = "Name", (gogoproto.nullable) = false]; + + // When is the condition to execute the trigger + optional TriggerCondition when = 4 [(gogoproto.customname) = "When"]; + + // The unambiguous kind of this object - used in order to retrieve the appropriate kubernetes api client for this resource + optional k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionKind groupVersionKind = 5 [(gogoproto.customname) = "GroupVersionKind"]; + + // Source of the K8 resource file(s) + optional ArtifactLocation source = 6 [(gogoproto.customname) = "Source"]; } // URLArtifact contains information about an artifact at an http endpoint. message URLArtifact { - optional string path = 1; + optional string path = 1 [(gogoproto.customname) = "Path", (gogoproto.nullable) = false]; - optional bool verifyCert = 2; + optional bool verifyCert = 2 [(gogoproto.customname) = "VerifyCert", (gogoproto.nullable) = false]; } diff --git a/pkg/apis/sensor/v1alpha1/openapi_generated.go b/pkg/apis/sensor/v1alpha1/openapi_generated.go index 74ad473592..f7d6af29e3 100644 --- a/pkg/apis/sensor/v1alpha1/openapi_generated.go +++ b/pkg/apis/sensor/v1alpha1/openapi_generated.go @@ -28,30 +28,28 @@ import ( func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition { return map[string]common.OpenAPIDefinition{ - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.ArtifactLocation": schema_pkg_apis_sensor_v1alpha1_ArtifactLocation(ref), - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.ConfigmapArtifact": schema_pkg_apis_sensor_v1alpha1_ConfigmapArtifact(ref), - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.DataFilter": schema_pkg_apis_sensor_v1alpha1_DataFilter(ref), - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.DependencyGroup": schema_pkg_apis_sensor_v1alpha1_DependencyGroup(ref), - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.EventDependency": schema_pkg_apis_sensor_v1alpha1_EventDependency(ref), - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.EventDependencyFilter": schema_pkg_apis_sensor_v1alpha1_EventDependencyFilter(ref), - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.FileArtifact": schema_pkg_apis_sensor_v1alpha1_FileArtifact(ref), - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.GitArtifact": schema_pkg_apis_sensor_v1alpha1_GitArtifact(ref), - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.GitCreds": schema_pkg_apis_sensor_v1alpha1_GitCreds(ref), - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.GitRemoteConfig": schema_pkg_apis_sensor_v1alpha1_GitRemoteConfig(ref), - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.GroupVersionKind": schema_pkg_apis_sensor_v1alpha1_GroupVersionKind(ref), - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.NodeStatus": schema_pkg_apis_sensor_v1alpha1_NodeStatus(ref), - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.ResourceObject": schema_pkg_apis_sensor_v1alpha1_ResourceObject(ref), - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.ResourceParameter": schema_pkg_apis_sensor_v1alpha1_ResourceParameter(ref), - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.ResourceParameterSource": schema_pkg_apis_sensor_v1alpha1_ResourceParameterSource(ref), - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.RetryStrategy": schema_pkg_apis_sensor_v1alpha1_RetryStrategy(ref), - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.Sensor": schema_pkg_apis_sensor_v1alpha1_Sensor(ref), - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.SensorList": schema_pkg_apis_sensor_v1alpha1_SensorList(ref), - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.SensorSpec": schema_pkg_apis_sensor_v1alpha1_SensorSpec(ref), - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.SensorStatus": schema_pkg_apis_sensor_v1alpha1_SensorStatus(ref), - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.TimeFilter": schema_pkg_apis_sensor_v1alpha1_TimeFilter(ref), - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.Trigger": schema_pkg_apis_sensor_v1alpha1_Trigger(ref), - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.TriggerCondition": schema_pkg_apis_sensor_v1alpha1_TriggerCondition(ref), - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.URLArtifact": schema_pkg_apis_sensor_v1alpha1_URLArtifact(ref), + "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.ArtifactLocation": schema_pkg_apis_sensor_v1alpha1_ArtifactLocation(ref), + "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.ConfigmapArtifact": schema_pkg_apis_sensor_v1alpha1_ConfigmapArtifact(ref), + "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.DataFilter": schema_pkg_apis_sensor_v1alpha1_DataFilter(ref), + "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.DependencyGroup": schema_pkg_apis_sensor_v1alpha1_DependencyGroup(ref), + "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.EventDependency": schema_pkg_apis_sensor_v1alpha1_EventDependency(ref), + "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.EventDependencyFilter": schema_pkg_apis_sensor_v1alpha1_EventDependencyFilter(ref), + "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.FileArtifact": schema_pkg_apis_sensor_v1alpha1_FileArtifact(ref), + "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.GitArtifact": schema_pkg_apis_sensor_v1alpha1_GitArtifact(ref), + "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.GitCreds": schema_pkg_apis_sensor_v1alpha1_GitCreds(ref), + "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.GitRemoteConfig": schema_pkg_apis_sensor_v1alpha1_GitRemoteConfig(ref), + "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.NodeStatus": schema_pkg_apis_sensor_v1alpha1_NodeStatus(ref), + "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.Sensor": schema_pkg_apis_sensor_v1alpha1_Sensor(ref), + "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.SensorList": schema_pkg_apis_sensor_v1alpha1_SensorList(ref), + "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.SensorSpec": schema_pkg_apis_sensor_v1alpha1_SensorSpec(ref), + "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.SensorStatus": schema_pkg_apis_sensor_v1alpha1_SensorStatus(ref), + "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.TimeFilter": schema_pkg_apis_sensor_v1alpha1_TimeFilter(ref), + "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.Trigger": schema_pkg_apis_sensor_v1alpha1_Trigger(ref), + "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.TriggerCondition": schema_pkg_apis_sensor_v1alpha1_TriggerCondition(ref), + "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.TriggerParameter": schema_pkg_apis_sensor_v1alpha1_TriggerParameter(ref), + "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.TriggerParameterSource": schema_pkg_apis_sensor_v1alpha1_TriggerParameterSource(ref), + "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.TriggerTemplate": schema_pkg_apis_sensor_v1alpha1_TriggerTemplate(ref), + "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.URLArtifact": schema_pkg_apis_sensor_v1alpha1_URLArtifact(ref), } } @@ -461,38 +459,6 @@ func schema_pkg_apis_sensor_v1alpha1_GitRemoteConfig(ref common.ReferenceCallbac } } -func schema_pkg_apis_sensor_v1alpha1_GroupVersionKind(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "GroupVersionKind unambiguously identifies a kind. It doesn't anonymously include GroupVersion to avoid automatic coercion. It doesn't use a GroupVersion to avoid custom marshalling.", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "group": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "version": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"group", "version", "kind"}, - }, - }, - } -} - func schema_pkg_apis_sensor_v1alpha1_NodeStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -569,156 +535,6 @@ func schema_pkg_apis_sensor_v1alpha1_NodeStatus(ref common.ReferenceCallback) co } } -func schema_pkg_apis_sensor_v1alpha1_ResourceObject(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceObject is the resource object to create on kubernetes", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "group": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "version": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "kind": { - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - "namespace": { - SchemaProps: spec.SchemaProps{ - Description: "Namespace in which to create this object defaults to the sensor namespace", - Type: []string{"string"}, - Format: "", - }, - }, - "source": { - SchemaProps: spec.SchemaProps{ - Description: "Source of the K8 resource file(s)", - Ref: ref("github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.ArtifactLocation"), - }, - }, - "labels": { - SchemaProps: spec.SchemaProps{ - Description: "Map of string keys and values that can be used to organize and categorize (scope and select) objects. This overrides any labels in the unstructured object with the same key.", - Type: []string{"object"}, - AdditionalProperties: &spec.SchemaOrBool{ - Allows: true, - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", - }, - }, - }, - }, - }, - "parameters": { - SchemaProps: spec.SchemaProps{ - Description: "Parameters is the list of resource parameters to pass in the object", - Type: []string{"array"}, - Items: &spec.SchemaOrArray{ - Schema: &spec.Schema{ - SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.ResourceParameter"), - }, - }, - }, - }, - }, - }, - Required: []string{"group", "version", "kind", "namespace", "source", "parameters"}, - }, - }, - Dependencies: []string{ - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.ArtifactLocation", "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.ResourceParameter"}, - } -} - -func schema_pkg_apis_sensor_v1alpha1_ResourceParameter(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceParameter indicates a passed parameter to a service template", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "src": { - SchemaProps: spec.SchemaProps{ - Description: "Src contains a source reference to the value of the resource parameter from a event event", - Ref: ref("github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.ResourceParameterSource"), - }, - }, - "dest": { - SchemaProps: spec.SchemaProps{ - Description: "Dest is the JSONPath of a resource key. A path is a series of keys separated by a dot. The colon character can be escaped with '.' The -1 key can be used to append a value to an existing array. See https://github.com/tidwall/sjson#path-syntax for more information about how this is used.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"src", "dest"}, - }, - }, - Dependencies: []string{ - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.ResourceParameterSource"}, - } -} - -func schema_pkg_apis_sensor_v1alpha1_ResourceParameterSource(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "ResourceParameterSource defines the source for a resource parameter from a event event", - Type: []string{"object"}, - Properties: map[string]spec.Schema{ - "event": { - SchemaProps: spec.SchemaProps{ - Description: "Event is the name of the event for which to retrieve this event", - Type: []string{"string"}, - Format: "", - }, - }, - "path": { - SchemaProps: spec.SchemaProps{ - Description: "Path is the JSONPath of the event's (JSON decoded) data key Path is a series of keys separated by a dot. A key may contain wildcard characters '*' and '?'. To access an array value use the index as the key. The dot and wildcard characters can be escaped with '\\'. See https://github.com/tidwall/gjson#path-syntax for more information on how to use this.", - Type: []string{"string"}, - Format: "", - }, - }, - "value": { - SchemaProps: spec.SchemaProps{ - Description: "Value is the default literal value to use for this parameter source This is only used if the path is invalid. If the path is invalid and this is not defined, this param source will produce an error.", - Type: []string{"string"}, - Format: "", - }, - }, - }, - Required: []string{"event", "path"}, - }, - }, - } -} - -func schema_pkg_apis_sensor_v1alpha1_RetryStrategy(ref common.ReferenceCallback) common.OpenAPIDefinition { - return common.OpenAPIDefinition{ - Schema: spec.Schema{ - SchemaProps: spec.SchemaProps{ - Description: "RetryStrategy represents a strategy for retrying operations", - Type: []string{"object"}, - }, - }, - } -} - func schema_pkg_apis_sensor_v1alpha1_Sensor(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -982,44 +798,44 @@ func schema_pkg_apis_sensor_v1alpha1_Trigger(ref common.ReferenceCallback) commo Description: "Trigger is an action taken, output produced, an event created, a message sent", Type: []string{"object"}, Properties: map[string]spec.Schema{ - "name": { - SchemaProps: spec.SchemaProps{ - Description: "Name is a unique name of the action to take", - Type: []string{"string"}, - Format: "", - }, - }, - "resource": { - SchemaProps: spec.SchemaProps{ - Description: "Resource describes the resource that will be created by this action", - Ref: ref("github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.ResourceObject"), - }, - }, - "message": { + "template": { SchemaProps: spec.SchemaProps{ - Description: "Message describes a message that will be sent on a queue", - Type: []string{"string"}, - Format: "", + Description: "Template describes the trigger specification.", + Ref: ref("github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.TriggerTemplate"), }, }, - "retryStrategy": { + "templateParameters": { SchemaProps: spec.SchemaProps{ - Description: "RetryStrategy is the strategy to retry a trigger if it fails", - Ref: ref("github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.RetryStrategy"), + Description: "TemplateParameters is the list of resource parameters to pass to the template object", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.TriggerParameter"), + }, + }, + }, }, }, - "when": { + "resourceParameters": { SchemaProps: spec.SchemaProps{ - Description: "When is the condition to execute the trigger", - Ref: ref("github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.TriggerCondition"), + Description: "ResourceParameters is the list of resource parameters to pass to resolved resource object in template object", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Ref: ref("github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.TriggerParameter"), + }, + }, + }, }, }, }, - Required: []string{"name"}, + Required: []string{"template"}, }, }, Dependencies: []string{ - "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.ResourceObject", "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.RetryStrategy", "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.TriggerCondition"}, + "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.TriggerParameter", "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.TriggerTemplate"}, } } @@ -1064,6 +880,105 @@ func schema_pkg_apis_sensor_v1alpha1_TriggerCondition(ref common.ReferenceCallba } } +func schema_pkg_apis_sensor_v1alpha1_TriggerParameter(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TriggerParameter indicates a passed parameter to a service template", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "src": { + SchemaProps: spec.SchemaProps{ + Description: "Src contains a source reference to the value of the parameter from a event event", + Ref: ref("github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.TriggerParameterSource"), + }, + }, + "dest": { + SchemaProps: spec.SchemaProps{ + Description: "Dest is the JSONPath of a resource key. A path is a series of keys separated by a dot. The colon character can be escaped with '.' The -1 key can be used to append a value to an existing array. See https://github.com/tidwall/sjson#path-syntax for more information about how this is used.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"src", "dest"}, + }, + }, + Dependencies: []string{ + "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.TriggerParameterSource"}, + } +} + +func schema_pkg_apis_sensor_v1alpha1_TriggerParameterSource(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TriggerParameterSource defines the source for a parameter from a event event", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "event": { + SchemaProps: spec.SchemaProps{ + Description: "Event is the name of the event for which to retrieve this event", + Type: []string{"string"}, + Format: "", + }, + }, + "path": { + SchemaProps: spec.SchemaProps{ + Description: "Path is the JSONPath of the event's (JSON decoded) data key Path is a series of keys separated by a dot. A key may contain wildcard characters '*' and '?'. To access an array value use the index as the key. The dot and wildcard characters can be escaped with '\\'. See https://github.com/tidwall/gjson#path-syntax for more information on how to use this.", + Type: []string{"string"}, + Format: "", + }, + }, + "value": { + SchemaProps: spec.SchemaProps{ + Description: "Value is the default literal value to use for this parameter source This is only used if the path is invalid. If the path is invalid and this is not defined, this param source will produce an error.", + Type: []string{"string"}, + Format: "", + }, + }, + }, + Required: []string{"event", "path"}, + }, + }, + } +} + +func schema_pkg_apis_sensor_v1alpha1_TriggerTemplate(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "TriggerTemplate is the template that describes trigger specification.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "Name is a unique name of the action to take", + Type: []string{"string"}, + Format: "", + }, + }, + "when": { + SchemaProps: spec.SchemaProps{ + Description: "When is the condition to execute the trigger", + Ref: ref("github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.TriggerCondition"), + }, + }, + "source": { + SchemaProps: spec.SchemaProps{ + Description: "Source of the K8 resource file(s)", + Ref: ref("github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.ArtifactLocation"), + }, + }, + }, + Required: []string{"name", "source"}, + }, + }, + Dependencies: []string{ + "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.ArtifactLocation", "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1.TriggerCondition"}, + } +} + func schema_pkg_apis_sensor_v1alpha1_URLArtifact(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/pkg/apis/sensor/v1alpha1/types.go b/pkg/apis/sensor/v1alpha1/types.go index 4d3487518d..d0b56f7fcb 100644 --- a/pkg/apis/sensor/v1alpha1/types.go +++ b/pkg/apis/sensor/v1alpha1/types.go @@ -22,9 +22,8 @@ import ( "github.com/argoproj/argo-events/pkg/apis/common" apicommon "github.com/argoproj/argo-events/pkg/apis/common" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // NotificationType represent a type of notifications that are handled by a sensor @@ -66,18 +65,18 @@ const ( // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object // +k8s:openapi-gen=true type Sensor struct { - v1.TypeMeta `json:",inline"` - v1.ObjectMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"` - Spec SensorSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` - Status SensorStatus `json:"status" protobuf:"bytes,3,opt,name=status"` + metav1.TypeMeta `json:",inline"` + metav1.ObjectMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"` + Spec SensorSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` + Status SensorStatus `json:"status" protobuf:"bytes,3,opt,name=status"` } // SensorList is the list of Sensor resources // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object type SensorList struct { - v1.TypeMeta `json:",inline"` - v1.ListMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"` - Items []Sensor `json:"items" protobuf:"bytes,2,rep,name=items"` + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"` + Items []Sensor `json:"items" protobuf:"bytes,2,rep,name=items"` } // SensorSpec represents desired sensor state @@ -128,14 +127,6 @@ type DependencyGroup struct { Dependencies []string `json:"dependencies" protobuf:"bytes,2,name=dependencies"` } -// GroupVersionKind unambiguously identifies a kind. It doesn't anonymously include GroupVersion -// to avoid automatic coercion. It doesn't use a GroupVersion to avoid custom marshalling. -type GroupVersionKind struct { - Group string `json:"group" protobuf:"bytes,1,name=group"` - Version string `json:"version" protobuf:"bytes,2,name=version"` - Kind string `json:"kind" protobuf:"bytes,3,name=kind"` -} - // EventDependencyFilter defines filters and constraints for a event. type EventDependencyFilter struct { // Name is the name of event filter @@ -200,20 +191,29 @@ type DataFilter struct { // Trigger is an action taken, output produced, an event created, a message sent type Trigger struct { - // Name is a unique name of the action to take - Name string `json:"name" protobuf:"bytes,1,name=name"` + // Template describes the trigger specification. + Template *TriggerTemplate `json:"template" protobuf:"bytes,1,name=template"` - // Resource describes the resource that will be created by this action - Resource *ResourceObject `json:"resource,omitempty" protobuf:"bytes,2,opt,name=resource"` + // TemplateParameters is the list of resource parameters to pass to the template object + TemplateParameters []TriggerParameter `json:"templateParameters,omitempty" protobuf:"bytes,2,rep,name=templateParameters"` - // Message describes a message that will be sent on a queue - Message string `json:"message,omitempty" protobuf:"bytes,3,opt,name=message"` + // ResourceParameters is the list of resource parameters to pass to resolved resource object in template object + ResourceParameters []TriggerParameter `json:"resourceParameters,omitempty" protobuf:"bytes,3,rep,name=resourceParameters"` +} - // RetryStrategy is the strategy to retry a trigger if it fails - RetryStrategy *RetryStrategy `json:"retryStrategy,omitempty" protobuf:"bytes,4,opt,name=replyStrategy"` +// TriggerTemplate is the template that describes trigger specification. +type TriggerTemplate struct { + // Name is a unique name of the action to take + Name string `json:"name" protobuf:"bytes,1,name=name"` // When is the condition to execute the trigger - When *TriggerCondition `json:"when,omitempty" protobuf:"bytes,5,opt,name=when"` + When *TriggerCondition `json:"when,omitempty" protobuf:"bytes,4,opt,name=when"` + + // The unambiguous kind of this object - used in order to retrieve the appropriate kubernetes api client for this resource + *metav1.GroupVersionKind `json:",inline" protobuf:"bytes,5,opt,name=groupVersionKind"` + + // Source of the K8 resource file(s) + Source *ArtifactLocation `json:"source" protobuf:"bytes,6,opt,name=source"` } // TriggerCondition describes condition which must be satisfied in order to execute a trigger. @@ -226,10 +226,10 @@ type TriggerCondition struct { All []string `json:"all,omitempty" protobuf:"bytes,2,rep,name=all"` } -// ResourceParameter indicates a passed parameter to a service template -type ResourceParameter struct { - // Src contains a source reference to the value of the resource parameter from a event event - Src *ResourceParameterSource `json:"src" protobuf:"bytes,1,name=src"` +// TriggerParameter indicates a passed parameter to a service template +type TriggerParameter struct { + // Src contains a source reference to the value of the parameter from a event event + Src *TriggerParameterSource `json:"src" protobuf:"bytes,1,name=src"` // Dest is the JSONPath of a resource key. // A path is a series of keys separated by a dot. The colon character can be escaped with '.' @@ -238,8 +238,8 @@ type ResourceParameter struct { Dest string `json:"dest" protobuf:"bytes,2,name=dest"` } -// ResourceParameterSource defines the source for a resource parameter from a event event -type ResourceParameterSource struct { +// TriggerParameterSource defines the source for a parameter from a event event +type TriggerParameterSource struct { // Event is the name of the event for which to retrieve this event Event string `json:"event" protobuf:"bytes,1,opt,name=event"` @@ -255,41 +255,16 @@ type ResourceParameterSource struct { Value *string `json:"value,omitempty" protobuf:"bytes,3,opt,name=value"` } -// ResourceObject is the resource object to create on kubernetes -type ResourceObject struct { - // The unambiguous kind of this object - used in order to retrieve the appropriate kubernetes api client for this resource - GroupVersionKind `json:",inline" protobuf:"bytes,5,opt,name=groupVersionKind"` - - // Namespace in which to create this object - // defaults to the sensor namespace - Namespace string `json:"namespace" protobuf:"bytes,1,opt,name=namespace"` - - // Source of the K8 resource file(s) - Source ArtifactLocation `json:"source" protobuf:"bytes,6,opt,name=source"` - - // Map of string keys and values that can be used to organize and categorize - // (scope and select) objects. This overrides any labels in the unstructured object with the same key. - Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,3,rep,name=labels"` - - // Parameters is the list of resource parameters to pass in the object - Parameters []ResourceParameter `json:"parameters" protobuf:"bytes,4,rep,name=parameters"` -} - -// RetryStrategy represents a strategy for retrying operations -// TODO: implement me -type RetryStrategy struct { -} - // SensorStatus contains information about the status of a sensor. type SensorStatus struct { // Phase is the high-level summary of the sensor Phase NodePhase `json:"phase" protobuf:"bytes,1,opt,name=phase"` // StartedAt is the time at which this sensor was initiated - StartedAt v1.Time `json:"startedAt,omitempty" protobuf:"bytes,2,opt,name=startedAt"` + StartedAt metav1.Time `json:"startedAt,omitempty" protobuf:"bytes,2,opt,name=startedAt"` // CompletedAt is the time at which this sensor was completed - CompletedAt v1.Time `json:"completedAt,omitempty" protobuf:"bytes,3,opt,name=completedAt"` + CompletedAt metav1.Time `json:"completedAt,omitempty" protobuf:"bytes,3,opt,name=completedAt"` // CompletionCount is the count of sensor's successful runs. CompletionCount int32 `json:"completionCount,omitempty" protobuf:"varint,6,opt,name=completionCount"` @@ -322,10 +297,10 @@ type NodeStatus struct { Phase NodePhase `json:"phase" protobuf:"bytes,5,opt,name=phase"` // StartedAt is the time at which this node started - StartedAt v1.MicroTime `json:"startedAt,omitempty" protobuf:"bytes,6,opt,name=startedAt"` + StartedAt metav1.MicroTime `json:"startedAt,omitempty" protobuf:"bytes,6,opt,name=startedAt"` // CompletedAt is the time at which this node completed - CompletedAt v1.MicroTime `json:"completedAt,omitempty" protobuf:"bytes,7,opt,name=completedAt"` + CompletedAt metav1.MicroTime `json:"completedAt,omitempty" protobuf:"bytes,7,opt,name=completedAt"` // store data or something to save for event notifications or trigger events Message string `json:"message,omitempty" protobuf:"bytes,8,opt,name=message"` diff --git a/pkg/apis/sensor/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/sensor/v1alpha1/zz_generated.deepcopy.go index e33849080f..03e342235d 100644 --- a/pkg/apis/sensor/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/sensor/v1alpha1/zz_generated.deepcopy.go @@ -22,6 +22,7 @@ package v1alpha1 import ( "github.com/argoproj/argo-events/pkg/apis/common" "k8s.io/api/core/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" ) @@ -268,22 +269,6 @@ func (in *GitRemoteConfig) DeepCopy() *GitRemoteConfig { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GroupVersionKind) DeepCopyInto(out *GroupVersionKind) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupVersionKind. -func (in *GroupVersionKind) DeepCopy() *GroupVersionKind { - if in == nil { - return nil - } - out := new(GroupVersionKind) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NodeStatus) DeepCopyInto(out *NodeStatus) { *out = *in @@ -307,96 +292,6 @@ func (in *NodeStatus) DeepCopy() *NodeStatus { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceObject) DeepCopyInto(out *ResourceObject) { - *out = *in - out.GroupVersionKind = in.GroupVersionKind - in.Source.DeepCopyInto(&out.Source) - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Parameters != nil { - in, out := &in.Parameters, &out.Parameters - *out = make([]ResourceParameter, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceObject. -func (in *ResourceObject) DeepCopy() *ResourceObject { - if in == nil { - return nil - } - out := new(ResourceObject) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceParameter) DeepCopyInto(out *ResourceParameter) { - *out = *in - if in.Src != nil { - in, out := &in.Src, &out.Src - *out = new(ResourceParameterSource) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceParameter. -func (in *ResourceParameter) DeepCopy() *ResourceParameter { - if in == nil { - return nil - } - out := new(ResourceParameter) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceParameterSource) DeepCopyInto(out *ResourceParameterSource) { - *out = *in - if in.Value != nil { - in, out := &in.Value, &out.Value - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceParameterSource. -func (in *ResourceParameterSource) DeepCopy() *ResourceParameterSource { - if in == nil { - return nil - } - out := new(ResourceParameterSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RetryStrategy) DeepCopyInto(out *RetryStrategy) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RetryStrategy. -func (in *RetryStrategy) DeepCopy() *RetryStrategy { - if in == nil { - return nil - } - out := new(RetryStrategy) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Sensor) DeepCopyInto(out *Sensor) { *out = *in @@ -549,20 +444,24 @@ func (in *TimeFilter) DeepCopy() *TimeFilter { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Trigger) DeepCopyInto(out *Trigger) { *out = *in - if in.Resource != nil { - in, out := &in.Resource, &out.Resource - *out = new(ResourceObject) + if in.Template != nil { + in, out := &in.Template, &out.Template + *out = new(TriggerTemplate) (*in).DeepCopyInto(*out) } - if in.RetryStrategy != nil { - in, out := &in.RetryStrategy, &out.RetryStrategy - *out = new(RetryStrategy) - **out = **in + if in.TemplateParameters != nil { + in, out := &in.TemplateParameters, &out.TemplateParameters + *out = make([]TriggerParameter, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } - if in.When != nil { - in, out := &in.When, &out.When - *out = new(TriggerCondition) - (*in).DeepCopyInto(*out) + if in.ResourceParameters != nil { + in, out := &in.ResourceParameters, &out.ResourceParameters + *out = make([]TriggerParameter, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } } return } @@ -603,6 +502,79 @@ func (in *TriggerCondition) DeepCopy() *TriggerCondition { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TriggerParameter) DeepCopyInto(out *TriggerParameter) { + *out = *in + if in.Src != nil { + in, out := &in.Src, &out.Src + *out = new(TriggerParameterSource) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TriggerParameter. +func (in *TriggerParameter) DeepCopy() *TriggerParameter { + if in == nil { + return nil + } + out := new(TriggerParameter) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TriggerParameterSource) DeepCopyInto(out *TriggerParameterSource) { + *out = *in + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TriggerParameterSource. +func (in *TriggerParameterSource) DeepCopy() *TriggerParameterSource { + if in == nil { + return nil + } + out := new(TriggerParameterSource) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TriggerTemplate) DeepCopyInto(out *TriggerTemplate) { + *out = *in + if in.When != nil { + in, out := &in.When, &out.When + *out = new(TriggerCondition) + (*in).DeepCopyInto(*out) + } + if in.GroupVersionKind != nil { + in, out := &in.GroupVersionKind, &out.GroupVersionKind + *out = new(metav1.GroupVersionKind) + **out = **in + } + if in.Source != nil { + in, out := &in.Source, &out.Source + *out = new(ArtifactLocation) + (*in).DeepCopyInto(*out) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TriggerTemplate. +func (in *TriggerTemplate) DeepCopy() *TriggerTemplate { + if in == nil { + return nil + } + out := new(TriggerTemplate) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *URLArtifact) DeepCopyInto(out *URLArtifact) { *out = *in diff --git a/sensors/event-handler.go b/sensors/event-handler.go index ef081caf68..e444a95279 100644 --- a/sensors/event-handler.go +++ b/sensors/event-handler.go @@ -135,9 +135,9 @@ func (sec *sensorExecutionCtx) processUpdateNotification(ew *updateNotification) // initialize new triggers for _, t := range sec.sensor.Spec.Triggers { - if node := sn.GetNodeByName(sec.sensor, t.Name); node == nil { + if node := sn.GetNodeByName(sec.sensor, t.Template.Name); node == nil { hasDependenciesUpdated = true - sn.InitializeNode(sec.sensor, t.Name, v1alpha1.NodeTypeTrigger, &sec.log) + sn.InitializeNode(sec.sensor, t.Template.Name, v1alpha1.NodeTypeTrigger, &sec.log) } } @@ -167,7 +167,7 @@ statusNodes: } } for _, trigger := range sec.sensor.Spec.Triggers { - if statusNode.Type == v1alpha1.NodeTypeTrigger && trigger.Name == statusNode.Name { + if statusNode.Type == v1alpha1.NodeTypeTrigger && trigger.Template.Name == statusNode.Name { continue statusNodes } } diff --git a/sensors/event-handler_test.go b/sensors/event-handler_test.go index 720dec7493..50cf206034 100644 --- a/sensors/event-handler_test.go +++ b/sensors/event-handler_test.go @@ -40,49 +40,49 @@ import ( "k8s.io/client-go/kubernetes/fake" ) -var sensorStr = `apiVersion: argoproj.io/v1alpha1 +var sensorStr = ` +apiVersion: argoproj.io/v1alpha1 kind: Sensor metadata: name: test-sensor labels: sensors.argoproj.io/sensor-controller-instanceid: argo-events spec: - deploySpec: + template: containers: - name: "sensor" image: "argoproj/sensor" imagePullPolicy: Always serviceAccountName: argo-events-sa + dependencies: + - name: "test-gateway:test" eventProtocol: type: "HTTP" http: port: "9300" - dependencies: - - name: test-gateway:test triggers: - - name: test-workflow-trigger - resource: - namespace: argo-events + - template: + name: test-workflow-trigger group: argoproj.io version: v1alpha1 kind: Workflow source: inline: | - apiVersion: argoproj.io/v1alpha1 - kind: Workflow - metadata: - generateName: hello-world- - spec: - entrypoint: whalesay - templates: - - - container: - args: - - "hello world" - command: - - cowsay - image: "docker/whalesay:latest" - name: whalesay` + apiVersion: argoproj.io/v1alpha1 + kind: Workflow + metadata: + generateName: hello-world- + spec: + entrypoint: whalesay + templates: + - name: whalesay + container: + args: + - "hello world" + command: + - cowsay + image: "docker/whalesay:latest" +` var podResourceList = metav1.APIResourceList{ GroupVersion: metav1.GroupVersion{Group: "", Version: "v1"}.String(), diff --git a/sensors/trigger-params.go b/sensors/trigger-params.go index 1cdbcf5e01..ffeaec0140 100644 --- a/sensors/trigger-params.go +++ b/sensors/trigger-params.go @@ -26,7 +26,7 @@ import ( ) // apply the params to the resource json object -func applyParams(jsonObj []byte, params []v1alpha1.ResourceParameter, events map[string]apicommon.Event) ([]byte, error) { +func applyParams(jsonObj []byte, params []v1alpha1.TriggerParameter, events map[string]apicommon.Event) ([]byte, error) { for _, param := range params { // let's grab the param value v, err := resolveParamValue(param.Src, events) @@ -45,7 +45,7 @@ func applyParams(jsonObj []byte, params []v1alpha1.ResourceParameter, events map // helper method to resolve the parameter's value from the src // returns an error if the Path is invalid/not found and the default value is nil OR if the eventDependency event doesn't exist and default value is nil -func resolveParamValue(src *v1alpha1.ResourceParameterSource, events map[string]apicommon.Event) (string, error) { +func resolveParamValue(src *v1alpha1.TriggerParameterSource, events map[string]apicommon.Event) (string, error) { if e, ok := events[src.Event]; ok { // only convert payload to json when path is set. if src.Path == "" { diff --git a/sensors/trigger-params_test.go b/sensors/trigger-params_test.go index 0590f5c618..c67fc27f97 100644 --- a/sensors/trigger-params_test.go +++ b/sensors/trigger-params_test.go @@ -44,7 +44,7 @@ func Test_applyParams(t *testing.T) { } type args struct { jsonObj []byte - params []v1alpha1.ResourceParameter + params []v1alpha1.TriggerParameter events map[string]apicommon.Event } tests := []struct { @@ -57,9 +57,9 @@ func Test_applyParams(t *testing.T) { name: "no event and missing default -> error", args: args{ jsonObj: []byte(""), - params: []v1alpha1.ResourceParameter{ + params: []v1alpha1.TriggerParameter{ { - Src: &v1alpha1.ResourceParameterSource{ + Src: &v1alpha1.TriggerParameterSource{ Event: "missing", }, }, @@ -73,9 +73,9 @@ func Test_applyParams(t *testing.T) { name: "no event with default -> success", args: args{ jsonObj: []byte(""), - params: []v1alpha1.ResourceParameter{ + params: []v1alpha1.TriggerParameter{ { - Src: &v1alpha1.ResourceParameterSource{ + Src: &v1alpha1.TriggerParameterSource{ Event: "missing", Value: &defaultValue, }, @@ -91,9 +91,9 @@ func Test_applyParams(t *testing.T) { name: "no event with default, but missing dest -> error", args: args{ jsonObj: []byte(""), - params: []v1alpha1.ResourceParameter{ + params: []v1alpha1.TriggerParameter{ { - Src: &v1alpha1.ResourceParameterSource{ + Src: &v1alpha1.TriggerParameterSource{ Event: "missing", Value: &defaultValue, }, @@ -108,9 +108,9 @@ func Test_applyParams(t *testing.T) { name: "simpleJSON (new field) -> success", args: args{ jsonObj: []byte(``), - params: []v1alpha1.ResourceParameter{ + params: []v1alpha1.TriggerParameter{ { - Src: &v1alpha1.ResourceParameterSource{ + Src: &v1alpha1.TriggerParameterSource{ Event: "simpleJSON", Path: "name.last", }, @@ -126,9 +126,9 @@ func Test_applyParams(t *testing.T) { name: "simpleJSON (updated field) -> success", args: args{ jsonObj: []byte(`{"x":"before"}`), - params: []v1alpha1.ResourceParameter{ + params: []v1alpha1.TriggerParameter{ { - Src: &v1alpha1.ResourceParameterSource{ + Src: &v1alpha1.TriggerParameterSource{ Event: "simpleJSON", Path: "name.last", }, @@ -144,9 +144,9 @@ func Test_applyParams(t *testing.T) { name: "non JSON, no default -> pass payload bytes without converting", args: args{ jsonObj: []byte(``), - params: []v1alpha1.ResourceParameter{ + params: []v1alpha1.TriggerParameter{ { - Src: &v1alpha1.ResourceParameterSource{ + Src: &v1alpha1.TriggerParameterSource{ Event: "nonJSON", }, Dest: "x", @@ -161,9 +161,9 @@ func Test_applyParams(t *testing.T) { name: "non JSON, with path -> error", args: args{ jsonObj: []byte(``), - params: []v1alpha1.ResourceParameter{ + params: []v1alpha1.TriggerParameter{ { - Src: &v1alpha1.ResourceParameterSource{ + Src: &v1alpha1.TriggerParameterSource{ Event: "nonJSON", Path: "test", }, diff --git a/sensors/trigger.go b/sensors/trigger.go index 9d9a1fdfcb..bc3fe03ba4 100644 --- a/sensors/trigger.go +++ b/sensors/trigger.go @@ -17,6 +17,7 @@ limitations under the License. package sensors import ( + "encoding/json" "fmt" "github.com/Knetic/govaluate" @@ -70,19 +71,19 @@ func (sec *sensorExecutionCtx) canProcessTriggers() (bool, error) { // canExecuteTrigger determines whether a trigger is executable based on condition set on trigger func (sec *sensorExecutionCtx) canExecuteTrigger(trigger v1alpha1.Trigger) bool { - if trigger.When == nil { + if trigger.Template.When == nil { return true } - if trigger.When.Any != nil { - for _, group := range trigger.When.Any { + if trigger.Template.When.Any != nil { + for _, group := range trigger.Template.When.Any { if status := sn.GetNodeByName(sec.sensor, group); status.Type == v1alpha1.NodeTypeDependencyGroup && status.Phase == v1alpha1.NodePhaseComplete { return true } return false } } - if trigger.When.All != nil { - for _, group := range trigger.When.All { + if trigger.Template.When.All != nil { + for _, group := range trigger.Template.When.All { if status := sn.GetNodeByName(sec.sensor, group); status.Type == v1alpha1.NodeTypeDependencyGroup && status.Phase != v1alpha1.NodePhaseComplete { return false } @@ -106,18 +107,18 @@ func (sec *sensorExecutionCtx) processTriggers() { for _, trigger := range sec.sensor.Spec.Triggers { // check if a trigger condition is set if canExecute := sec.canExecuteTrigger(trigger); !canExecute { - sec.log.Info().Str("trigger-name", trigger.Name).Msg("trigger can't be executed because trigger condition failed") + sec.log.Info().Str("trigger-name", trigger.Template.Name).Msg("trigger can't be executed because trigger condition failed") continue } if err := sec.executeTrigger(trigger); err != nil { - sec.log.Error().Str("trigger-name", trigger.Name).Err(err).Msg("trigger failed to execute") + sec.log.Error().Str("trigger-name", trigger.Template.Name).Err(err).Msg("trigger failed to execute") - sn.MarkNodePhase(sec.sensor, trigger.Name, v1alpha1.NodeTypeTrigger, v1alpha1.NodePhaseError, nil, &sec.log, fmt.Sprintf("failed to execute trigger. err: %+v", err)) + sn.MarkNodePhase(sec.sensor, trigger.Template.Name, v1alpha1.NodeTypeTrigger, v1alpha1.NodePhaseError, nil, &sec.log, fmt.Sprintf("failed to execute trigger.Template. err: %+v", err)) // escalate using K8s event labels[common.LabelEventType] = string(common.EscalationEventType) - if err := common.GenerateK8sEvent(sec.kubeClient, fmt.Sprintf("failed to execute trigger %s", trigger.Name), common.EscalationEventType, + if err := common.GenerateK8sEvent(sec.kubeClient, fmt.Sprintf("failed to execute trigger %s", trigger.Template.Name), common.EscalationEventType, "trigger failure", sec.sensor.Name, sec.sensor.Namespace, sec.controllerInstanceID, sensor.Kind, labels); err != nil { sec.log.Error().Err(err).Msg("failed to create K8s event to escalate trigger failure") } @@ -125,10 +126,10 @@ func (sec *sensorExecutionCtx) processTriggers() { } // mark trigger as complete. - sn.MarkNodePhase(sec.sensor, trigger.Name, v1alpha1.NodeTypeTrigger, v1alpha1.NodePhaseComplete, nil, &sec.log, "successfully executed trigger") + sn.MarkNodePhase(sec.sensor, trigger.Template.Name, v1alpha1.NodeTypeTrigger, v1alpha1.NodePhaseComplete, nil, &sec.log, "successfully executed trigger") labels[common.LabelEventType] = string(common.OperationSuccessEventType) - if err := common.GenerateK8sEvent(sec.kubeClient, fmt.Sprintf("trigger %s executed successfully", trigger.Name), common.OperationSuccessEventType, + if err := common.GenerateK8sEvent(sec.kubeClient, fmt.Sprintf("trigger %s executed successfully", trigger.Template.Name), common.OperationSuccessEventType, "trigger executed", sec.sensor.Name, sec.sensor.Namespace, sec.controllerInstanceID, sensor.Kind, labels); err != nil { sec.log.Error().Err(err).Msg("failed to create K8s event to log trigger execution") } @@ -154,22 +155,64 @@ func (sec *sensorExecutionCtx) processTriggers() { } } +// apply parameters for trigger +func (sec *sensorExecutionCtx) applyParamsTrigger(trigger *v1alpha1.Trigger) error { + if trigger.TemplateParameters != nil && len(trigger.TemplateParameters) > 0 { + templateBytes, err := json.Marshal(trigger.Template) + if err != nil { + return err + } + tObj, err := applyParams(templateBytes, trigger.TemplateParameters, sec.extractEvents(trigger.TemplateParameters)) + if err != nil { + return err + } + template := &v1alpha1.TriggerTemplate{} + if err = json.Unmarshal(tObj, template); err != nil { + return err + } + trigger.Template = template + } + return nil +} + +func (sec *sensorExecutionCtx) applyParamsResource(parameters []v1alpha1.TriggerParameter, obj *unstructured.Unstructured) error { + if parameters != nil && len(parameters) > 0 { + jObj, err := obj.MarshalJSON() + if err != nil { + return fmt.Errorf("failed to marshal json. err: %+v", err) + } + events := sec.extractEvents(parameters) + jUpdatedObj, err := applyParams(jObj, parameters, events) + if err != nil { + return fmt.Errorf("failed to apply params. err: %+v", err) + } + err = obj.UnmarshalJSON(jUpdatedObj) + if err != nil { + return fmt.Errorf("failed to un-marshal json. err: %+v", err) + } + } + return nil +} + // execute the trigger func (sec *sensorExecutionCtx) executeTrigger(trigger v1alpha1.Trigger) error { - if trigger.Resource != nil { - creds, err := store.GetCredentials(sec.kubeClient, sec.sensor.Namespace, &trigger.Resource.Source) + if trigger.Template != nil { + if err := sec.applyParamsTrigger(&trigger); err != nil { + return err + } + creds, err := store.GetCredentials(sec.kubeClient, sec.sensor.Namespace, trigger.Template.Source) if err != nil { return err } - reader, err := store.GetArtifactReader(&trigger.Resource.Source, creds, sec.kubeClient) + reader, err := store.GetArtifactReader(trigger.Template.Source, creds, sec.kubeClient) if err != nil { return err } - uObj, err := store.FetchArtifact(reader, trigger.Resource.GroupVersionKind) + uObj, err := store.FetchArtifact(reader, trigger.Template.GroupVersionKind) if err != nil { return err } - if err = sec.createResourceObject(trigger.Resource, uObj); err != nil { + if err = sec.createResourceObject(trigger.Template, trigger.ResourceParameters, uObj); err != nil { return err } } @@ -177,44 +220,21 @@ func (sec *sensorExecutionCtx) executeTrigger(trigger v1alpha1.Trigger) error { } // createResourceObject creates K8s object for trigger -func (sec *sensorExecutionCtx) createResourceObject(resource *v1alpha1.ResourceObject, obj *unstructured.Unstructured) error { - namespace := resource.Namespace +func (sec *sensorExecutionCtx) createResourceObject(resource *v1alpha1.TriggerTemplate, parameters []v1alpha1.TriggerParameter, obj *unstructured.Unstructured) error { + namespace := obj.GetNamespace() // Defaults to sensor's namespace if namespace == "" { namespace = sec.sensor.Namespace } obj.SetNamespace(namespace) - if resource.Labels != nil { - labels := obj.GetLabels() - if labels != nil { - for k, v := range resource.Labels { - labels[k] = v - } - obj.SetLabels(labels) - } - obj.SetLabels(resource.Labels) - } - // passing parameters to the resource object requires 4 steps // 1. marshaling the obj to JSON // 2. extract the appropriate eventDependency events based on the resource params // 3. apply the params to the JSON object // 4. unmarshal the obj from the updated JSON - if len(resource.Parameters) > 0 { - jObj, err := obj.MarshalJSON() - if err != nil { - return fmt.Errorf("failed to marshal json. err: %+v", err) - } - events := sec.extractEvents(resource.Parameters) - jUpdatedObj, err := applyParams(jObj, resource.Parameters, events) - if err != nil { - return fmt.Errorf("failed to apply params. err: %+v", err) - } - err = obj.UnmarshalJSON(jUpdatedObj) - if err != nil { - return fmt.Errorf("failed to un-marshal json. err: %+v", err) - } + if err := sec.applyParamsResource(parameters, obj); err != nil { + return err } gvk := obj.GroupVersionKind() @@ -248,7 +268,7 @@ func (sec *sensorExecutionCtx) createResourceObject(resource *v1alpha1.ResourceO // helper method to extract the events from the event dependencies nodes associated with the resource params // returns a map of the events keyed by the event dependency name -func (sec *sensorExecutionCtx) extractEvents(params []v1alpha1.ResourceParameter) map[string]apicommon.Event { +func (sec *sensorExecutionCtx) extractEvents(params []v1alpha1.TriggerParameter) map[string]apicommon.Event { events := make(map[string]apicommon.Event) for _, param := range params { if param.Src != nil { @@ -258,7 +278,7 @@ func (sec *sensorExecutionCtx) extractEvents(params []v1alpha1.ResourceParameter continue } if node.Event == nil { - sec.log.Warn().Str("param-src", param.Src.Event).Str("param-dest", param.Dest).Msg("WARNING: event dependency node does not exist, cannot apply parameter") + sec.log.Warn().Str("param-src", param.Src.Event).Str("param-dest", param.Dest).Msg("WARNING: event in event dependency does not exist, cannot apply parameter") continue } events[param.Src.Event] = *node.Event diff --git a/sensors/trigger_test.go b/sensors/trigger_test.go index 8a3b93f153..2232abbcfa 100644 --- a/sensors/trigger_test.go +++ b/sensors/trigger_test.go @@ -17,6 +17,9 @@ limitations under the License. package sensors import ( + "encoding/json" + "github.com/argoproj/argo-events/pkg/apis/common" + "github.com/ghodss/yaml" "testing" apicommon "github.com/argoproj/argo-events/pkg/apis/common" @@ -198,29 +201,27 @@ func (p *FakeClientPool) ClientForGroupVersionKind(kind schema.GroupVersionKind) }, nil } -var testWf = ` +var testPod = ` apiVersion: v1 kind: Pod metadata: -generateName: hello-world- + generateName: test- spec: containers: - - name: whalesay - image: "docker/whalesay:latest" + - name: test + image: docker/whalesay ` var testTrigger = v1alpha1.Trigger{ - Name: "sample", - Resource: &v1alpha1.ResourceObject{ - Namespace: corev1.NamespaceDefault, - GroupVersionKind: v1alpha1.GroupVersionKind{ - Version: "v1", + Template: &v1alpha1.TriggerTemplate{ + Name: "sample", + GroupVersionKind: &metav1.GroupVersionKind{ Kind: "Pod", + Version: "v1", }, - Source: v1alpha1.ArtifactLocation{ - Inline: &testWf, + Source: &v1alpha1.ArtifactLocation{ + Inline: &testPod, }, - Labels: map[string]string{"test-label": "test-value"}, }, } @@ -233,10 +234,23 @@ func TestProcessTrigger(t *testing.T) { testSensor.Spec.Triggers = triggers soc := getsensorExecutionCtx(testSensor) err = soc.executeTrigger(testTrigger) - convey.So(err, convey.ShouldNotBeNil) + convey.So(err, convey.ShouldBeNil) }) } +type FakeName struct { + First string `json:"first"` + Last string `json:"last"` +} + +type fakeEvent struct { + Name string `json:"name"` + Namespace string `json:"namespace"` + Group string `json:"group"` + GenerateName string `json:"generateName"` + Kind string `json:"kind"` +} + func TestCreateResourceObject(t *testing.T) { convey.Convey("Given a resource object", t, func() { testSensor, err := getSensor() @@ -245,34 +259,120 @@ func TestCreateResourceObject(t *testing.T) { fakeclient := soc.clientPool.(*FakeClientPool).Fake dynamicClient := dynamicfake.FakeResourceClient{Resource: schema.GroupVersionResource{Version: "v1", Resource: "pods"}, Fake: &fakeclient} - convey.Convey("Given a pod", func() { - rObj := testTrigger.Resource.DeepCopy() - rObj.Namespace = "foo" + convey.Convey("Given a pod spec, get a pod object", func() { + rObj := testTrigger.Template.DeepCopy() pod := &corev1.Pod{ TypeMeta: metav1.TypeMeta{Kind: "Pod", APIVersion: "v1"}, - ObjectMeta: metav1.ObjectMeta{Namespace: rObj.Namespace, Name: "my-pod"}, + ObjectMeta: metav1.ObjectMeta{Namespace: "foo", Name: "my-pod"}, } - uObj, err := getUnstructuredPod(pod) + uObj, err := getUnstructured(pod) convey.So(err, convey.ShouldBeNil) - err = soc.createResourceObject(rObj, uObj) + err = soc.createResourceObject(rObj, testTrigger.ResourceParameters, uObj) convey.So(err, convey.ShouldBeNil) unstructuredPod, err := dynamicClient.Get(pod.Name, metav1.GetOptions{}) convey.So(err, convey.ShouldBeNil) - convey.So(unstructuredPod.GetNamespace(), convey.ShouldEqual, rObj.Namespace) + convey.So(unstructuredPod.GetNamespace(), convey.ShouldEqual, "foo") }) + + fe := &fakeEvent{ + Namespace: "fake-namespace", + Name: "fake", + Group: "v1", + GenerateName: "fake-", + Kind: "Deployment", + } + eventBytes, err := json.Marshal(fe) + convey.So(err, convey.ShouldBeNil) + + node := v1alpha1.NodeStatus{ + Event: &common.Event{ + Payload: eventBytes, + Context: common.EventContext{ + Source: &common.URI{ + Host: "test-gateway:test", + }, + ContentType: "application/json", + }, + }, + Name: "test-gateway:test", + Type: v1alpha1.NodeTypeEventDependency, + ID: "1234", + Phase: v1alpha1.NodePhaseActive, + } + + testTrigger.TemplateParameters = []v1alpha1.TriggerParameter{ + { + Src: &v1alpha1.TriggerParameterSource{ + Event: "test-gateway:test", + Path: "name", + }, + Dest: "name", + }, + } + + testTrigger.ResourceParameters = []v1alpha1.TriggerParameter{ + { + Src: &v1alpha1.TriggerParameterSource{ + Event: "test-gateway:test", + Path: "name", + }, + Dest: "metadata.generateName", + }, + } + + nodeId := soc.sensor.NodeID("test-gateway:test") + wfNodeId := soc.sensor.NodeID("test-workflow-trigger") + + wfnode := v1alpha1.NodeStatus{ + Event: &common.Event{ + Payload: eventBytes, + Context: common.EventContext{ + Source: &common.URI{ + Host: "test-gateway:test", + }, + ContentType: "application/json", + }, + }, + Name: "test-workflow-trigger", + Type: v1alpha1.NodeTypeTrigger, + ID: "1234", + Phase: v1alpha1.NodePhaseNew, + } + + soc.sensor.Status.Nodes = map[string]v1alpha1.NodeStatus{ + nodeId: node, + wfNodeId: wfnode, + } + + convey.Convey("Given parameters for trigger template, apply params", func() { + err = soc.applyParamsTrigger(&testTrigger) + convey.So(err, convey.ShouldBeNil) + convey.So(testTrigger.Template.Name, convey.ShouldEqual, fe.Name) + + var tp corev1.Pod + err = yaml.Unmarshal([]byte(testPod), &tp) + convey.So(err, convey.ShouldBeNil) + + rObj := tp.DeepCopy() + uObj, err := getUnstructured(rObj) + convey.So(err, convey.ShouldBeNil) + + err = soc.applyParamsResource(testTrigger.ResourceParameters, uObj) + convey.So(err, convey.ShouldBeNil) + }) + convey.Convey("Given a pod without namespace, use sensor namespace", func() { - rObj := testTrigger.Resource.DeepCopy() - rObj.Namespace = "" + rObj := testTrigger.Template.DeepCopy() pod := &corev1.Pod{ TypeMeta: metav1.TypeMeta{Kind: "Pod", APIVersion: "v1"}, ObjectMeta: metav1.ObjectMeta{Name: "my-pod-without-namespace"}, } - uObj, err := getUnstructuredPod(pod) + uObj, err := getUnstructured(pod) convey.So(err, convey.ShouldBeNil) - err = soc.createResourceObject(rObj, uObj) + err = soc.createResourceObject(rObj, testTrigger.ResourceParameters, uObj) convey.So(err, convey.ShouldBeNil) unstructuredPod, err := dynamicClient.Get(pod.Name, metav1.GetOptions{}) @@ -282,8 +382,8 @@ func TestCreateResourceObject(t *testing.T) { }) } -func getUnstructuredPod(pod *corev1.Pod) (*unstructured.Unstructured, error) { - obj, err := runtime.DefaultUnstructuredConverter.ToUnstructured(pod) +func getUnstructured(res interface{}) (*unstructured.Unstructured, error) { + obj, err := runtime.DefaultUnstructuredConverter.ToUnstructured(res) if err != nil { return nil, err } @@ -308,9 +408,9 @@ func TestExtractEvents(t *testing.T) { }, }, } - extractedEvents := sec.extractEvents([]v1alpha1.ResourceParameter{ + extractedEvents := sec.extractEvents([]v1alpha1.TriggerParameter{ { - Src: &v1alpha1.ResourceParameterSource{ + Src: &v1alpha1.TriggerParameterSource{ Event: "test-gateway:test", }, Dest: "fake-dest", diff --git a/store/store.go b/store/store.go index 258431df8c..2fb780587c 100644 --- a/store/store.go +++ b/store/store.go @@ -29,6 +29,7 @@ import ( gw_v1alpha1 "github.com/argoproj/argo-events/pkg/apis/gateway/v1alpha1" ss_v1alpha1 "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1" wf_v1alpha1 "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // NOTE: custom resources must be manually added here @@ -50,7 +51,7 @@ type ArtifactReader interface { } // FetchArtifact from the location, decode it using explicit types, and unstructure it -func FetchArtifact(reader ArtifactReader, gvk ss_v1alpha1.GroupVersionKind) (*unstructured.Unstructured, error) { +func FetchArtifact(reader ArtifactReader, gvk *metav1.GroupVersionKind) (*unstructured.Unstructured, error) { var err error var obj []byte obj, err = reader.Read() @@ -78,7 +79,7 @@ func GetArtifactReader(loc *ss_v1alpha1.ArtifactLocation, creds *Credentials, cl return nil, fmt.Errorf("unknown artifact location: %v", *loc) } -func decodeAndUnstructure(b []byte, gvk ss_v1alpha1.GroupVersionKind) (*unstructured.Unstructured, error) { +func decodeAndUnstructure(b []byte, gvk *metav1.GroupVersionKind) (*unstructured.Unstructured, error) { gvk1 := &schema.GroupVersionKind{ Group: gvk.Group, Version: gvk.Version, diff --git a/store/store_test.go b/store/store_test.go index 8ba2b9f362..530da5a2db 100644 --- a/store/store_test.go +++ b/store/store_test.go @@ -23,6 +23,7 @@ import ( "github.com/argoproj/argo-events/pkg/apis/sensor/v1alpha1" "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) type FakeWorkflowArtifactReader struct{} @@ -33,7 +34,7 @@ func (f *FakeWorkflowArtifactReader) Read() ([]byte, error) { func TestFetchArtifact(t *testing.T) { reader := &FakeWorkflowArtifactReader{} - gvk := v1alpha1.GroupVersionKind{ + gvk := &metav1.GroupVersionKind{ Group: "argoproj.io", Version: "v1alpha1", Kind: "Workflow", @@ -70,7 +71,7 @@ func decodeSensor(t *testing.T) { b, err := ioutil.ReadFile("../examples/sensors/multi-trigger-sensor.yaml") assert.Nil(t, err) - gvk := v1alpha1.GroupVersionKind{ + gvk := &metav1.GroupVersionKind{ Group: v1alpha1.SchemaGroupVersionKind.Group, Version: v1alpha1.SchemaGroupVersionKind.Version, Kind: v1alpha1.SchemaGroupVersionKind.Kind, @@ -81,7 +82,7 @@ func decodeSensor(t *testing.T) { } func decodeWorkflow(t *testing.T) { - gvk := v1alpha1.GroupVersionKind{ + gvk := &metav1.GroupVersionKind{ Group: "argoproj.io", Version: "v1alpha1", Kind: "Workflow", @@ -106,7 +107,7 @@ spec: ` func decodeDeploymentv1(t *testing.T) { - gvk := v1alpha1.GroupVersionKind{ + gvk := &metav1.GroupVersionKind{ Group: "apps", Version: "v1", Kind: "Deployment", @@ -157,7 +158,7 @@ var deploymentv1 = ` ` func decodeJobv1(t *testing.T) { - gvk := v1alpha1.GroupVersionKind{ + gvk := &metav1.GroupVersionKind{ Group: "batch", Version: "v1", Kind: "Job", @@ -187,7 +188,7 @@ spec: ` func decodeUnsupported(t *testing.T) { - gvk := v1alpha1.GroupVersionKind{ + gvk := &metav1.GroupVersionKind{ Group: "batch", Version: "v1", Kind: "Job", @@ -224,7 +225,7 @@ spec: ` func decodeUnknown(t *testing.T) { - gvk := v1alpha1.GroupVersionKind{ + gvk := &metav1.GroupVersionKind{ Group: "unknown", Version: "123", Kind: "What??",