diff --git a/.gitignore b/.gitignore index e1f87cfd3842c264bd219237e9afe113d61c35bc..a0ac78095a9f275ae35060a584c5df2151aa7d0e 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,7 @@ share/python-wheels/ .installed.cfg *.egg MANIFEST +.my_venv/ # requirements.txt # removed to enable tracking versions of packages over time # PyInstaller diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 115b336761dd94902597c3b6e21e7d3dcf225af1..dcde3bb15412b6a4e48faf19bf247f4570d216f4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -34,6 +34,7 @@ include: - local: '/src/opticalcontroller/.gitlab-ci.yml' - local: '/src/ztp/.gitlab-ci.yml' - local: '/src/policy/.gitlab-ci.yml' + - local: '/src/automation/.gitlab-ci.yml' - local: '/src/forecaster/.gitlab-ci.yml' #- local: '/src/webui/.gitlab-ci.yml' #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml' @@ -49,5 +50,8 @@ include: - local: '/src/kpi_value_api/.gitlab-ci.yml' - local: '/src/kpi_value_writer/.gitlab-ci.yml' - local: '/src/telemetry/.gitlab-ci.yml' + - local: '/src/analytics/.gitlab-ci.yml' + - local: '/src/qos_profile/.gitlab-ci.yml' + # This should be last one: end-to-end integration tests - local: '/src/tests/.gitlab-ci.yml' diff --git a/deploy/crdb.sh b/deploy/crdb.sh index 3e80b6350e66ec30a725c45acb7cf954ac3009c8..3fcbb5cfaa1cbfcfdef14e372a871a7dd545887b 100755 --- a/deploy/crdb.sh +++ b/deploy/crdb.sh @@ -154,8 +154,8 @@ function crdb_undeploy_single() { echo } -function crdb_drop_database_single() { - echo "Drop database if exists" +function crdb_drop_databases_single() { + echo "Drop TFS databases, if exist" if [[ -z "${GITLAB_CI}" ]]; then #kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o yaml @@ -168,9 +168,20 @@ function crdb_drop_database_single() { CRDB_CLIENT_URL="postgresql://${CRDB_USERNAME}:${CRDB_PASSWORD}@${CRDB_HOST}:${CRDB_PORT}/defaultdb?sslmode=require" echo "CRDB_CLIENT_URL=${CRDB_CLIENT_URL}" - kubectl exec -i --namespace ${CRDB_NAMESPACE} cockroachdb-0 -- \ - ./cockroach sql --certs-dir=/cockroach/cockroach-certs --url=${CRDB_CLIENT_URL} \ - --execute "DROP DATABASE IF EXISTS ${CRDB_DATABASE};" + + DATABASES=$( + kubectl exec -i --namespace ${CRDB_NAMESPACE} cockroachdb-0 -- \ + ./cockroach sql --certs-dir=/cockroach/cockroach-certs --url=${CRDB_CLIENT_URL} \ + --execute "SHOW DATABASES;" --format=tsv | awk '{print $1}' | grep "^tfs" + ) + echo "Found TFS databases: ${DATABASES}" | tr '\n' ' ' + + for DB_NAME in $DATABASES; do + echo "Dropping TFS database: $DB_NAME" + kubectl exec -i --namespace ${CRDB_NAMESPACE} cockroachdb-0 -- \ + ./cockroach sql --certs-dir=/cockroach/cockroach-certs --url=${CRDB_CLIENT_URL} \ + --execute="DROP DATABASE IF EXISTS $DB_NAME CASCADE;" + done echo } @@ -349,11 +360,22 @@ function crdb_undeploy_cluster() { echo } -function crdb_drop_database_cluster() { - echo "Drop database if exists" - kubectl exec -i --namespace ${CRDB_NAMESPACE} cockroachdb-client-secure -- \ - ./cockroach sql --certs-dir=/cockroach/cockroach-certs --host=cockroachdb-public --execute \ - "DROP DATABASE IF EXISTS ${CRDB_DATABASE};" +function crdb_drop_databases_cluster() { + echo "Drop TFS databases, if exist" + + DATABASES=$( + kubectl exec -i --namespace ${CRDB_NAMESPACE} cockroachdb-client-secure -- \ + ./cockroach sql --certs-dir=/cockroach/cockroach-certs --host=cockroachdb-public \ + --execute "SHOW DATABASES;" --format=tsv | awk '{print $1}' | grep "^tfs" + ) + echo "Found TFS databases: ${DATABASES}" | tr '\n' ' ' + + for DB_NAME in $DATABASES; do + echo "Dropping TFS database: $DB_NAME" + kubectl exec -i --namespace ${CRDB_NAMESPACE} cockroachdb-client-secure -- \ + ./cockroach sql --certs-dir=/cockroach/cockroach-certs --host=cockroachdb-public \ + --execute="DROP DATABASE IF EXISTS $DB_NAME CASCADE;" + done echo } @@ -365,7 +387,7 @@ if [ "$CRDB_DEPLOY_MODE" == "single" ]; then crdb_deploy_single if [ "$CRDB_DROP_DATABASE_IF_EXISTS" == "YES" ]; then - crdb_drop_database_single + crdb_drop_databases_single fi elif [ "$CRDB_DEPLOY_MODE" == "cluster" ]; then if [ "$CRDB_REDEPLOY" == "YES" ]; then @@ -375,7 +397,7 @@ elif [ "$CRDB_DEPLOY_MODE" == "cluster" ]; then crdb_deploy_cluster if [ "$CRDB_DROP_DATABASE_IF_EXISTS" == "YES" ]; then - crdb_drop_database_cluster + crdb_drop_databases_cluster fi else echo "Unsupported value: CRDB_DEPLOY_MODE=$CRDB_DEPLOY_MODE" diff --git a/deploy/kafka.sh b/deploy/kafka.sh index 0483bce153b457800c6f7db2ef66685e90118111..4cbcdb7014c983eeda9bab1d6655fa042751b931 100755 --- a/deploy/kafka.sh +++ b/deploy/kafka.sh @@ -47,10 +47,10 @@ function kafka_deploy() { cp "${KFK_MANIFESTS_PATH}/${KFK_MANIFEST}" "${TMP_MANIFESTS_FOLDER}/${KFK_MANIFEST}" # echo "Apache Kafka Namespace" - echo ">>> Delete Apache Kafka Namespace" + echo "Delete Apache Kafka Namespace" kubectl delete namespace ${KFK_NAMESPACE} --ignore-not-found - echo ">>> Create Apache Kafka Namespace" + echo "Create Apache Kafka Namespace" kubectl create namespace ${KFK_NAMESPACE} # echo ">>> Deplying Apache Kafka Zookeeper" @@ -76,15 +76,15 @@ function kafka_deploy() { # fi } -echo "Apache Kafka" -echo ">>> Checking if Apache Kafka is deployed ... " +echo ">>> Apache Kafka" +echo "Checking if Apache Kafka is deployed ... " if [ "$KFK_REDEPLOY" == "YES" ]; then - echo ">>> Redeploying kafka namespace" + echo "Redeploying kafka namespace" kafka_deploy elif kubectl get namespace "${KFK_NAMESPACE}" &> /dev/null; then - echo ">>> Apache Kafka already present; skipping step." + echo "Apache Kafka already present; skipping step." else - echo ">>> Kafka namespace doesn't exists. Deploying kafka namespace" + echo "Kafka namespace doesn't exists. Deploying kafka namespace" kafka_deploy fi echo diff --git a/deploy/tfs.sh b/deploy/tfs.sh index 1dceae1c1b4ee3e2a36816557b54df48b224eba1..65c1e8de28f2045b2ac78938b84d3c33e282025e 100755 --- a/deploy/tfs.sh +++ b/deploy/tfs.sh @@ -146,55 +146,17 @@ kubectl create namespace $TFS_K8S_NAMESPACE sleep 2 printf "\n" -echo "Create secret with CockroachDB data" +echo ">>> Create Secret with CockroachDB data..." CRDB_SQL_PORT=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.ports[?(@.name=="sql")].port}') -CRDB_DATABASE_CONTEXT=${CRDB_DATABASE} # TODO: change by specific configurable environment variable kubectl create secret generic crdb-data --namespace ${TFS_K8S_NAMESPACE} --type='Opaque' \ --from-literal=CRDB_NAMESPACE=${CRDB_NAMESPACE} \ --from-literal=CRDB_SQL_PORT=${CRDB_SQL_PORT} \ - --from-literal=CRDB_DATABASE=${CRDB_DATABASE_CONTEXT} \ --from-literal=CRDB_USERNAME=${CRDB_USERNAME} \ --from-literal=CRDB_PASSWORD=${CRDB_PASSWORD} \ --from-literal=CRDB_SSLMODE=require printf "\n" -echo "Create secret with CockroachDB data for KPI Management microservices" -CRDB_SQL_PORT=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.ports[?(@.name=="sql")].port}') -CRDB_DATABASE_KPI_MGMT="tfs_kpi_mgmt" # TODO: change by specific configurable environment variable -kubectl create secret generic crdb-kpi-data --namespace ${TFS_K8S_NAMESPACE} --type='Opaque' \ - --from-literal=CRDB_NAMESPACE=${CRDB_NAMESPACE} \ - --from-literal=CRDB_SQL_PORT=${CRDB_SQL_PORT} \ - --from-literal=CRDB_DATABASE=${CRDB_DATABASE_KPI_MGMT} \ - --from-literal=CRDB_USERNAME=${CRDB_USERNAME} \ - --from-literal=CRDB_PASSWORD=${CRDB_PASSWORD} \ - --from-literal=CRDB_SSLMODE=require -printf "\n" - -echo "Create secret with CockroachDB data for Telemetry microservices" -CRDB_SQL_PORT=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.ports[?(@.name=="sql")].port}') -CRDB_DATABASE_TELEMETRY="tfs_telemetry" # TODO: change by specific configurable environment variable -kubectl create secret generic crdb-telemetry --namespace ${TFS_K8S_NAMESPACE} --type='Opaque' \ - --from-literal=CRDB_NAMESPACE=${CRDB_NAMESPACE} \ - --from-literal=CRDB_SQL_PORT=${CRDB_SQL_PORT} \ - --from-literal=CRDB_DATABASE=${CRDB_DATABASE_TELEMETRY} \ - --from-literal=CRDB_USERNAME=${CRDB_USERNAME} \ - --from-literal=CRDB_PASSWORD=${CRDB_PASSWORD} \ - --from-literal=CRDB_SSLMODE=require -printf "\n" - -echo "Create secret with CockroachDB data for Analytics microservices" -CRDB_SQL_PORT=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.ports[?(@.name=="sql")].port}') -CRDB_DATABASE_ANALYTICS="tfs_analytics" # TODO: change by specific configurable environment variable -kubectl create secret generic crdb-analytics --namespace ${TFS_K8S_NAMESPACE} --type='Opaque' \ - --from-literal=CRDB_NAMESPACE=${CRDB_NAMESPACE} \ - --from-literal=CRDB_SQL_PORT=${CRDB_SQL_PORT} \ - --from-literal=CRDB_DATABASE=${CRDB_DATABASE_ANALYTICS} \ - --from-literal=CRDB_USERNAME=${CRDB_USERNAME} \ - --from-literal=CRDB_PASSWORD=${CRDB_PASSWORD} \ - --from-literal=CRDB_SSLMODE=require -printf "\n" - -echo "Create secret with Apache Kafka data for KPI, Telemetry and Analytics microservices" +echo ">>> Create Secret with Apache Kakfa..." KFK_SERVER_PORT=$(kubectl --namespace ${KFK_NAMESPACE} get service kafka-service -o 'jsonpath={.spec.ports[0].port}') kubectl create secret generic kfk-kpi-data --namespace ${TFS_K8S_NAMESPACE} --type='Opaque' \ --from-literal=KFK_NAMESPACE=${KFK_NAMESPACE} \ @@ -229,6 +191,21 @@ kubectl create secret generic qdb-data --namespace ${TFS_K8S_NAMESPACE} --type=' --from-literal=METRICSDB_PASSWORD=${QDB_PASSWORD} printf "\n" +# Check if "dlt" is in the list of components +if [[ " ${TFS_COMPONENTS[@]} " =~ " dlt " ]]; then + echo "Create secret for HLF keystore" + kubectl create secret generic dlt-keystone --namespace ${TFS_K8S_NAMESPACE} --from-file=keystore=${KEY_DIRECTORY_PATH} + printf "\n" + + echo "Create secret for HLF signcerts" + kubectl create secret generic dlt-signcerts --namespace ${TFS_K8S_NAMESPACE} --from-file=signcerts.pem=${CERT_DIRECTORY_PATH} + printf "\n" + + echo "Create secret for HLF ca.crt" + kubectl create secret generic dlt-ca-crt --namespace ${TFS_K8S_NAMESPACE} --from-file=ca.crt=${TLS_CERT_PATH} + printf "\n" +fi + echo "Deploying components and collecting environment variables..." ENV_VARS_SCRIPT=tfs_runtime_env_vars.sh echo "# Environment variables for TeraFlowSDN deployment" > $ENV_VARS_SCRIPT @@ -654,6 +631,10 @@ if [[ "$TFS_COMPONENTS" == *"monitoring"* ]] && [[ "$TFS_COMPONENTS" == *"webui" printf "\n\n" fi +echo "Pruning Docker Images..." +docker image prune --force +printf "\n\n" + if [ "$DOCKER_BUILD" == "docker buildx build" ]; then echo "Pruning Docker Buildx Cache..." docker buildx prune --force diff --git a/manifests/analyticsservice.yaml b/manifests/analyticsservice.yaml index 0fa3ed0be6eda8cf944e199543e3c2cd59cc98d6..61666ead951c73e4034110b00a51743d33bd4ce2 100644 --- a/manifests/analyticsservice.yaml +++ b/manifests/analyticsservice.yaml @@ -37,9 +37,13 @@ spec: env: - name: LOG_LEVEL value: "INFO" + - name: CRDB_DATABASE + value: "tfs_analytics" + - name: METRICS_PORT + value: "9192" envFrom: - secretRef: - name: crdb-analytics + name: crdb-data - secretRef: name: kfk-kpi-data readinessProbe: @@ -60,10 +64,12 @@ spec: imagePullPolicy: Always ports: - containerPort: 30090 - - containerPort: 9192 + - containerPort: 9193 env: - name: LOG_LEVEL value: "INFO" + - name: METRICS_PORT + value: "9193" envFrom: - secretRef: name: kfk-kpi-data @@ -100,10 +106,14 @@ spec: protocol: TCP port: 30090 targetPort: 30090 - - name: metrics + - name: metrics-frontend protocol: TCP port: 9192 targetPort: 9192 + - name: metrics-backend + protocol: TCP + port: 9193 + targetPort: 9193 --- apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler diff --git a/manifests/automationservice.yaml b/manifests/automationservice.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f6c97f7fb7635e4b04431d41dbf20ca3edc51475 --- /dev/null +++ b/manifests/automationservice.yaml @@ -0,0 +1,80 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: automationservice +spec: + selector: + matchLabels: + app: automationservice + replicas: 1 + template: + metadata: + annotations: + # Required for IETF L2VPN SBI when both parent and child run in same K8s cluster with Linkerd + config.linkerd.io/skip-outbound-ports: "2002" + labels: + app: automationservice + spec: + terminationGracePeriodSeconds: 5 + containers: + - name: server + image: labs.etsi.org:5050/tfs/controller/automation:latest + imagePullPolicy: Always + ports: + - containerPort: 30200 + - containerPort: 9192 + env: + - name: LOG_LEVEL + value: "INFO" + startupProbe: + exec: + command: ["/bin/grpc_health_probe", "-addr=:30200"] + failureThreshold: 30 + periodSeconds: 1 + readinessProbe: + exec: + command: ["/bin/grpc_health_probe", "-addr=:30200"] + livenessProbe: + exec: + command: ["/bin/grpc_health_probe", "-addr=:30200"] + resources: + requests: + cpu: 250m + memory: 128Mi + limits: + cpu: 1000m + memory: 1024Mi +--- +apiVersion: v1 +kind: Service +metadata: + name: automationservice + labels: + app: automationservice +spec: + type: ClusterIP + selector: + app: automationservice + ports: + - name: grpc + protocol: TCP + port: 30200 + targetPort: 30200 + - name: metrics + protocol: TCP + port: 9192 + targetPort: 9192 diff --git a/manifests/contextservice.yaml b/manifests/contextservice.yaml index 3abc4f208da8b4820b589b798a328c4a971f55f0..0fc8a1c44f7358a962276ebcf38a165d2db986cd 100644 --- a/manifests/contextservice.yaml +++ b/manifests/contextservice.yaml @@ -45,6 +45,8 @@ spec: value: "FALSE" - name: ALLOW_EXPLICIT_ADD_LINK_TO_TOPOLOGY value: "FALSE" + - name: CRDB_DATABASE + value: "tfs_context" envFrom: - secretRef: name: crdb-data diff --git a/manifests/dltservice.yaml b/manifests/dltservice.yaml index 34f0d53c3116183696b6f7f49682596092f313ae..66bd3724c7a6244ea553d7199968c900bce0611c 100644 --- a/manifests/dltservice.yaml +++ b/manifests/dltservice.yaml @@ -12,6 +12,21 @@ # See the License for the specific language governing permissions and # limitations under the License. +apiVersion: v1 +kind: ConfigMap +metadata: + name: dlt-config +data: + CHANNEL_NAME: "tfs_channel" # Change according to your blockchain configuration + CHAINCODE_NAME: "tfs_dlt" # Change according to your blockchain configuration + MSP_ID: "ETSI" # Change according to your blockchain configuration + PEER_ENDPOINT: "127.0.0.1:7051" # Change according to your blockchain configuration + PEER_HOST_ALIAS: "peer0.org1.tfs.etsi.org" # Change according to your blockchain configuration + KEY_DIRECTORY_PATH: "/etc/hyperledger/fabric-keystore/keystore" + CERT_DIRECTORY_PATH: "/etc/hyperledger/fabric-signcerts/signcerts.pem" + TLS_CERT_PATH: "/etc/hyperledger/fabric-ca-crt/ca.crt" + +--- apiVersion: apps/v1 kind: Deployment metadata: @@ -78,6 +93,52 @@ spec: limits: cpu: 700m memory: 1024Mi + volumeMounts: + - name: keystore + mountPath: /etc/hyperledger/fabric-keystore + readOnly: true + - name: signcerts + mountPath: /etc/hyperledger/fabric-signcerts + readOnly: true + - name: ca-crt + mountPath: /etc/hyperledger/fabric-ca-crt + readOnly: true + envFrom: + - configMapRef: + name: dlt-config + env: + - name: KEY_DIRECTORY_PATH + value: "/etc/hyperledger/fabric-keystore/keystore" + - name: CERT_DIRECTORY_PATH + value: "/etc/hyperledger/fabric-signcerts/signcerts.pem" + - name: TLS_CERT_PATH + value: "/etc/hyperledger/fabric-ca-crt/ca.crt" + volumes: + - name: keystore + secret: + secretName: dlt-keystone + - name: signcerts + secret: + secretName: dlt-signcerts + - name: ca-crt + secret: + secretName: dlt-ca-crt + +--- +apiVersion: v1 +kind: Service +metadata: + name: gatewayservice +spec: + selector: + app: dltservice + ports: + - protocol: TCP + port: 50051 + targetPort: 50051 + nodePort: 32001 + type: NodePort + --- apiVersion: v1 kind: Service diff --git a/manifests/interdomainservice.yaml b/manifests/interdomainservice.yaml index 9be6032cfbb59cb580219ca71451be24dac93205..8926dcdafdea90ad7dea41eca854cbcb30853553 100644 --- a/manifests/interdomainservice.yaml +++ b/manifests/interdomainservice.yaml @@ -38,6 +38,8 @@ spec: value: "INFO" - name: TOPOLOGY_ABSTRACTOR value: "DISABLE" + - name: DLT_INTEGRATION + value: "DISABLE" readinessProbe: exec: command: ["/bin/grpc_health_probe", "-addr=:10010"] diff --git a/manifests/kpi_managerservice.yaml b/manifests/kpi_managerservice.yaml index 984d783a9de7ed3c0c02e87d82ec673dc19c9508..f8ee8ff821ec1acb689cbe8d0bb8f8f407c971e3 100644 --- a/manifests/kpi_managerservice.yaml +++ b/manifests/kpi_managerservice.yaml @@ -39,9 +39,11 @@ spec: env: - name: LOG_LEVEL value: "INFO" + - name: CRDB_DATABASE + value: "tfs_kpi_mgmt" envFrom: - secretRef: - name: crdb-kpi-data + name: crdb-data readinessProbe: exec: command: ["/bin/grpc_health_probe", "-addr=:30010"] diff --git a/manifests/nbiservice.yaml b/manifests/nbiservice.yaml index d3892118a3d8330335b58459a0953bb45e4854ea..70f553e6425ca7972b8af185f432842b4e184790 100644 --- a/manifests/nbiservice.yaml +++ b/manifests/nbiservice.yaml @@ -38,6 +38,8 @@ spec: env: - name: LOG_LEVEL value: "INFO" + - name: IETF_NETWORK_RENDERER + value: "LIBYANG" readinessProbe: exec: command: ["/bin/grpc_health_probe", "-addr=:9090"] diff --git a/manifests/nginx_ingress_http.yaml b/manifests/nginx_ingress_http.yaml index 955d5726a9f8f79560327a8f595c1865f6d37d22..619d85f7a82af48c71464038bf14a833903d1a58 100644 --- a/manifests/nginx_ingress_http.yaml +++ b/manifests/nginx_ingress_http.yaml @@ -62,3 +62,10 @@ spec: name: nbiservice port: number: 8080 + - path: /()(qkd_app/.*) + pathType: Prefix + backend: + service: + name: nbiservice + port: + number: 8080 diff --git a/manifests/qkd_appservice.yaml b/manifests/qkd_appservice.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ba02e2e1da34ac670f68e17c28e9847603401d3a --- /dev/null +++ b/manifests/qkd_appservice.yaml @@ -0,0 +1,79 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: qkd-appservice +spec: + selector: + matchLabels: + app: qkd-appservice + #replicas: 1 + template: + metadata: + labels: + app: qkd-appservice + spec: + terminationGracePeriodSeconds: 5 + containers: + - name: server + image: labs.etsi.org:5050/tfs/controller/qkd_app:latest + imagePullPolicy: Always + ports: + - containerPort: 10060 + - containerPort: 9192 + env: + - name: LOG_LEVEL + value: "INFO" + - name: CRDB_DATABASE + value: "qkd_app" + envFrom: + - secretRef: + name: crdb-data + - secretRef: + name: nats-data + readinessProbe: + exec: + command: ["/bin/grpc_health_probe", "-addr=:10060"] + livenessProbe: + exec: + command: ["/bin/grpc_health_probe", "-addr=:10060"] + resources: + requests: + cpu: 150m + memory: 128Mi + limits: + cpu: 500m + memory: 512Mi +--- +apiVersion: v1 +kind: Service +metadata: + name: qkd-appservice + labels: + app: qkd-appservice +spec: + type: ClusterIP + selector: + app: qkd-appservice + ports: + - name: grpc + protocol: TCP + port: 10060 + targetPort: 10060 + - name: metrics + protocol: TCP + port: 9192 + targetPort: 9192 diff --git a/manifests/qos_profileservice.yaml b/manifests/qos_profileservice.yaml new file mode 100644 index 0000000000000000000000000000000000000000..801607880bbcd9a51bacbec396f797dda7132d81 --- /dev/null +++ b/manifests/qos_profileservice.yaml @@ -0,0 +1,101 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: qos-profileservice +spec: + selector: + matchLabels: + app: qos-profileservice + #replicas: 1 + template: + metadata: + annotations: + config.linkerd.io/skip-outbound-ports: "4222" + labels: + app: qos-profileservice + spec: + terminationGracePeriodSeconds: 5 + containers: + - name: server + image: labs.etsi.org:5050/tfs/controller/qos_profile:latest + imagePullPolicy: Always + ports: + - containerPort: 20040 + - containerPort: 9192 + env: + - name: LOG_LEVEL + value: "INFO" + - name: CRDB_DATABASE + value: "tfs_qos_profile" + envFrom: + - secretRef: + name: crdb-data + readinessProbe: + exec: + command: ["/bin/grpc_health_probe", "-addr=:20040"] + livenessProbe: + exec: + command: ["/bin/grpc_health_probe", "-addr=:20040"] + resources: + requests: + cpu: 250m + memory: 128Mi + limits: + cpu: 1000m + memory: 1024Mi +--- +apiVersion: v1 +kind: Service +metadata: + name: qos-profileservice + labels: + app: qos-profileservice +spec: + type: ClusterIP + selector: + app: qos-profileservice + ports: + - name: grpc + protocol: TCP + port: 20040 + targetPort: 20040 + - name: metrics + protocol: TCP + port: 9192 + targetPort: 9192 +--- +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: qos-profileservice-hpa +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: qos-profileservice + minReplicas: 1 + maxReplicas: 20 + metrics: + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: 80 + #behavior: + # scaleDown: + # stabilizationWindowSeconds: 30 diff --git a/manifests/servicemonitors.yaml b/manifests/servicemonitors.yaml index 716c1c6891802d7fcc55da798d06c650373fb1b5..8a8fe6f39eff87d12582f2f83734c07dc695cea3 100644 --- a/manifests/servicemonitors.yaml +++ b/manifests/servicemonitors.yaml @@ -475,3 +475,156 @@ spec: any: false matchNames: - tfs # namespace where the app is running +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + namespace: monitoring # namespace where prometheus is running + name: tfs-analyticsservice-metric + labels: + app: analyticsservice + #release: prometheus + #release: prom # name of the release + # ( VERY IMPORTANT: You need to know the correct release name by viewing + # the servicemonitor of Prometheus itself: Without the correct name, + # Prometheus cannot identify the metrics of the Flask app as the target.) +spec: + selector: + matchLabels: + # Target app service + #namespace: tfs + app: analyticsservice # same as above + #release: prometheus # same as above + endpoints: + - port: metrics-frontend # named port in target app + scheme: http + path: /metrics # path to scrape + interval: 5s # scrape interval + - port: metrics-backend # named port in target app + scheme: http + path: /metrics # path to scrape + interval: 5s # scrape interval + namespaceSelector: + any: false + matchNames: + - tfs # namespace where the app is running +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + namespace: monitoring # namespace where prometheus is running + name: tfs-telemetryservice-metric + labels: + app: telemetryservice + #release: prometheus + #release: prom # name of the release + # ( VERY IMPORTANT: You need to know the correct release name by viewing + # the servicemonitor of Prometheus itself: Without the correct name, + # Prometheus cannot identify the metrics of the Flask app as the target.) +spec: + selector: + matchLabels: + # Target app service + #namespace: tfs + app: telemetryservice # same as above + #release: prometheus # same as above + endpoints: + - port: metrics-frontend # named port in target app + scheme: http + path: /metrics # path to scrape + interval: 5s # scrape interval + - port: metrics-backend # named port in target app + scheme: http + path: /metrics # path to scrape + interval: 5s # scrape interval + namespaceSelector: + any: false + matchNames: + - tfs # namespace where the app is running +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + namespace: monitoring # namespace where prometheus is running + name: tfs-kpi-managerservice-metric + labels: + app: kpi-managerservice + #release: prometheus + #release: prom # name of the release + # ( VERY IMPORTANT: You need to know the correct release name by viewing + # the servicemonitor of Prometheus itself: Without the correct name, + # Prometheus cannot identify the metrics of the Flask app as the target.) +spec: + selector: + matchLabels: + # Target app service + #namespace: tfs + app: kpi-managerservice # same as above + #release: prometheus # same as above + endpoints: + - port: metrics # named port in target app + scheme: http + path: /metrics # path to scrape + interval: 5s # scrape interval + namespaceSelector: + any: false + matchNames: + - tfs # namespace where the app is running +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + namespace: monitoring # namespace where prometheus is running + name: tfs-kpi_value_apiservice-metric + labels: + app: kpi_value_apiservice + #release: prometheus + #release: prom # name of the release + # ( VERY IMPORTANT: You need to know the correct release name by viewing + # the servicemonitor of Prometheus itself: Without the correct name, + # Prometheus cannot identify the metrics of the Flask app as the target.) +spec: + selector: + matchLabels: + # Target app service + #namespace: tfs + app: kpi_value_apiservice # same as above + #release: prometheus # same as above + endpoints: + - port: metrics # named port in target app + scheme: http + path: /metrics # path to scrape + interval: 5s # scrape interval + namespaceSelector: + any: false + matchNames: + - tfs # namespace where the app is running +--- +apiVersion: monitoring.coreos.com/v1 +kind: ServiceMonitor +metadata: + namespace: monitoring # namespace where prometheus is running + name: tfs-kpi_value_writerservice-metric + labels: + app: kpi_value_writerservice + #release: prometheus + #release: prom # name of the release + # ( VERY IMPORTANT: You need to know the correct release name by viewing + # the servicemonitor of Prometheus itself: Without the correct name, + # Prometheus cannot identify the metrics of the Flask app as the target.) +spec: + selector: + matchLabels: + # Target app service + #namespace: tfs + app: kpi_value_writerservice # same as above + #release: prometheus # same as above + endpoints: + - port: metrics # named port in target app + scheme: http + path: /metrics # path to scrape + interval: 5s # scrape interval + namespaceSelector: + any: false + matchNames: + - tfs # namespace where the app is running diff --git a/manifests/telemetryservice.yaml b/manifests/telemetryservice.yaml index 2f9917499a425b95d436ffa8cdb311d29483d2ca..cd35d2698816bcfc5bc2030506eb2897a85708f6 100644 --- a/manifests/telemetryservice.yaml +++ b/manifests/telemetryservice.yaml @@ -37,9 +37,13 @@ spec: env: - name: LOG_LEVEL value: "INFO" + - name: CRDB_DATABASE + value: "tfs_telemetry" + - name: METRICS_PORT + value: "9192" envFrom: - secretRef: - name: crdb-telemetry + name: crdb-data - secretRef: name: kfk-kpi-data readinessProbe: @@ -60,10 +64,12 @@ spec: imagePullPolicy: Always ports: - containerPort: 30060 - - containerPort: 9192 + - containerPort: 9193 env: - name: LOG_LEVEL value: "INFO" + - name: METRICS_PORT + value: "9193" envFrom: - secretRef: name: kfk-kpi-data @@ -100,10 +106,14 @@ spec: protocol: TCP port: 30060 targetPort: 30060 - - name: metrics + - name: metrics-frontend protocol: TCP port: 9192 targetPort: 9192 + - name: metrics-backend + protocol: TCP + port: 9193 + targetPort: 9193 --- apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler diff --git a/my_deploy.sh b/my_deploy.sh index 45e0d1301b2807ae7393d45366f849c69285b909..344ca44ee335e73dcc7b8f8c9ca71ead7d90880f 100755 --- a/my_deploy.sh +++ b/my_deploy.sh @@ -26,7 +26,10 @@ export TFS_COMPONENTS="context device pathcomp service slice nbi webui load_gene #export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring" # Uncomment to activate Monitoring Framework (new) -#export TFS_COMPONENTS="${TFS_COMPONENTS} kpi_manager kpi_value_writer kpi_value_api" +#export TFS_COMPONENTS="${TFS_COMPONENTS} kpi_manager kpi_value_writer kpi_value_api telemetry analytics automation" + +# Uncomment to activate QoS Profiles +#export TFS_COMPONENTS="${TFS_COMPONENTS} qos_profile" # Uncomment to activate BGP-LS Speaker #export TFS_COMPONENTS="${TFS_COMPONENTS} bgpls_speaker" @@ -62,6 +65,25 @@ export TFS_COMPONENTS="context device pathcomp service slice nbi webui load_gene # Uncomment to activate E2E Orchestrator #export TFS_COMPONENTS="${TFS_COMPONENTS} e2e_orchestrator" +# Uncomment to activate DLT and Interdomain +#export TFS_COMPONENTS="${TFS_COMPONENTS} interdomain dlt" +#if [[ "$TFS_COMPONENTS" == *"dlt"* ]]; then +# export KEY_DIRECTORY_PATH="src/dlt/gateway/keys/priv_sk" +# export CERT_DIRECTORY_PATH="src/dlt/gateway/keys/cert.pem" +# export TLS_CERT_PATH="src/dlt/gateway/keys/ca.crt" +#fi + +# Uncomment to activate QKD App +# To manage QKD Apps, "service" requires "qkd_app" to be deployed +# before "service", thus we "hack" the TFS_COMPONENTS environment variable prepending the +# "qkd_app" only if "service" is already in TFS_COMPONENTS, and re-export it. +#if [[ "$TFS_COMPONENTS" == *"service"* ]]; then +# BEFORE="${TFS_COMPONENTS% service*}" +# AFTER="${TFS_COMPONENTS#* service}" +# export TFS_COMPONENTS="${BEFORE} qkd_app service ${AFTER}" +#fi + + # Set the tag you want to use for your images. export TFS_IMAGE_TAG="dev" diff --git a/proto/analytics_frontend.proto b/proto/analytics_frontend.proto index ace0581db816bee1d0d20746f2b864dce602567b..bb6afb2e424b646fd8d9a6810c38a8a6863c230f 100644 --- a/proto/analytics_frontend.proto +++ b/proto/analytics_frontend.proto @@ -20,7 +20,7 @@ import "kpi_manager.proto"; //import "kpi_sample_types.proto"; service AnalyticsFrontendService { - rpc StartAnalyzer (Analyzer ) returns (AnalyzerId ) {} + rpc StartAnalyzer (Analyzer ) returns (AnalyzerId) {} rpc StopAnalyzer (AnalyzerId ) returns (context.Empty) {} rpc SelectAnalyzers(AnalyzerFilter) returns (AnalyzerList ) {} } diff --git a/proto/automation.proto b/proto/automation.proto new file mode 100644 index 0000000000000000000000000000000000000000..edb1ef404171270e740e2b30944151d98607292c --- /dev/null +++ b/proto/automation.proto @@ -0,0 +1,69 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; +package automation; + +import "context.proto"; +import "policy.proto"; + +// Automation service RPCs +service AutomationService { + rpc ZSMCreate (ZSMCreateRequest ) returns (ZSMService ) {} + rpc ZSMUpdate (ZSMCreateUpdate ) returns (ZSMService ) {} + rpc ZSMDelete (ZSMServiceID ) returns (ZSMServiceState) {} + rpc ZSMGetById (ZSMServiceID ) returns (ZSMService ) {} + rpc ZSMGetByService (context.ServiceId) returns (ZSMService ) {} +} + +// ZSM service states +enum ZSMServiceStateEnum { + ZSM_UNDEFINED = 0; // Undefined ZSM loop state + ZSM_FAILED = 1; // ZSM loop failed + ZSM_ACTIVE = 2; // ZSM loop is currently active + ZSM_INACTIVE = 3; // ZSM loop is currently inactive + ZSM_UPDATED = 4; // ZSM loop is updated + ZSM_REMOVED = 5; // ZSM loop is removed +} + +message ZSMCreateRequest { + context.ServiceId serviceId = 1; + policy.PolicyRuleList policyList = 2; +} + +message ZSMCreateUpdate { + context.Uuid ZSMServiceID = 1; + policy.PolicyRuleList policyList = 2; +} + +// A unique identifier per ZSM service +message ZSMServiceID { + context.Uuid uuid = 1; +} + +// The state of a ZSM service +message ZSMServiceState { + ZSMServiceStateEnum zsmServiceState = 1; + string zsmServiceStateMessage = 2; +} + +// Basic ZSM service attributes +message ZSMService { + ZSMServiceID zsmServiceId = 1; + + context.ServiceId serviceId = 2; + policy.PolicyRuleList policyList = 3; + + // TODO: When new Analytics and updated Monitoring are in place, add the necessary binding to them +} diff --git a/proto/context.proto b/proto/context.proto index 87f69132df022e2aa4a0766dc9f0a7a7fae36d59..85972d956a93dfe09ec9a955cf304c8b3e298bb3 100644 --- a/proto/context.proto +++ b/proto/context.proto @@ -214,6 +214,7 @@ enum DeviceDriverEnum { DEVICEDRIVER_OPTICAL_TFS = 9; DEVICEDRIVER_IETF_ACTN = 10; DEVICEDRIVER_OC = 11; + DEVICEDRIVER_QKD = 12; } enum DeviceOperationalStatusEnum { @@ -300,6 +301,7 @@ enum ServiceTypeEnum { SERVICETYPE_TE = 4; SERVICETYPE_E2E = 5; SERVICETYPE_OPTICAL_CONNECTIVITY = 6; + SERVICETYPE_QKD = 7; } enum ServiceStatusEnum { @@ -534,7 +536,7 @@ message Constraint_Custom { } message Constraint_Schedule { - float start_timestamp = 1; + double start_timestamp = 1; float duration_days = 2; } @@ -597,6 +599,16 @@ message Constraint_Exclusions { repeated LinkId link_ids = 4; } + +message QoSProfileId { + context.Uuid qos_profile_id = 1; +} + +message Constraint_QoSProfile { + QoSProfileId qos_profile_id = 1; + string qos_profile_name = 2; +} + message Constraint { ConstraintActionEnum action = 1; oneof constraint { @@ -609,6 +621,7 @@ message Constraint { Constraint_SLA_Availability sla_availability = 8; Constraint_SLA_Isolation_level sla_isolation = 9; Constraint_Exclusions exclusions = 10; + Constraint_QoSProfile qos_profile = 11; } } diff --git a/proto/kpi_value_api.proto b/proto/kpi_value_api.proto index dff96272e3d05756dd19a49ecaede7311b196540..a97b0ae2b023dfe0a535aa3cb1ba63b00b418371 100644 --- a/proto/kpi_value_api.proto +++ b/proto/kpi_value_api.proto @@ -19,18 +19,19 @@ import "context.proto"; import "kpi_manager.proto"; service KpiValueAPIService { - rpc StoreKpiValues (KpiValueList) returns (context.Empty) {} - rpc SelectKpiValues (KpiValueFilter) returns (KpiValueList) {} + rpc StoreKpiValues (KpiValueList ) returns (context.Empty ) {} + rpc SelectKpiValues (KpiValueFilter ) returns (KpiValueList ) {} + rpc GetKpiAlarms (kpi_manager.KpiId) returns (stream KpiAlarms) {} } message KpiValue { - kpi_manager.KpiId kpi_id = 1; - context.Timestamp timestamp = 2; - KpiValueType kpi_value_type = 3; + kpi_manager.KpiId kpi_id = 1; + context.Timestamp timestamp = 2; + KpiValueType kpi_value_type = 3; } message KpiValueList { - repeated KpiValue kpi_value_list = 1; + repeated KpiValue kpi_value_list = 1; } message KpiValueType { @@ -46,7 +47,14 @@ message KpiValueType { } message KpiValueFilter { - repeated kpi_manager.KpiId kpi_id = 1; - repeated context.Timestamp start_timestamp = 2; - repeated context.Timestamp end_timestamp = 3; + repeated kpi_manager.KpiId kpi_id = 1; + repeated context.Timestamp start_timestamp = 2; + repeated context.Timestamp end_timestamp = 3; +} + +message KpiAlarms { + context.Timestamp start_timestamp = 1; + context.Timestamp end_timestamp = 2; + kpi_manager.KpiId kpi_id = 3; + map<string, bool> alarms = 4; } diff --git a/proto/qkd_app.proto b/proto/qkd_app.proto new file mode 100644 index 0000000000000000000000000000000000000000..b22948d6cd3040146677d378a080283786d44f96 --- /dev/null +++ b/proto/qkd_app.proto @@ -0,0 +1,80 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; +package qkd_app; + +import "context.proto"; + +// Define Empty message if you don't want to use google.protobuf.Empty. +message Empty {} + +// Enum representing possible states of a QKD application. +enum QKDAppStatusEnum { + QKDAPPSTATUS_ON = 0; + QKDAPPSTATUS_DISCONNECTED = 1; + QKDAPPSTATUS_OUT_OF_TIME = 2; + QKDAPPSTATUS_ZOMBIE = 3; +} + +// Enum representing QKD application types. +enum QKDAppTypesEnum { + QKDAPPTYPES_INTERNAL = 0; + QKDAPPTYPES_CLIENT = 1; +} + +// Message representing a QKDL (Quantum Key Distribution Link) identifier. +message QKDLId { + context.Uuid qkdl_uuid = 1; +} + +// Define QoS parameters for QKD applications +message QoS { + uint32 max_bandwidth = 1; // Maximum bandwidth (in bits per second) + uint32 min_bandwidth = 2; // Minimum bandwidth (optional) + uint32 jitter = 3; // Maximum jitter (in milliseconds) + uint32 ttl = 4; // Time-to-live (in seconds) +} + +// Main message representing a QKD application with all required fields. +message App { + AppId app_id = 1; + QKDAppStatusEnum app_status = 2; + QKDAppTypesEnum app_type = 3; + string server_app_id = 4; + repeated string client_app_id = 5; + repeated QKDLId backing_qkdl_id = 6; + context.DeviceId local_device_id = 7; + context.DeviceId remote_device_id = 8; + QoS qos = 9; // Include QoS in the App message +} + +// Message representing an identifier for an app. +message AppId { + context.ContextId context_id = 1; + context.Uuid app_uuid = 2; +} + +// Service definition for AppService, including app registration and listing. +service AppService { + rpc RegisterApp(App) returns (context.Empty) {} + rpc ListApps(context.ContextId) returns (AppList) {} + rpc GetApp(AppId) returns (App) {} + rpc DeleteApp (AppId) returns (Empty) {} // Use locally defined Empty +} + +// Message representing a list of apps. +message AppList { + repeated App apps = 1; +} diff --git a/proto/qos_profile.proto b/proto/qos_profile.proto new file mode 100644 index 0000000000000000000000000000000000000000..d032addf4889c8a7a19c260c23df6c74c8ffe55b --- /dev/null +++ b/proto/qos_profile.proto @@ -0,0 +1,58 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; +package qos_profile; + +import "context.proto"; + +message QoSProfileValueUnitPair { + int32 value = 1; + string unit = 2; +} + +message QoDConstraintsRequest { + context.QoSProfileId qos_profile_id = 1; + double start_timestamp = 2; + float duration = 3; +} + +message QoSProfile { + context.QoSProfileId qos_profile_id = 1; + string name = 2; + string description = 3; + string status = 4; + QoSProfileValueUnitPair targetMinUpstreamRate = 5; + QoSProfileValueUnitPair maxUpstreamRate = 6; + QoSProfileValueUnitPair maxUpstreamBurstRate = 7; + QoSProfileValueUnitPair targetMinDownstreamRate = 8; + QoSProfileValueUnitPair maxDownstreamRate = 9; + QoSProfileValueUnitPair maxDownstreamBurstRate = 10; + QoSProfileValueUnitPair minDuration = 11; + QoSProfileValueUnitPair maxDuration = 12; + int32 priority = 13; + QoSProfileValueUnitPair packetDelayBudget = 14; + QoSProfileValueUnitPair jitter = 15; + int32 packetErrorLossRate = 16; +} + + +service QoSProfileService { + rpc CreateQoSProfile (QoSProfile ) returns ( QoSProfile ) {} + rpc UpdateQoSProfile (QoSProfile ) returns ( QoSProfile ) {} + rpc DeleteQoSProfile (context.QoSProfileId ) returns ( context.Empty ) {} + rpc GetQoSProfile (context.QoSProfileId ) returns ( QoSProfile ) {} + rpc GetQoSProfiles (context.Empty ) returns (stream QoSProfile ) {} + rpc GetConstraintListFromQoSProfile (QoDConstraintsRequest) returns (stream context.Constraint) {} +} diff --git a/scripts/run_tests_locally-analytics-DB.sh b/scripts/run_tests_locally-analytics-DB.sh index 9df5068d6bde361a4a1e73b96990c0d407c88cb4..3efc8f97177ee821d7c4c1ce19ccb0a0f8731cce 100755 --- a/scripts/run_tests_locally-analytics-DB.sh +++ b/scripts/run_tests_locally-analytics-DB.sh @@ -19,6 +19,6 @@ PROJECTDIR=`pwd` cd $PROJECTDIR/src RCFILE=$PROJECTDIR/coverage/.coveragerc CRDB_SQL_ADDRESS=$(kubectl get service cockroachdb-public --namespace crdb -o jsonpath='{.spec.clusterIP}') -export CRDB_URI="cockroachdb://tfs:tfs123@${CRDB_SQL_ADDRESS}:26257/tfs_kpi_mgmt?sslmode=require" +export CRDB_URI="cockroachdb://tfs:tfs123@${CRDB_SQL_ADDRESS}:26257/tfs_analytics?sslmode=require" python3 -m pytest --log-level=DEBUG --log-cli-level=DEBUG --verbose \ analytics/tests/test_analytics_db.py diff --git a/scripts/run_tests_locally-analytics-backend.sh b/scripts/run_tests_locally-analytics-backend.sh new file mode 100755 index 0000000000000000000000000000000000000000..f2e0120278f07f01e41ccd90357a5ee863cb5698 --- /dev/null +++ b/scripts/run_tests_locally-analytics-backend.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +PROJECTDIR=`pwd` + +cd $PROJECTDIR/src +RCFILE=$PROJECTDIR/coverage/.coveragerc +export KFK_SERVER_ADDRESS='127.0.0.1:9092' +CRDB_SQL_ADDRESS=$(kubectl get service cockroachdb-public --namespace crdb -o jsonpath='{.spec.clusterIP}') +export CRDB_URI="cockroachdb://tfs:tfs123@${CRDB_SQL_ADDRESS}:26257/tfs_analytics?sslmode=require" +python3 -m pytest --log-level=DEBUG --log-cli-level=DEBUG --verbose \ + analytics/backend/tests/test_backend.py diff --git a/scripts/run_tests_locally-analytics-frontend.sh b/scripts/run_tests_locally-analytics-frontend.sh index e30d30da623b2d0eee3d925d69a846b4b1f516a3..ea04e0323b79c3308e279add86421bdc2d1a46bd 100755 --- a/scripts/run_tests_locally-analytics-frontend.sh +++ b/scripts/run_tests_locally-analytics-frontend.sh @@ -18,7 +18,8 @@ PROJECTDIR=`pwd` cd $PROJECTDIR/src RCFILE=$PROJECTDIR/coverage/.coveragerc +export KFK_SERVER_ADDRESS='127.0.0.1:9092' CRDB_SQL_ADDRESS=$(kubectl get service cockroachdb-public --namespace crdb -o jsonpath='{.spec.clusterIP}') -export CRDB_URI="cockroachdb://tfs:tfs123@${CRDB_SQL_ADDRESS}:26257/tfs_kpi_mgmt?sslmode=require" +export CRDB_URI="cockroachdb://tfs:tfs123@${CRDB_SQL_ADDRESS}:26257/tfs_analytics?sslmode=require" python3 -m pytest --log-level=DEBUG --log-cli-level=DEBUG --verbose \ analytics/frontend/tests/test_frontend.py diff --git a/scripts/run_tests_locally-kpi-DB.sh b/scripts/run_tests_locally-kpi-DB.sh index 4953b49e0a437becfda1648c722bcdcf92c58d93..29c6595102c22bc47fa221eb80459aea934cbcd9 100755 --- a/scripts/run_tests_locally-kpi-DB.sh +++ b/scripts/run_tests_locally-kpi-DB.sh @@ -24,7 +24,7 @@ cd $PROJECTDIR/src # python3 kpi_manager/tests/test_unitary.py RCFILE=$PROJECTDIR/coverage/.coveragerc -CRDB_SQL_ADDRESS=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.clusterIP}') +CRDB_SQL_ADDRESS=$(kubectl get service --namespace ${CRDB_NAMESPACE} cockroachdb-public -o 'jsonpath={.spec.clusterIP}') export CRDB_URI="cockroachdb://tfs:tfs123@${CRDB_SQL_ADDRESS}:26257/tfs_kpi_mgmt?sslmode=require" python3 -m pytest --log-level=DEBUG --log-cli-level=DEBUG --verbose \ kpi_manager/tests/test_kpi_db.py diff --git a/scripts/run_tests_locally-kpi-value-API.sh b/scripts/run_tests_locally-kpi-value-API.sh index 3953d2a89c6fbe2bd3546e648246b9b018e5fdb0..96ac558bad5f0bf6bc6f5ee90a26cd11fda69273 100755 --- a/scripts/run_tests_locally-kpi-value-API.sh +++ b/scripts/run_tests_locally-kpi-value-API.sh @@ -19,8 +19,9 @@ PROJECTDIR=`pwd` cd $PROJECTDIR/src RCFILE=$PROJECTDIR/coverage/.coveragerc -KAFKA_IP=$(docker inspect kafka --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}") -KFK_SERVER_ADDRESS=${KAFKA_IP}:9092 +# KAFKA_IP=$(docker inspect kafka --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}") +# export KFK_SERVER_ADDRESS=${KAFKA_IP}:9092 +export KFK_SERVER_ADDRESS='127.0.0.1:9092' # helpful pytest flags: --log-level=INFO -o log_cli=true --verbose --maxfail=1 --durations=0 python3 -m pytest --log-level=DEBUG --log-cli-level=DEBUG -o log_cli=true --verbose \ kpi_value_api/tests/test_kpi_value_api.py diff --git a/scripts/run_tests_locally-kpi-value-writer.sh b/scripts/run_tests_locally-kpi-value-writer.sh index 8faaeb6d895a240278d7ceb0c5c0b2855fa25910..6c3f16261a2d0e2083b17bcd205011b4347205be 100755 --- a/scripts/run_tests_locally-kpi-value-writer.sh +++ b/scripts/run_tests_locally-kpi-value-writer.sh @@ -18,6 +18,7 @@ PROJECTDIR=`pwd` cd $PROJECTDIR/src +export KFK_SERVER_ADDRESS='127.0.0.1:9092' RCFILE=$PROJECTDIR/coverage/.coveragerc python3 -m pytest --log-level=DEBUG --log-cli-level=DEBUG --verbose \ kpi_value_writer/tests/test_kpi_value_writer.py diff --git a/scripts/run_tests_locally-telemetry-DB.sh b/scripts/run_tests_locally-telemetry-DB.sh index 4b9a417603cc42a4e7e8b19c7394cc38633817fa..b9f86a208aab3fddbf243ba986de153775f30c2c 100755 --- a/scripts/run_tests_locally-telemetry-DB.sh +++ b/scripts/run_tests_locally-telemetry-DB.sh @@ -20,7 +20,8 @@ cd $PROJECTDIR/src # RCFILE=$PROJECTDIR/coverage/.coveragerc # coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \ # kpi_manager/tests/test_unitary.py - +CRDB_SQL_ADDRESS=$(kubectl get service --namespace ${CRDB_NAMESPACE} cockroachdb-public -o 'jsonpath={.spec.clusterIP}') +export CRDB_URI="cockroachdb://tfs:tfs123@${CRDB_SQL_ADDRESS}:26257/tfs_telemetry?sslmode=require" RCFILE=$PROJECTDIR/coverage/.coveragerc python3 -m pytest --log-level=DEBUG --log-cli-level=debug --verbose \ telemetry/tests/test_telemetryDB.py diff --git a/scripts/run_tests_locally-telemetry-backend.sh b/scripts/run_tests_locally-telemetry-backend.sh index 79db05fcf1259365e8a909ee99395eb59dfb9437..f711282401d8fff9b6c98cea7c9240482f1ba24b 100755 --- a/scripts/run_tests_locally-telemetry-backend.sh +++ b/scripts/run_tests_locally-telemetry-backend.sh @@ -22,7 +22,11 @@ cd $PROJECTDIR/src # kpi_manager/tests/test_unitary.py # python3 kpi_manager/tests/test_unitary.py - +export KFK_SERVER_ADDRESS='127.0.0.1:9092' +CRDB_SQL_ADDRESS=$(kubectl get service cockroachdb-public --namespace crdb -o jsonpath='{.spec.clusterIP}') +export CRDB_URI="cockroachdb://tfs:tfs123@${CRDB_SQL_ADDRESS}:26257/tfs_telemetry?sslmode=require" RCFILE=$PROJECTDIR/coverage/.coveragerc + + python3 -m pytest --log-level=INFO --log-cli-level=debug --verbose \ telemetry/backend/tests/test_TelemetryBackend.py diff --git a/scripts/run_tests_locally-telemetry-frontend.sh b/scripts/run_tests_locally-telemetry-frontend.sh index a2a1de52340cac527d4d1c446c76740d38ce7783..4bb7bc3fa8e198ead54224148f60044e079ccdf3 100755 --- a/scripts/run_tests_locally-telemetry-frontend.sh +++ b/scripts/run_tests_locally-telemetry-frontend.sh @@ -17,12 +17,11 @@ PROJECTDIR=`pwd` cd $PROJECTDIR/src -# RCFILE=$PROJECTDIR/coverage/.coveragerc -# coverage run --rcfile=$RCFILE --append -m pytest --log-level=INFO --verbose \ -# kpi_manager/tests/test_unitary.py # python3 kpi_manager/tests/test_unitary.py - +export KFK_SERVER_ADDRESS='127.0.0.1:9092' +CRDB_SQL_ADDRESS=$(kubectl get service cockroachdb-public --namespace crdb -o jsonpath='{.spec.clusterIP}') +export CRDB_URI="cockroachdb://tfs:tfs123@${CRDB_SQL_ADDRESS}:26257/tfs_telemetry?sslmode=require" RCFILE=$PROJECTDIR/coverage/.coveragerc python3 -m pytest --log-level=DEBUG --log-cli-level=DEBUG --verbose \ telemetry/frontend/tests/test_frontend.py diff --git a/scripts/show_logs_qkd_app.sh b/scripts/show_logs_qkd_app.sh new file mode 100755 index 0000000000000000000000000000000000000000..f4f9ee6a13367c8d50eb4401a5d5f357726e5966 --- /dev/null +++ b/scripts/show_logs_qkd_app.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +######################################################################################################################## +# Define your deployment settings here +######################################################################################################################## + +# If not already set, set the name of the Kubernetes namespace to deploy to. +export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"} + +######################################################################################################################## +# Automated steps start here +######################################################################################################################## + +kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/qkd-appservice -c server diff --git a/scripts/show_logs_qos_profile.sh b/scripts/show_logs_qos_profile.sh new file mode 100755 index 0000000000000000000000000000000000000000..744bed9a62af6c376e94d7d13492b796821ecc53 --- /dev/null +++ b/scripts/show_logs_qos_profile.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +######################################################################################################################## +# Define your deployment settings here +######################################################################################################################## + +# If not already set, set the name of the Kubernetes namespace to deploy to. +export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"} + +######################################################################################################################## +# Automated steps start here +######################################################################################################################## + +kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/qos_profileservice -c server diff --git a/scripts/show_logs_telemetry-backend.sh b/scripts/show_logs_telemetry-backend.sh new file mode 100755 index 0000000000000000000000000000000000000000..c28083dcbf5c7056145d1a0696116da66b5e9828 --- /dev/null +++ b/scripts/show_logs_telemetry-backend.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +######################################################################################################################## +# Define your deployment settings here +######################################################################################################################## + +# If not already set, set the name of the Kubernetes namespace to deploy to. +export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"} + +######################################################################################################################## +# Automated steps start here +######################################################################################################################## + +kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/telemetryservice -c backend diff --git a/scripts/show_logs_telemetry-frontend.sh b/scripts/show_logs_telemetry-frontend.sh new file mode 100755 index 0000000000000000000000000000000000000000..821dc275b22ebf7ffc63d2e8c41dfab684407895 --- /dev/null +++ b/scripts/show_logs_telemetry-frontend.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +######################################################################################################################## +# Define your deployment settings here +######################################################################################################################## + +# If not already set, set the name of the Kubernetes namespace to deploy to. +export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"} + +######################################################################################################################## +# Automated steps start here +######################################################################################################################## + +kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/telemetryservice -c frontend diff --git a/src/analytics/.gitlab-ci.yml b/src/analytics/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..dfc5f2195eeee621e95465bbc996d5a9af3e6c9c --- /dev/null +++ b/src/analytics/.gitlab-ci.yml @@ -0,0 +1,206 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Build, tag, and push the Docker image to the GitLab Docker registry +build analytics: + variables: + IMAGE_NAME: 'analytics' # name of the microservice + IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) + stage: build + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + script: + # This first build tags the builder resulting image to prevent being removed by dangling image removal command + # - docker buildx build -t "${IMAGE_NAME}-backend:${IMAGE_TAG}-builder" --target builder -f ./src/$IMAGE_NAME/backend/Dockerfile . + - docker buildx build -t "${IMAGE_NAME}-frontend:$IMAGE_TAG" -f ./src/$IMAGE_NAME/frontend/Dockerfile . + - docker buildx build -t "${IMAGE_NAME}-backend:$IMAGE_TAG" -f ./src/$IMAGE_NAME/backend/Dockerfile . + - docker tag "${IMAGE_NAME}-frontend:$IMAGE_TAG" "$CI_REGISTRY_IMAGE/${IMAGE_NAME}-frontend:$IMAGE_TAG" + - docker tag "${IMAGE_NAME}-backend:$IMAGE_TAG" "$CI_REGISTRY_IMAGE/${IMAGE_NAME}-backend:$IMAGE_TAG" + - docker push "$CI_REGISTRY_IMAGE/${IMAGE_NAME}-frontend:$IMAGE_TAG" + - docker push "$CI_REGISTRY_IMAGE/${IMAGE_NAME}-backend:$IMAGE_TAG" + after_script: + - docker images --filter="dangling=true" --quiet | xargs -r docker rmi + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' + - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' + - changes: + - src/common/**/*.py + - proto/*.proto + - src/$IMAGE_NAME/.gitlab-ci.yml + - src/$IMAGE_NAME/frontend/**/*.{py,in,yml} + - src/$IMAGE_NAME/frontend/Dockerfile + - src/$IMAGE_NAME/frontend/tests/*.py + - src/$IMAGE_NAME/backend/Dockerfile + - src/$IMAGE_NAME/backend/**/*.{py,in,yml} + - src/$IMAGE_NAME/backend/tests/*.py + - manifests/${IMAGE_NAME}service.yaml + - .gitlab-ci.yml + +# Apply unit test to the component +unit_test analytics-backend: + variables: + IMAGE_NAME: 'analytics' # name of the microservice + IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) + stage: unit_test + needs: + - build analytics + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + - if docker network list | grep teraflowbridge; then echo "teraflowbridge is already created"; else docker network create -d bridge teraflowbridge; fi + - if docker container ls | grep kafka; then docker rm -f kafka; else echo "Kafka container is not in the system"; fi + - if docker container ls | grep zookeeper; then docker rm -f zookeeper; else echo "Zookeeper container is not in the system"; fi + # - if docker container ls | grep ${IMAGE_NAME}-frontend; then docker rm -f ${IMAGE_NAME}-frontend; else echo "${IMAGE_NAME}-frontend container is not in the system"; fi + - if docker container ls | grep ${IMAGE_NAME}-backend; then docker rm -f ${IMAGE_NAME}-backend; else echo "${IMAGE_NAME}-backend container is not in the system"; fi + - docker container prune -f + script: + - docker pull "$CI_REGISTRY_IMAGE/${IMAGE_NAME}-backend:$IMAGE_TAG" + - docker pull "bitnami/zookeeper:latest" + - docker pull "bitnami/kafka:latest" + - > + docker run --name zookeeper -d --network=teraflowbridge -p 2181:2181 + --env ALLOW_ANONYMOUS_LOGIN=yes + bitnami/zookeeper:latest + - sleep 10 # Wait for Zookeeper to start + - > + docker run --name kafka -d --network=teraflowbridge -p 9092:9092 + --env KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181 + --env ALLOW_PLAINTEXT_LISTENER=yes + bitnami/kafka:latest + - sleep 20 # Wait for Kafka to start + - KAFKA_IP=$(docker inspect kafka --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}") + - echo $KAFKA_IP + - > + docker run --name $IMAGE_NAME-backend -d -p 30060:30060 + --env "KFK_SERVER_ADDRESS=${KAFKA_IP}:9092" + --volume "$PWD/src/$IMAGE_NAME/backend/tests:/opt/results" + --network=teraflowbridge + $CI_REGISTRY_IMAGE/${IMAGE_NAME}-backend:$IMAGE_TAG + - docker ps -a + - sleep 5 + - docker logs ${IMAGE_NAME}-backend + - > + docker exec -i ${IMAGE_NAME}-backend bash -c + "coverage run -m pytest --log-level=INFO --verbose --junitxml=/opt/results/${IMAGE_NAME}-backend_report.xml $IMAGE_NAME/backend/tests/test_*.py" + - docker exec -i ${IMAGE_NAME}-backend bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing" + coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' + after_script: + - docker rm -f ${IMAGE_NAME}-backend + - docker rm -f kafka + - docker rm -f zookeeper + - docker network rm teraflowbridge + - docker volume prune --force + - docker image prune --force + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' + - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' + - changes: + - src/common/**/*.py + - proto/*.proto + - src/$IMAGE_NAME/backend/**/*.{py,in,yml} + - src/$IMAGE_NAME/backend/Dockerfile + - src/$IMAGE_NAME/backend/tests/*.py + - manifests/${IMAGE_NAME}service.yaml + - .gitlab-ci.yml + artifacts: + when: always + reports: + junit: src/$IMAGE_NAME/backend/tests/${IMAGE_NAME}-backend_report.xml + +# Apply unit test to the component +unit_test analytics-frontend: + variables: + IMAGE_NAME: 'analytics' # name of the microservice + IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) + stage: unit_test + needs: + - build analytics + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + - if docker network list | grep teraflowbridge; then echo "teraflowbridge is already created"; else docker network create -d bridge teraflowbridge; fi + - if docker container ls | grep crdb; then docker rm -f crdb; else echo "CockroachDB container is not in the system"; fi + - if docker volume ls | grep crdb; then docker volume rm -f crdb; else echo "CockroachDB volume is not in the system"; fi + - if docker container ls | grep kafka; then docker rm -f kafka; else echo "Kafka container is not in the system"; fi + - if docker container ls | grep zookeeper; then docker rm -f zookeeper; else echo "Zookeeper container is not in the system"; fi + - if docker container ls | grep ${IMAGE_NAME}-frontend; then docker rm -f ${IMAGE_NAME}-frontend; else echo "${IMAGE_NAME}-frontend container is not in the system"; fi + - docker container prune -f + script: + - docker pull "$CI_REGISTRY_IMAGE/${IMAGE_NAME}-frontend:$IMAGE_TAG" + - docker pull "bitnami/zookeeper:latest" + - docker pull "bitnami/kafka:latest" + - docker pull "cockroachdb/cockroach:latest-v22.2" + - docker volume create crdb + - > + docker run --name crdb -d --network=teraflowbridge -p 26257:26257 -p 8080:8080 + --env COCKROACH_DATABASE=tfs_test --env COCKROACH_USER=tfs --env COCKROACH_PASSWORD=tfs123 + --volume "crdb:/cockroach/cockroach-data" + cockroachdb/cockroach:latest-v22.2 start-single-node + - echo "Waiting for initialization..." + - while ! docker logs crdb 2>&1 | grep -q 'finished creating default user \"tfs\"'; do sleep 1; done + # - docker logs crdb + # - docker ps -a + - CRDB_ADDRESS=$(docker inspect crdb --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}") + - echo $CRDB_ADDRESS + - > + docker run --name zookeeper -d --network=teraflowbridge -p 2181:2181 + --env ALLOW_ANONYMOUS_LOGIN=yes + bitnami/zookeeper:latest + - sleep 10 # Wait for Zookeeper to start + - > + docker run --name kafka -d --network=teraflowbridge -p 9092:9092 + --env KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181 + --env ALLOW_PLAINTEXT_LISTENER=yes + bitnami/kafka:latest + - sleep 20 # Wait for Kafka to start + - KAFKA_IP=$(docker inspect kafka --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}") + - echo $KAFKA_IP + - docker logs zookeeper + - docker logs kafka + - > + docker run --name $IMAGE_NAME-frontend -d -p 30050:30050 + --env "CRDB_URI=cockroachdb://tfs:tfs123@${CRDB_ADDRESS}:26257/tfs_test?sslmode=require" + --env "KFK_SERVER_ADDRESS=${KAFKA_IP}:9092" + --volume "$PWD/src/$IMAGE_NAME/frontend/tests:/opt/results" + --network=teraflowbridge + $CI_REGISTRY_IMAGE/${IMAGE_NAME}-frontend:$IMAGE_TAG + - docker ps -a + - sleep 5 + - docker logs ${IMAGE_NAME}-frontend + - > + docker exec -i ${IMAGE_NAME}-frontend bash -c + "coverage run -m pytest --log-level=INFO --verbose --junitxml=/opt/results/${IMAGE_NAME}-frontend_report.xml $IMAGE_NAME/frontend/tests/test_*.py" + - docker exec -i ${IMAGE_NAME}-frontend bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing" + coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' + after_script: + - docker rm -f ${IMAGE_NAME}-frontend + - docker rm -f zookeeper + - docker rm -f kafka + - docker volume rm -f crdb + - docker volume prune --force + - docker image prune --force + - docker network rm teraflowbridge + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' + - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' + - changes: + - src/common/**/*.py + - proto/*.proto + - src/$IMAGE_NAME/frontend/**/*.{py,in,yml} + - src/$IMAGE_NAME/frontend/Dockerfile + - src/$IMAGE_NAME/frontend/tests/*.py + - manifests/${IMAGE_NAME}service.yaml + - .gitlab-ci.yml + artifacts: + when: always + reports: + junit: src/$IMAGE_NAME/frontend/tests/${IMAGE_NAME}-frontend_report.xml diff --git a/src/analytics/README.md b/src/analytics/README.md index 9663e5321ace6866491b90553553d9ccbf5793a1..ece11ea969caf1cf92fb474ae1371c9979231ac2 100644 --- a/src/analytics/README.md +++ b/src/analytics/README.md @@ -1,4 +1,118 @@ -# How to locally run and test Analytic service (To be added soon) +# How to Locally Run and Test Analytic Frontend Service ### Pre-requisets -The following requirements should be fulfilled before the execuation of Telemetry service. +The following requirements should be fulfilled before the execuation of Analytics service. + +1. A virtual enviornment exist with all the required packages listed in [requirements.in](https://labs.etsi.org/rep/tfs/controller/-/blob/develop/src/analytics/frontend/requirements.in) sucessfully installed. +2. Verify the creation of required database and table. The +[Analytics DB test](https://labs.etsi.org/rep/tfs/controller/-/blob/develop/src/analytics/tests/test_analytics_db.py) python file lists the functions to create tables and the database. +3. The Analytics backend service should be running. + +4. All required Kafka topics must exist. Call `create_all_topics` from the [Kafka class](https://labs.etsi.org/rep/tfs/controller/-/blob/develop/src/common/tools/kafka/Variables.py) to create any topics that do not already exist. +``` +from common.tools.kafka.Variables import KafkaTopic +KafkaTopic.create_all_topics() +``` + +5. There will be an input stream on the Kafka topic that the Spark Streamer will consume and apply a defined thresholds. +- A JSON encoded string should be generated in the following format: +``` +'{"time_stamp": "2024-09-03T12:36:26Z", "kpi_id": "6e22f180-ba28-4641-b190-2287bf448888", "kpi_value": 44.22}' +``` +- `kpi_value` should be float or int. +- The Kafka producer key should be the UUID of the Analyzer used when creating it. +- Use the following Kafka topic to generate the stream: `KafkaTopic.ANALYTICS_RESPONSE.value`. + +## Steps to create and start Analyzer +The analyzer can be declared as below but there are many other ways to declare: + +The given object creation process for `_create_analyzer` involves defining an instance of the `Analyzer` message from the [gRPC definition](https://labs.etsi.org/rep/tfs/controller/-/blob/feat/194-unable-to-correctly-extract-the-aggregation-function-names-from-the-dictionary-received-as/proto/analytics_frontend.proto) and populating its fields. + +``` +from common.proto.analytics_frontend_pb2 import AnalyzerId +_create_analyzer_id = AnalyzerId() +``` + +Here is a breakdown of how each field is populated: + +### 1. **Analyzer ID** + - `analyzer_id`: This field uses a unique ID to identify the analyzer. In this case, the ID is a UUID. + ```python + _create_analyzer.analyzer_id.analyzer_id.uuid = "efef4d95-1cf1-43c4-9742-95c283ddd7a6" + ``` + - The commented-out code shows how the UUID can be generated dynamically using Python's `uuid.uuid4()`. However, for now, a static UUID is used. + +### 2. **Algorithm Name** + - `algorithm_name`: Specifies the name of the algorithm to be executed by the analyzer. + ```python + _create_analyzer.algorithm_name = "Test_Aggergate_and_Threshold" + ``` + +### 3. **Operation Mode** + - `operation_mode`: Sets the mode in which the analyzer operates, in this case, it's set to `ANALYZEROPERATIONMODE_STREAMING`. + ```python + _create_analyzer.operation_mode = AnalyzerOperationMode.ANALYZEROPERATIONMODE_STREAMING + ``` + +### 4. **Input KPI IDs** + - `input_kpi_ids`: This is a list of KPI IDs that will be used as input for the analysis. KPI IDs are represented using `KpiId`, and UUIDs are assigned to each input. The Spark streamer assume that the provided KPIs exists in the KPI Descriptor database. + ```python + _kpi_id = KpiId() + _kpi_id.kpi_id.uuid = "6e22f180-ba28-4641-b190-2287bf448888" + _create_analyzer.input_kpi_ids.append(_kpi_id) + + _kpi_id.kpi_id.uuid = "1e22f180-ba28-4641-b190-2287bf446666" + _create_analyzer.input_kpi_ids.append(_kpi_id) + ``` + +### 5. **Output KPI IDs** + - `output_kpi_ids`: A list of KPI IDs that are produced as output after analysis. Each one is generated and appended to the list. + ```python + _kpi_id = KpiId() + _create_analyzer.output_kpi_ids.append(_kpi_id) + ``` + +### 6. **Parameters** + - `parameters`: This is a dictionary containing key-value pairs of various parameters used by the analyzer. These values are often algorithm-specific. + - **Thresholds**: A dictionary containing threshold possible values (min, max, avg, first, last, stdev)_<any_name>. For example: "min_latency", "max_bandwidth", "avg_datarate" etc. + ```python + _threshold_dict = { + 'min_latency' : (00, 10), + 'max_bandwidth': (40, 50), + 'avg_datarate': (00, 10) + } + _create_analyzer.parameters['thresholds'] = json.dumps(_threshold_dict) + ``` + - **Window Size**: Specifies the size of the time window (e.g., `60 seconds`). + ```python + _create_analyzer.parameters['window_size'] = "60 seconds" + ``` + - **Window Slider**: Defines the sliding window interval (e.g., `30 seconds`). + ```python + _create_analyzer.parameters['window_slider'] = "30 seconds" + ``` + +### **Calling `StartAnalyzer` with an Analyzer Frontend Object** + - The following code demonstrates how to call `StartAnalyzer()` with an Analyzer object: +```python +from analytics.frontend.client.AnalyticsFrontendClient import AnalyticsFrontendClient + +analytics_client_object = AnalyticsFrontendClient() +analytics_client_object.StartAnalyzer(_create_analyzer_id) +``` + +### **How to Receive Analyzer Responses** + - There is a non-gRPC method in the analyzer frontend called `StartResponseListener(<analyzer_uuid>)`. The `analyzer_uuid` is the UUID of the analyzer provided when calling `StartAnalyzer()`. The following code will log the responses: +```python +from analytics.frontend.service.AnalyticsFrontendServiceServicerImpl import AnalyticsFrontendServiceServicerImpl + +analytic_frontend_service_object = AnalyticsFrontendServiceServicerImpl() +for response in analytic_frontend_service_object.StartResponseListener(<analyzer_uuid>): + LOGGER.debug(response) +``` + +### **Understanding the Output of the Analyzer** +- **Output Column Names**: The output JSON string will include two keys for each defined threshold. For example, the `min_latency` threshold will generate two keys: `min_latency_THRESHOLD_FAIL` and `min_latency_THRESHOLD_RAISE`. + - `min_latency_THRESHOLD_FAIL` is triggered if the average latency calculated within the defined window size is less than the specified threshold range. + - `min_latency_THRESHOLD_RAISE` is triggered if the average latency calculated within the defined window size exceeds the specified threshold range. +- The thresholds `min_latency_THRESHOLD_FAIL` and `min_latency_THRESHOLD_RAISE` will have a value of `TRUE` if activated; otherwise, they will be set to `FALSE`. diff --git a/src/analytics/backend/requirements.in b/src/analytics/backend/requirements.in index 9df678fe819f33d479b8f5090ca9ac4eb1f4047c..360d94f4668b19feba305df76a65ef70b26e091f 100644 --- a/src/analytics/backend/requirements.in +++ b/src/analytics/backend/requirements.in @@ -12,5 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -pyspark==3.5.2 +dask==2024.1.0 +distributed==2024.1.0 +pandas==2.2.3 confluent-kafka==2.3.* diff --git a/src/analytics/backend/service/AnalyticsBackendService.py b/src/analytics/backend/service/AnalyticsBackendService.py index 595603567fe537d9f7b33224cba0fe016a439631..2e57e1e8a70d141474b395b5e13f21bd4840abc5 100755 --- a/src/analytics/backend/service/AnalyticsBackendService.py +++ b/src/analytics/backend/service/AnalyticsBackendService.py @@ -12,18 +12,18 @@ # See the License for the specific language governing permissions and # limitations under the License. - +import time import json import logging import threading from common.tools.service.GenericGrpcService import GenericGrpcService -from analytics.backend.service.SparkStreaming import SparkStreamer from common.tools.kafka.Variables import KafkaConfig, KafkaTopic from confluent_kafka import Consumer as KafkaConsumer from confluent_kafka import KafkaError from common.Constants import ServiceNameEnum from common.Settings import get_service_port_grpc - +from threading import Thread, Event +from .DaskStreaming import DaskStreamer LOGGER = logging.getLogger(__name__) @@ -40,58 +40,18 @@ class AnalyticsBackendService(GenericGrpcService): 'group.id' : 'analytics-frontend', 'auto.offset.reset' : 'latest'}) - def StartSparkStreamer(self, analyzer_uuid, analyzer): - kpi_list = analyzer['input_kpis'] - oper_list = [s.replace('_value', '') for s in list(analyzer["thresholds"].keys())] # TODO: update this line... - thresholds = analyzer['thresholds'] - window_size = analyzer['window_size'] - window_slider = analyzer['window_slider'] - print ("Received parameters: {:} - {:} - {:} - {:} - {:}".format( - kpi_list, oper_list, thresholds, window_size, window_slider)) - LOGGER.debug ("Received parameters: {:} - {:} - {:} - {:} - {:}".format( - kpi_list, oper_list, thresholds, window_size, window_slider)) - try: - stop_event = threading.Event() - thread = threading.Thread(target=SparkStreamer, - args=(analyzer_uuid, kpi_list, oper_list, thresholds, stop_event, - window_size, window_slider, None )) - self.running_threads[analyzer_uuid] = (thread, stop_event) - thread.start() - print ("Initiated Analyzer backend: {:}".format(analyzer_uuid)) - LOGGER.info("Initiated Analyzer backend: {:}".format(analyzer_uuid)) - return True - except Exception as e: - print ("Failed to initiate Analyzer backend: {:}".format(e)) - LOGGER.error("Failed to initiate Analyzer backend: {:}".format(e)) - return False - - def StopRequestListener(self, threadInfo: tuple): - try: - thread, stop_event = threadInfo - stop_event.set() - thread.join() - print ("Terminating Analytics backend RequestListener") - LOGGER.info("Terminating Analytics backend RequestListener") - return True - except Exception as e: - print ("Failed to terminate analytics backend {:}".format(e)) - LOGGER.error("Failed to terminate analytics backend {:}".format(e)) - return False + def install_servicers(self): + threading.Thread(target=self.RequestListener, args=()).start() - def install_services(self): - stop_event = threading.Event() - thread = threading.Thread(target=self.RequestListener, - args=(stop_event,) ) - thread.start() - return (thread, stop_event) - - def RequestListener(self, stop_event): + def RequestListener(self): """ listener for requests on Kafka topic. """ + LOGGER.info("Request Listener is initiated ...") + # print ("Request Listener is initiated ...") consumer = self.kafka_consumer consumer.subscribe([KafkaTopic.ANALYTICS_REQUEST.value]) - while not stop_event.is_set(): + while True: receive_msg = consumer.poll(2.0) if receive_msg is None: continue @@ -99,34 +59,66 @@ class AnalyticsBackendService(GenericGrpcService): if receive_msg.error().code() == KafkaError._PARTITION_EOF: continue else: - print("Consumer error: {}".format(receive_msg.error())) + LOGGER.error("Consumer error: {:}".format(receive_msg.error())) + # print ("Consumer error: {:}".format(receive_msg.error())) break - analyzer = json.loads(receive_msg.value().decode('utf-8')) - analyzer_uuid = receive_msg.key().decode('utf-8') - LOGGER.debug('Recevied Analyzer: {:} - {:}'.format(analyzer_uuid, analyzer)) - print ('Recevied Analyzer: {:} - {:}'.format(analyzer_uuid, analyzer)) + try: + analyzer = json.loads(receive_msg.value().decode('utf-8')) + analyzer_uuid = receive_msg.key().decode('utf-8') + LOGGER.debug('Recevied Analyzer: {:} - {:}'.format(analyzer_uuid, analyzer)) + # print ('Recevied Analyzer: {:} - {:}'.format(analyzer_uuid, analyzer)) - if analyzer["algo_name"] is None and analyzer["oper_mode"] is None: - self.TerminateAnalyzerBackend(analyzer_uuid) - else: - self.StartSparkStreamer(analyzer_uuid, analyzer) - LOGGER.debug("Stop Event activated. Terminating...") - print ("Stop Event activated. Terminating...") + if analyzer["algo_name"] is None and analyzer["oper_mode"] is None: + self.StopDaskListener(analyzer_uuid) + else: + self.StartDaskListener(analyzer_uuid, analyzer) + except Exception as e: + LOGGER.warning("Unable to consume message from topic: {:}. ERROR: {:}".format(KafkaTopic.ANALYTICS_REQUEST.value, e)) + # print ("Unable to consume message from topic: {:}. ERROR: {:}".format(KafkaTopic.ANALYTICS_REQUEST.value, e)) + + def StartDaskListener(self, analyzer_uuid, analyzer): + kpi_list = analyzer[ 'input_kpis' ] + thresholds = analyzer[ 'thresholds' ] + window_size = analyzer[ 'window_size' ] + window_slider = analyzer[ 'window_slider'] + + LOGGER.debug ("Received parameters: {:} - {:} - {:} - {:}".format( + kpi_list, thresholds, window_size, window_slider)) + # print ("Received parameters: {:} - {:} - {:} - {:}".format( + # kpi_list, thresholds, window_size, window_slider)) + try: + stop_event = Event() + thread = Thread( + target=DaskStreamer, + # args=(analyzer_uuid, kpi_list, oper_list, thresholds, stop_event), + args=(analyzer['output_kpis'][0] , kpi_list, thresholds, stop_event), + kwargs={ + "window_size" : window_size, + } + ) + thread.start() + self.running_threads[analyzer_uuid] = (thread, stop_event) + # print ("Initiated Analyzer backend: {:}".format(analyzer_uuid)) + LOGGER.info("Initiated Analyzer backend: {:}".format(analyzer_uuid)) + return True + except Exception as e: + # print ("Failed to initiate Analyzer backend: {:}".format(e)) + LOGGER.error("Failed to initiate Analyzer backend: {:}".format(e)) + return False - def TerminateAnalyzerBackend(self, analyzer_uuid): + def StopDaskListener(self, analyzer_uuid): if analyzer_uuid in self.running_threads: try: thread, stop_event = self.running_threads[analyzer_uuid] stop_event.set() thread.join() del self.running_threads[analyzer_uuid] - print ("Terminating backend (by TerminateBackend): Analyzer Id: {:}".format(analyzer_uuid)) + # print ("Terminating backend (by TerminateBackend): Analyzer Id: {:}".format(analyzer_uuid)) LOGGER.info("Terminating backend (by TerminateBackend): Analyzer Id: {:}".format(analyzer_uuid)) return True except Exception as e: LOGGER.error("Failed to terminate. Analyzer Id: {:} - ERROR: {:}".format(analyzer_uuid, e)) return False else: - print ("Analyzer not found in active collectors. Analyzer Id: {:}".format(analyzer_uuid)) - LOGGER.warning("Analyzer not found in active collectors: Analyzer Id: {:}".format(analyzer_uuid)) - # generate confirmation towards frontend + # print ("Analyzer not found in active collectors. Analyzer Id: {:}".format(analyzer_uuid)) + LOGGER.warning("Analyzer not found in active collectors: Analyzer Id: {:}".format(analyzer_uuid)) diff --git a/src/analytics/backend/service/DaskStreaming.py b/src/analytics/backend/service/DaskStreaming.py new file mode 100644 index 0000000000000000000000000000000000000000..cdfe10bd35f68264865d4847c0d292658c330eec --- /dev/null +++ b/src/analytics/backend/service/DaskStreaming.py @@ -0,0 +1,268 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging +import time +import json +from confluent_kafka import Consumer, Producer, KafkaException, KafkaError +import pandas as pd +from dask.distributed import Client, LocalCluster +from common.tools.kafka.Variables import KafkaConfig, KafkaTopic + +logging.basicConfig(level=logging.INFO) +LOGGER = logging.getLogger(__name__) + +def SettingKafkaConsumerParams(): + return {'bootstrap.servers' : KafkaConfig.get_kafka_address(), + 'group.id' : 'analytics-backend', + 'auto.offset.reset' : 'latest'} + +def GetAggregationMappings(thresholds): + agg_dict = {} + for threshold_key in thresholds.keys(): + parts = threshold_key.split('_', 1) + if len(parts) != 2: + LOGGER.warning(f"Threshold key '{threshold_key}' does not follow the '<aggregation>_<metricName>' format. Skipping.") + continue + aggregation, metric_name = parts + # Ensure that the aggregation function is valid in pandas + if aggregation not in ['mean', 'min', 'max', 'first', 'last', 'std']: + LOGGER.warning(f"Unsupported aggregation '{aggregation}' in threshold key '{threshold_key}'. Skipping.") + continue + agg_dict[threshold_key] = ('kpi_value', aggregation) + return agg_dict + + +def ApplyThresholds(aggregated_df, thresholds): + """ + Apply thresholds (TH-Fall and TH-Raise) based on the thresholds dictionary + on the aggregated DataFrame. + Args: aggregated_df (pd.DataFrame): DataFrame with aggregated metrics. + thresholds (dict): Thresholds dictionary with keys in the format '<aggregation>_<metricName>'. + Returns: pd.DataFrame: DataFrame with additional threshold columns. + """ + for threshold_key, threshold_values in thresholds.items(): + if threshold_key not in aggregated_df.columns: + + LOGGER.warning(f"Threshold key '{threshold_key}' does not correspond to any aggregation result. Skipping threshold application.") + continue + if isinstance(threshold_values, (list, tuple)) and len(threshold_values) == 2: + fail_th, raise_th = threshold_values + aggregated_df["THRESHOLD_FALL"] = aggregated_df[threshold_key] < fail_th + aggregated_df["THRESHOLD_RAISE"] = aggregated_df[threshold_key] > raise_th + aggregated_df["value"] = aggregated_df[threshold_key] + else: + LOGGER.warning(f"Threshold values for '{threshold_key}' are not a list or tuple of length 2. Skipping threshold application.") + return aggregated_df + +def initialize_dask_client(): + """ + Initialize a local Dask cluster and client. + """ + cluster = LocalCluster(n_workers=2, threads_per_worker=2) + client = Client(cluster) + LOGGER.info(f"Dask Client Initialized: {client}") + return client, cluster + +def initialize_kafka_producer(): + return Producer({'bootstrap.servers': KafkaConfig.get_kafka_address()}) + +def delivery_report(err, msg): + if err is not None: + LOGGER.error(f"Message delivery failed: {err}") + else: + LOGGER.info(f"Message delivered to {msg.topic()} [{msg.partition()}] at offset {msg.offset()}") + +def process_batch(batch, agg_mappings, thresholds, key): + """ + Process a batch of data and apply thresholds. + Args: batch (list of dict): List of messages from Kafka. + agg_mappings (dict): Mapping from threshold key to aggregation function. + thresholds (dict): Thresholds dictionary. + Returns: list of dict: Processed records ready to be sent to Kafka. + """ + if not batch: + LOGGER.info("Empty batch received. Skipping processing.") + return [] + + + df = pd.DataFrame(batch) + LOGGER.info(f"df {df} ") + df['time_stamp'] = pd.to_datetime(df['time_stamp'], errors='coerce') + df.dropna(subset=['time_stamp'], inplace=True) + LOGGER.info(f"df {df} ") + required_columns = {'time_stamp', 'kpi_id', 'kpi_value'} + if not required_columns.issubset(df.columns): + LOGGER.warning(f"Batch contains missing required columns. Required columns: {required_columns}. Skipping batch.") + return [] + if df.empty: + LOGGER.info("No data after filtering by KPI IDs. Skipping processing.") + return [] + + # Perform aggregations using named aggregation + try: + agg_dict = {key: value for key, value in agg_mappings.items()} + + df_agg_ = df.groupby(['window_start']).agg(**agg_dict).reset_index() + + #example: agg_dict = {'min_latency_E2E': ('kpi_value', 'min') + + #given that threshold has 1 value + second_value_tuple = next(iter(agg_dict.values()))[1] + #in case we have multiple thresholds! + #second_values_tuples = [value[1] for value in agg_dict.values()] + if second_value_tuple=="min": + df_agg = df_agg_.min(numeric_only=True).to_frame().T + elif second_value_tuple == "max": + df_agg = df_agg_.max(numeric_only=True).to_frame().T + elif second_value_tuple == "std": + df_agg = df_agg_.sted(numeric_only=True).to_frame().T + else: + df_agg = df_agg_.mean(numeric_only=True).to_frame().T + + # Assign the first value of window_start from the original aggregated data + df_agg['window_start'] = df_agg_['window_start'].iloc[0] + + # Reorder columns to place 'window_start' first if needed + cols = ['window_start'] + [col for col in df_agg.columns if col != 'window_start'] + df_agg = df_agg[cols] + + except Exception as e: + LOGGER.error(f"Aggregation error: {e}") + return [] + + # Apply thresholds + + + df_thresholded = ApplyThresholds(df_agg, thresholds) + df_thresholded['kpi_id'] = key + df_thresholded['window_start'] = df_thresholded['window_start'].dt.strftime('%Y-%m-%dT%H:%M:%SZ') + # Convert aggregated DataFrame to list of dicts + result = df_thresholded.to_dict(orient='records') + LOGGER.info(f"Processed batch with {len(result)} records after aggregation and thresholding.") + return result + +def produce_result(result, producer, destination_topic): + for record in result: + try: + producer.produce( + destination_topic, + key=str(record.get('kpi_id', '')), + value=json.dumps(record), + callback=delivery_report + ) + except KafkaException as e: + LOGGER.error(f"Failed to produce message: {e}") + producer.flush() + LOGGER.info(f"Produced {len(result)} aggregated records to '{destination_topic}'.") + +def DaskStreamer(key, kpi_list, thresholds, stop_event, + window_size="30s", time_stamp_col="time_stamp"): + client, cluster = initialize_dask_client() + consumer_conf = SettingKafkaConsumerParams() + consumer = Consumer(consumer_conf) + consumer.subscribe([KafkaTopic.VALUE.value]) + producer = initialize_kafka_producer() + + # Parse window_size to seconds + try: + window_size_td = pd.to_timedelta(window_size) + window_size_seconds = window_size_td.total_seconds() + except Exception as e: + LOGGER.error(f"Invalid window_size format: {window_size}. Error: {e}") + window_size_seconds = 30 + LOGGER.info(f"Batch processing interval set to {window_size_seconds} seconds.") + + # Extract aggregation mappings from thresholds + agg_mappings = GetAggregationMappings(thresholds) + if not agg_mappings: + LOGGER.error("No valid aggregation mappings extracted from thresholds. Exiting streamer.") + consumer.close() + producer.flush() + client.close() + cluster.close() + return + try: + batch = [] + last_batch_time = time.time() + LOGGER.info("Starting to consume messages...") + + while not stop_event.is_set(): + msg = consumer.poll(1.0) + + if msg is None: + current_time = time.time() + if (current_time - last_batch_time) >= window_size_seconds and batch: + LOGGER.info("Time-based batch threshold reached. Processing batch.") + future = client.submit(process_batch, batch, agg_mappings, thresholds) + future.add_done_callback(lambda fut: produce_result(fut.result(), producer, KafkaTopic.ALARMS.value)) + batch = [] + last_batch_time = current_time + continue + + if msg.error(): + if msg.error().code() == KafkaError._PARTITION_EOF: + LOGGER.warning(f"End of partition reached {msg.topic()} [{msg.partition()}] at offset {msg.offset()}") + else: + LOGGER.error(f"Kafka error: {msg.error()}") + continue + + try: + message_value = json.loads(msg.value().decode('utf-8')) + except json.JSONDecodeError as e: + LOGGER.error(f"JSON decode error: {e}") + continue + + try: + message_timestamp = pd.to_datetime(message_value[time_stamp_col], errors='coerce') + LOGGER.warning(f"message_timestamp: {message_timestamp}. Skipping message.") + + if pd.isna(message_timestamp): + LOGGER.warning(f"Invalid timestamp in message: {message_value}. Skipping message.") + continue + window_start = message_timestamp.floor(window_size) + LOGGER.warning(f"window_start: {window_start}. Skipping message.") + message_value['window_start'] = window_start + except Exception as e: + LOGGER.error(f"Error processing timestamp: {e}. Skipping message.") + continue + + if message_value['kpi_id'] not in kpi_list: + LOGGER.debug(f"KPI ID '{message_value['kpi_id']}' not in kpi_list. Skipping message.") + continue + + batch.append(message_value) + + current_time = time.time() + if (current_time - last_batch_time) >= window_size_seconds and batch: + LOGGER.info("Time-based batch threshold reached. Processing batch.") + future = client.submit(process_batch, batch, agg_mappings, thresholds, key) + future.add_done_callback(lambda fut: produce_result(fut.result(), producer, KafkaTopic.ALARMS.value)) + batch = [] + last_batch_time = current_time + + except Exception as e: + LOGGER.exception(f"Error in Dask streaming process: {e}") + finally: + # Process any remaining messages in the batch + if batch: + LOGGER.info("Processing remaining messages in the batch.") + future = client.submit(process_batch, batch, agg_mappings, thresholds) + future.add_done_callback(lambda fut: produce_result(fut.result(), producer, KafkaTopic.ALARMS.value)) + consumer.close() + producer.flush() + LOGGER.info("Kafka consumer and producer closed.") + client.close() + cluster.close() + LOGGER.info("Dask client and cluster closed.") diff --git a/src/analytics/backend/service/SparkStreaming.py b/src/analytics/backend/service/SparkStreaming.py index 96e1aa05d898ffdd23c533b74ee87fbf03f54576..f204c6247436177cd032c777c048ecb165051ec2 100644 --- a/src/analytics/backend/service/SparkStreaming.py +++ b/src/analytics/backend/service/SparkStreaming.py @@ -33,7 +33,7 @@ def SettingKafkaConsumerParams(): # TODO: create get_kafka_consumer() in comm return { # "kafka.bootstrap.servers": '127.0.0.1:9092', "kafka.bootstrap.servers": KafkaConfig.get_kafka_address(), - "subscribe" : KafkaTopic.VALUE.value, + "subscribe" : KafkaTopic.VALUE.value, # topic should have atleast one message before spark session "startingOffsets" : 'latest', "failOnDataLoss" : 'false' # Optional: Set to "true" to fail the query on data loss } @@ -64,7 +64,7 @@ def ApplyThresholds(aggregated_df, thresholds): for col_name, (fail_th, raise_th) in thresholds.items(): # Apply TH-Fail condition (if column value is less than the fail threshold) aggregated_df = aggregated_df.withColumn( - f"{col_name}_THRESHOLD_FAIL", + f"{col_name}_THRESHOLD_FALL", when(col(col_name) < fail_th, True).otherwise(False) ) # Apply TH-RAISE condition (if column value is greater than the raise threshold) @@ -128,11 +128,11 @@ def SparkStreamer(key, kpi_list, oper_list, thresholds, stop_event, # --- This will write output to Kafka: ACTUAL IMPLEMENTATION query = thresholded_stream_data \ - .selectExpr(f"'{key}' AS key", "to_json(struct(*)) AS value") \ + .selectExpr(f"CAST(kpi_id AS STRING) AS key", "to_json(struct(*)) AS value") \ .writeStream \ .format("kafka") \ .option("kafka.bootstrap.servers", KafkaConfig.get_kafka_address()) \ - .option("topic", KafkaTopic.ANALYTICS_RESPONSE.value) \ + .option("topic", KafkaTopic.ALARMS.value) \ .option("checkpointLocation", "analytics/.spark/checkpoint") \ .outputMode("update") diff --git a/src/analytics/backend/tests/messages.py b/src/analytics/backend/tests/messages.py index 9acd6ad9dffe4a5b10b107a6923ed85170ee141f..b3780d29bada491311fb9662934f2d6c234abc93 100644 --- a/src/analytics/backend/tests/messages.py +++ b/src/analytics/backend/tests/messages.py @@ -12,6 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +import uuid +import json +from common.proto.kpi_manager_pb2 import KpiId +from common.proto.analytics_frontend_pb2 import ( AnalyzerOperationMode, + Analyzer, AnalyzerId ) def get_kpi_id_list(): return ["6e22f180-ba28-4641-b190-2287bf448888", "1e22f180-ba28-4641-b190-2287bf446666"] @@ -32,3 +37,78 @@ def get_threshold_dict(): return { op + '_value': threshold_dict[op+'_value'] for op in get_operation_list() if op + '_value' in threshold_dict } + +def create_analyzer_id(): + _create_analyzer_id = AnalyzerId() + # _create_analyzer_id.analyzer_id.uuid = str(uuid.uuid4()) + # _create_analyzer_id.analyzer_id.uuid = "efef4d95-1cf1-43c4-9742-95c283ddd7a6" + _create_analyzer_id.analyzer_id.uuid = "1e22f180-ba28-4641-b190-2287bf446666" + return _create_analyzer_id + + +def create_analyzer(): + _create_analyzer = Analyzer() + # _create_analyzer.analyzer_id.analyzer_id.uuid = str(uuid.uuid4()) + _create_analyzer.analyzer_id.analyzer_id.uuid = "20540c4f-6797-45e5-af70-6491b49283f9" + _create_analyzer.algorithm_name = "Test_Aggergate_and_Threshold" + _create_analyzer.operation_mode = AnalyzerOperationMode.ANALYZEROPERATIONMODE_STREAMING + + _kpi_id = KpiId() + # input IDs to analyze + _kpi_id.kpi_id.uuid = str(uuid.uuid4()) + _kpi_id.kpi_id.uuid = "5716c369-932b-4a02-b4c7-6a2e808b92d7" + _create_analyzer.input_kpi_ids.append(_kpi_id) + _kpi_id.kpi_id.uuid = str(uuid.uuid4()) + _kpi_id.kpi_id.uuid = "8f70d908-cc48-48de-8664-dc9be2de0089" + _create_analyzer.input_kpi_ids.append(_kpi_id) + _kpi_id.kpi_id.uuid = str(uuid.uuid4()) + _create_analyzer.input_kpi_ids.append(_kpi_id) + # output IDs after analysis + _kpi_id.kpi_id.uuid = str(uuid.uuid4()) + _create_analyzer.output_kpi_ids.append(_kpi_id) + _kpi_id.kpi_id.uuid = str(uuid.uuid4()) + _create_analyzer.output_kpi_ids.append(_kpi_id) + # parameter + _threshold_dict = { + # 'avg_value' :(20, 30), 'min_value' :(00, 10), 'max_value' :(45, 50), + 'first_value' :(00, 10), 'last_value' :(40, 50), 'stdev_value':(00, 10)} + _create_analyzer.parameters['thresholds'] = json.dumps(_threshold_dict) + _create_analyzer.parameters['window_size'] = "60 seconds" # Such as "10 seconds", "2 minutes", "3 hours", "4 days" or "5 weeks" + _create_analyzer.parameters['window_slider'] = "30 seconds" # should be less than window size + _create_analyzer.parameters['store_aggregate'] = str(False) # TRUE to store. No implemented yet + + return _create_analyzer + +def create_analyzer_dask(): + _create_analyzer = Analyzer() + _create_analyzer.analyzer_id.analyzer_id.uuid = str(uuid.uuid4()) + # _create_analyzer.analyzer_id.analyzer_id.uuid = "1e22f180-ba28-4641-b190-2287bf446666" + _create_analyzer.algorithm_name = "Test_Aggergate_and_Threshold" + _create_analyzer.operation_mode = AnalyzerOperationMode.ANALYZEROPERATIONMODE_STREAMING + + _kpi_id = KpiId() + # input IDs to analyze + # _kpi_id.kpi_id.uuid = str(uuid.uuid4()) + _kpi_id.kpi_id.uuid = "6e22f180-ba28-4641-b190-2287bf448888" + _create_analyzer.input_kpi_ids.append(_kpi_id) + # _kpi_id.kpi_id.uuid = str(uuid.uuid4()) + _kpi_id.kpi_id.uuid = "1e22f180-ba28-4641-b190-2287bf446666" + _create_analyzer.input_kpi_ids.append(_kpi_id) + # _kpi_id.kpi_id.uuid = str(uuid.uuid4()) + _create_analyzer.input_kpi_ids.append(_kpi_id) + # output IDs after analysis + _kpi_id.kpi_id.uuid = str(uuid.uuid4()) + _create_analyzer.output_kpi_ids.append(_kpi_id) + _kpi_id.kpi_id.uuid = str(uuid.uuid4()) + _create_analyzer.output_kpi_ids.append(_kpi_id) + # parameter + + _threshold_dict = { + 'mean_latency' :(20, 30), 'min_latency' :(00, 10), 'max_latency' :(45, 50),#} + 'first_value' :(00, 50), 'last_value' :(50, 100), 'std_value' :(0, 90)} + _create_analyzer.parameters['thresholds'] = json.dumps(_threshold_dict) + _create_analyzer.parameters['oper_list'] = json.dumps([key.split('_')[0] for key in _threshold_dict.keys()]) + _create_analyzer.parameters['window_size'] = "10s" # Such as "10 seconds", "2 minutes", "3 hours", "4 days" or "5 weeks" + _create_analyzer.parameters['window_slider'] = "5s" # should be less than window size + _create_analyzer.parameters['store_aggregate'] = str(False) # TRUE to store. No implemented yet + return _create_analyzer diff --git a/src/analytics/backend/tests/test_backend.py b/src/analytics/backend/tests/test_backend.py index 2f40faba94ef7081db609116e8fd869e3d119a24..86de220a21b4c2c1c38d518c01ae13f33ee200d5 100644 --- a/src/analytics/backend/tests/test_backend.py +++ b/src/analytics/backend/tests/test_backend.py @@ -12,12 +12,16 @@ # See the License for the specific language governing permissions and # limitations under the License. -import time +import time, json +from typing import Dict import logging -import threading +from threading import Event, Thread from common.tools.kafka.Variables import KafkaTopic from analytics.backend.service.AnalyticsBackendService import AnalyticsBackendService from analytics.backend.tests.messages import get_kpi_id_list, get_operation_list, get_threshold_dict +from .messages import create_analyzer, create_analyzer_dask +from threading import Thread, Event +from ..service.DaskStreaming import DaskStreamer LOGGER = logging.getLogger(__name__) @@ -32,26 +36,117 @@ def test_validate_kafka_topics(): response = KafkaTopic.create_all_topics() assert isinstance(response, bool) + +# --- To test Dask Streamer functionality --- +# def test_StartDaskStreamer(): # Directly from the Streamer class +# LOGGER.debug(" >>> test_StartSparkStreamer: START <<< ") +# stop_event = Event() +# kpi_list = ["1e22f180-ba28-4641-b190-2287bf446666", "6e22f180-ba28-4641-b190-2287bf448888", 'kpi_3'] +# oper_list = ['avg', 'min', 'max',] +# thresholds = { +# 'avg_value': (10.0, 90.0), +# 'min_value': (5.0, 95.0), +# 'max_value': (15.0, 85.0), +# 'latency' : (2.0, 10.0) +# } + +# # Start the DaskStreamer in a separate thread +# streamer_thread = Thread( +# target=DaskStreamer, +# args=("analytics_stream", kpi_list, oper_list, thresholds, stop_event), +# kwargs={ +# "window_size": "60s", +# "win_slide_duration": "30s", +# "time_stamp_col": "time_stamp" +# } +# ) +# streamer_thread.start() +# try: +# while True: +# time.sleep(10) +# except KeyboardInterrupt: +# LOGGER.info("KeyboardInterrupt received. Stopping streamer...") +# stop_event.set() +# streamer_thread.join() +# LOGGER.info("Streamer stopped gracefully.") + +# --- To test Start Streamer functionality --- +# def test_StartDaskStreamer(): +# LOGGER.debug(" >>> test_StartBaskStreamer: START <<< ") +# analyzer_obj = create_analyzer_dask() +# # LOGGER.info("Created Analyzer Object: {:}".format(analyzer_obj)) +# analyzer_uuid = analyzer_obj.analyzer_id.analyzer_id.uuid +# analyzer_to_generate : Dict = { +# "algo_name" : analyzer_obj.algorithm_name, +# "input_kpis" : [k.kpi_id.uuid for k in analyzer_obj.input_kpi_ids], +# "output_kpis" : [k.kpi_id.uuid for k in analyzer_obj.output_kpi_ids], +# "oper_mode" : analyzer_obj.operation_mode, +# "thresholds" : json.loads(analyzer_obj.parameters["thresholds"]), +# "oper_list" : json.loads(analyzer_obj.parameters["oper_list"]), +# # "oper_list" : analyzer_obj.parameters["oper_list"], +# "window_size" : analyzer_obj.parameters["window_size"], +# "window_slider" : analyzer_obj.parameters["window_slider"], +# # "store_aggregate" : analyzer_obj.parameters["store_aggregate"] +# } +# AnalyticsBackendServiceObj = AnalyticsBackendService() +# LOGGER.info("Analyzer to be generated: {:}".format((analyzer_to_generate))) +# response = AnalyticsBackendServiceObj.StartDaskListener(analyzer_uuid, analyzer_to_generate) +# assert isinstance(response, bool) +# time.sleep(100) +# LOGGER.info('Initiating StopRequestListener...') +# # AnalyticsBackendServiceObj = AnalyticsBackendService() +# response = AnalyticsBackendServiceObj.StopDaskListener(analyzer_uuid) +# LOGGER.debug(str(response)) +# assert isinstance(response, bool) + +# --- To test Start Streamer functionality --- +# def test_StartSparkStreamer(): +# LOGGER.debug(" >>> test_StartSparkStreamer: START <<< ") +# analyzer_obj = create_analyzer() +# analyzer_uuid = analyzer_obj.analyzer_id.analyzer_id.uuid +# analyzer_to_generate : Dict = { +# "algo_name" : analyzer_obj.algorithm_name, +# "input_kpis" : [k.kpi_id.uuid for k in analyzer_obj.input_kpi_ids], +# "output_kpis" : [k.kpi_id.uuid for k in analyzer_obj.output_kpi_ids], +# "oper_mode" : analyzer_obj.operation_mode, +# "thresholds" : json.loads(analyzer_obj.parameters["thresholds"]), +# "window_size" : analyzer_obj.parameters["window_size"], +# "window_slider" : analyzer_obj.parameters["window_slider"], +# # "store_aggregate" : analyzer_obj.parameters["store_aggregate"] +# } +# AnalyticsBackendServiceObj = AnalyticsBackendService() +# response = AnalyticsBackendServiceObj.StartSparkStreamer(analyzer_uuid, analyzer_to_generate) +# assert isinstance(response, bool) + +# --- To TEST StartRequestListenerFunctionality # def test_StartRequestListener(): # LOGGER.info('test_RunRequestListener') # AnalyticsBackendServiceObj = AnalyticsBackendService() -# response = AnalyticsBackendServiceObj.StartRequestListener() # response is Tuple (thread, stop_event) -# LOGGER.debug(str(response)) -# assert isinstance(response, tuple) +# AnalyticsBackendServiceObj.stop_event = Event() +# listener_thread = Thread(target=AnalyticsBackendServiceObj.RequestListener, args=()) +# listener_thread.start() + +# time.sleep(100) + + # AnalyticsBackendServiceObj.stop_event.set() + # LOGGER.info('Backend termination initiated. waiting for termination... 10 seconds') + # listener_thread.join(timeout=10) + # assert not listener_thread.is_alive(), "RequestListener thread did not terminate as expected." + # LOGGER.info('Completed test_RunRequestListener') # To test START and STOP communication together -def test_StopRequestListener(): - LOGGER.info('test_RunRequestListener') - LOGGER.info('Initiating StartRequestListener...') - AnalyticsBackendServiceObj = AnalyticsBackendService() - response_thread = AnalyticsBackendServiceObj.StartRequestListener() # response is Tuple (thread, stop_event) - # LOGGER.debug(str(response_thread)) - time.sleep(10) - LOGGER.info('Initiating StopRequestListener...') - AnalyticsBackendServiceObj = AnalyticsBackendService() - response = AnalyticsBackendServiceObj.StopRequestListener(response_thread) - LOGGER.debug(str(response)) - assert isinstance(response, bool) +# def test_StopRequestListener(): +# LOGGER.info('test_RunRequestListener') +# LOGGER.info('Initiating StartRequestListener...') +# AnalyticsBackendServiceObj = AnalyticsBackendService() +# response_thread = AnalyticsBackendServiceObj.StartRequestListener() # response is Tuple (thread, stop_event) +# # LOGGER.debug(str(response_thread)) +# time.sleep(10) +# LOGGER.info('Initiating StopRequestListener...') +# AnalyticsBackendServiceObj = AnalyticsBackendService() +# response = AnalyticsBackendServiceObj.StopRequestListener(response_thread) +# LOGGER.debug(str(response)) +# assert isinstance(response, bool) # To independently tests the SparkListener functionality # def test_SparkListener(): diff --git a/src/analytics/database/Analyzer_DB.py b/src/analytics/database/Analyzer_DB.py index 1ba68989a066e4638adc12e65289ed50b740731d..ab0b50f2ebba8e2590f1fcb4f2801f42a9c5d208 100644 --- a/src/analytics/database/Analyzer_DB.py +++ b/src/analytics/database/Analyzer_DB.py @@ -13,138 +13,44 @@ # limitations under the License. import logging -import sqlalchemy_utils +from common.method_wrappers.Decorator import MetricsPool +from common.tools.database.GenericDatabase import Database +from common.method_wrappers.ServiceExceptions import OperationFailedException -from sqlalchemy import inspect, or_ -from sqlalchemy.orm import sessionmaker +LOGGER = logging.getLogger(__name__) +METRICS_POOL = MetricsPool('KpiManager', 'Database') -from analytics.database.AnalyzerModel import Analyzer as AnalyzerModel -from analytics.database.AnalyzerEngine import AnalyzerEngine -from common.method_wrappers.ServiceExceptions import (OperationFailedException, AlreadyExistsException) +class AnalyzerDB(Database): + def __init__(self, model) -> None: + LOGGER.info('Init KpiManagerService') + super().__init__(model) -LOGGER = logging.getLogger(__name__) -DB_NAME = "tfs_analyzer" # TODO: export name from enviornment variable - -class AnalyzerDB: - def __init__(self): - self.db_engine = AnalyzerEngine.get_engine() - if self.db_engine is None: - LOGGER.error('Unable to get SQLAlchemy DB Engine...') - return False - self.db_name = DB_NAME - self.Session = sessionmaker(bind=self.db_engine) - - def create_database(self): - if not sqlalchemy_utils.database_exists(self.db_engine.url): - LOGGER.debug("Database created. {:}".format(self.db_engine.url)) - sqlalchemy_utils.create_database(self.db_engine.url) - - def drop_database(self) -> None: - if sqlalchemy_utils.database_exists(self.db_engine.url): - sqlalchemy_utils.drop_database(self.db_engine.url) - - def create_tables(self): - try: - AnalyzerModel.metadata.create_all(self.db_engine) # type: ignore - LOGGER.debug("Tables created in the database: {:}".format(self.db_name)) - except Exception as e: - LOGGER.debug("Tables cannot be created in the database. {:s}".format(str(e))) - raise OperationFailedException ("Tables can't be created", extra_details=["unable to create table {:}".format(e)]) - - def verify_tables(self): - try: - inspect_object = inspect(self.db_engine) - if(inspect_object.has_table('analyzer', None)): - LOGGER.info("Table exists in DB: {:}".format(self.db_name)) - except Exception as e: - LOGGER.info("Unable to fetch Table names. {:s}".format(str(e))) - -# ----------------- CURD OPERATIONS --------------------- - - def add_row_to_db(self, row): - session = self.Session() - try: - session.add(row) - session.commit() - LOGGER.debug(f"Row inserted into {row.__class__.__name__} table.") - return True - except Exception as e: - session.rollback() - if "psycopg2.errors.UniqueViolation" in str(e): - LOGGER.error(f"Unique key voilation: {row.__class__.__name__} table. {str(e)}") - raise AlreadyExistsException(row.__class__.__name__, row, - extra_details=["Unique key voilation: {:}".format(e)] ) - else: - LOGGER.error(f"Failed to insert new row into {row.__class__.__name__} table. {str(e)}") - raise OperationFailedException ("Deletion by column id", extra_details=["unable to delete row {:}".format(e)]) - finally: - session.close() - - def search_db_row_by_id(self, model, col_name, id_to_search): - session = self.Session() - try: - entity = session.query(model).filter_by(**{col_name: id_to_search}).first() - if entity: - # LOGGER.debug(f"{model.__name__} ID found: {str(entity)}") - return entity - else: - LOGGER.debug(f"{model.__name__} ID not found, No matching row: {str(id_to_search)}") - print("{:} ID not found, No matching row: {:}".format(model.__name__, id_to_search)) - return None - except Exception as e: - session.rollback() - LOGGER.debug(f"Failed to retrieve {model.__name__} ID. {str(e)}") - raise OperationFailedException ("search by column id", extra_details=["unable to search row {:}".format(e)]) - finally: - session.close() - - def delete_db_row_by_id(self, model, col_name, id_to_search): - session = self.Session() - try: - record = session.query(model).filter_by(**{col_name: id_to_search}).first() - if record: - session.delete(record) - session.commit() - LOGGER.debug("Deleted %s with %s: %s", model.__name__, col_name, id_to_search) - else: - LOGGER.debug("%s with %s %s not found", model.__name__, col_name, id_to_search) - return None - except Exception as e: - session.rollback() - LOGGER.error("Error deleting %s with %s %s: %s", model.__name__, col_name, id_to_search, e) - raise OperationFailedException ("Deletion by column id", extra_details=["unable to delete row {:}".format(e)]) - finally: - session.close() - def select_with_filter(self, model, filter_object): + """ + Generic method to create filters dynamically based on filter_object attributes. + params: model: SQLAlchemy model class to query. + filter_object: Object that contains filtering criteria as attributes. + return: SQLAlchemy session, query and Model + """ session = self.Session() try: - query = session.query(AnalyzerModel) - + query = session.query(model) # Apply filters based on the filter_object if filter_object.analyzer_id: - query = query.filter(AnalyzerModel.analyzer_id.in_([a.analyzer_id.uuid for a in filter_object.analyzer_id])) + query = query.filter(model.analyzer_id.in_([a.analyzer_id.uuid for a in filter_object.analyzer_id])) if filter_object.algorithm_names: - query = query.filter(AnalyzerModel.algorithm_name.in_(filter_object.algorithm_names)) + query = query.filter(model.algorithm_name.in_(filter_object.algorithm_names)) if filter_object.input_kpi_ids: input_kpi_uuids = [k.kpi_id.uuid for k in filter_object.input_kpi_ids] - query = query.filter(AnalyzerModel.input_kpi_ids.op('&&')(input_kpi_uuids)) + query = query.filter(model.input_kpi_ids.op('&&')(input_kpi_uuids)) if filter_object.output_kpi_ids: output_kpi_uuids = [k.kpi_id.uuid for k in filter_object.output_kpi_ids] - query = query.filter(AnalyzerModel.output_kpi_ids.op('&&')(output_kpi_uuids)) - - result = query.all() - # query should be added to return all rows - if result: - LOGGER.debug(f"Fetched filtered rows from {model.__name__} table with filters: {filter_object}") # - Results: {result} - else: - LOGGER.warning(f"No matching row found in {model.__name__} table with filters: {filter_object}") - return result + query = query.filter(model.output_kpi_ids.op('&&')(output_kpi_uuids)) except Exception as e: - LOGGER.error(f"Error fetching filtered rows from {model.__name__} table with filters {filter_object} ::: {e}") - raise OperationFailedException ("Select by filter", extra_details=["unable to apply the filter {:}".format(e)]) - finally: - session.close() + LOGGER.error(f"Error creating filter of {model.__name__} table. ERROR: {e}") + raise OperationFailedException ("CreateKpiDescriptorFilter", extra_details=["unable to create the filter {:}".format(e)]) + + return super().select_with_filter(query, session, model) diff --git a/src/analytics/frontend/requirements.in b/src/analytics/frontend/requirements.in index d81b9ddbeafeff94c830d48ca5594e775b9ce240..0b1ec921b8bb77c0d26e8240585a19ef165f0eec 100644 --- a/src/analytics/frontend/requirements.in +++ b/src/analytics/frontend/requirements.in @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -apscheduler==3.10.4 +apscheduler==3.10.1 confluent-kafka==2.3.* psycopg2-binary==2.9.* SQLAlchemy==1.4.* diff --git a/src/analytics/frontend/service/AnalyticsFrontendServiceServicerImpl.py b/src/analytics/frontend/service/AnalyticsFrontendServiceServicerImpl.py index 8bb6a17afb5b911e3652fdb8d1853b5b7bc6faf3..219821ac9bf9bf05e7c599480795d988d1015605 100644 --- a/src/analytics/frontend/service/AnalyticsFrontendServiceServicerImpl.py +++ b/src/analytics/frontend/service/AnalyticsFrontendServiceServicerImpl.py @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. - import logging, grpc, json, queue from typing import Dict @@ -37,7 +36,7 @@ class AnalyticsFrontendServiceServicerImpl(AnalyticsFrontendServiceServicer): def __init__(self): LOGGER.info('Init AnalyticsFrontendService') self.listener_topic = KafkaTopic.ANALYTICS_RESPONSE.value - self.db_obj = AnalyzerDB() + self.db_obj = AnalyzerDB(AnalyzerModel) self.result_queue = queue.Queue() self.scheduler = BackgroundScheduler() self.kafka_producer = KafkaProducer({'bootstrap.servers' : KafkaConfig.get_kafka_address()}) @@ -84,7 +83,6 @@ class AnalyticsFrontendServiceServicerImpl(AnalyticsFrontendServiceServicer): LOGGER.info("Analyzer Start Request Generated: Analyzer Id: {:}, Value: {:}".format(analyzer_uuid, analyzer_to_generate)) self.kafka_producer.flush() - # self.StartResponseListener(analyzer_uuid) def StartResponseListener(self, filter_key=None): """ @@ -103,10 +101,8 @@ class AnalyticsFrontendServiceServicerImpl(AnalyticsFrontendServiceServicer): LOGGER.info(f"Started Kafka listener for topic {self.listener_topic}...") try: while True: - LOGGER.info("entering while...") - key, value = self.result_queue.get() # Wait until a result is available - LOGGER.info("In while true ...") - yield key, value # Yield the result to the calling function + key, value = self.result_queue.get() + yield key, value except KeyboardInterrupt: LOGGER.warning("Listener stopped manually.") finally: @@ -136,8 +132,6 @@ class AnalyticsFrontendServiceServicerImpl(AnalyticsFrontendServiceServicer): self.result_queue.put((key, value)) else: LOGGER.info(f"Skipping message with unmatched key: {key}") - # value = json.loads(msg.value().decode('utf-8')) # Added for debugging - # self.result_queue.put((filter_key, value)) # Added for debugging except Exception as e: LOGGER.error(f"Error processing Kafka message: {e}") @@ -208,7 +202,7 @@ class AnalyticsFrontendServiceServicerImpl(AnalyticsFrontendServiceServicer): def delivery_callback(self, err, msg): if err: LOGGER.debug('Message delivery failed: {:}'.format(err)) - print ('Message delivery failed: {:}'.format(err)) - # else: - # LOGGER.debug('Message delivered to topic {:}'.format(msg.topic())) - # print('Message delivered to topic {:}'.format(msg.topic())) + # print ('Message delivery failed: {:}'.format(err)) + else: + LOGGER.debug('Message delivered to topic {:}'.format(msg.topic())) + # print('Message delivered to topic {:}'.format(msg.topic())) diff --git a/src/analytics/frontend/service/__main__.py b/src/analytics/frontend/service/__main__.py index 6c331844f45d98095ef98951f3db43a0e2f0c69c..1df996785ec636592cf5197144d916a89257d9af 100644 --- a/src/analytics/frontend/service/__main__.py +++ b/src/analytics/frontend/service/__main__.py @@ -16,9 +16,11 @@ import logging, signal, sys, threading from prometheus_client import start_http_server from common.Settings import get_log_level, get_metrics_port from .AnalyticsFrontendService import AnalyticsFrontendService +from analytics.database.AnalyzerModel import Analyzer as Model +from common.tools.database.GenericDatabase import Database terminate = threading.Event() -LOGGER = None +LOGGER = None def signal_handler(signal, frame): # pylint: disable=redefined-outer-name LOGGER.warning('Terminate signal received') @@ -36,6 +38,11 @@ def main(): LOGGER.info('Starting...') + # To create DB + kpiDBobj = Database(Model) + kpiDBobj.create_database() + kpiDBobj.create_tables() + # Start metrics server metrics_port = get_metrics_port() start_http_server(metrics_port) diff --git a/src/analytics/frontend/tests/messages.py b/src/analytics/frontend/tests/messages.py index 646de962e8a213582fdb7cd1446ab57bda561a96..e2d39585e434b58c0d48d0061e105a5ebaabe6b9 100644 --- a/src/analytics/frontend/tests/messages.py +++ b/src/analytics/frontend/tests/messages.py @@ -21,13 +21,14 @@ from common.proto.analytics_frontend_pb2 import ( AnalyzerOperationMode, Analyze def create_analyzer_id(): _create_analyzer_id = AnalyzerId() # _create_analyzer_id.analyzer_id.uuid = str(uuid.uuid4()) - _create_analyzer_id.analyzer_id.uuid = "efef4d95-1cf1-43c4-9742-95c283ddd7a6" + # _create_analyzer_id.analyzer_id.uuid = "efef4d95-1cf1-43c4-9742-95c283ddd7a6" + _create_analyzer_id.analyzer_id.uuid = "1e22f180-ba28-4641-b190-2287bf446666" return _create_analyzer_id def create_analyzer(): _create_analyzer = Analyzer() # _create_analyzer.analyzer_id.analyzer_id.uuid = str(uuid.uuid4()) - _create_analyzer.analyzer_id.analyzer_id.uuid = "efef4d95-1cf1-43c4-9742-95c283ddd7a6" + _create_analyzer.analyzer_id.analyzer_id.uuid = "1e22f180-ba28-4641-b190-2287bf446666" _create_analyzer.algorithm_name = "Test_Aggergate_and_Threshold" _create_analyzer.operation_mode = AnalyzerOperationMode.ANALYZEROPERATIONMODE_STREAMING @@ -48,11 +49,12 @@ def create_analyzer(): _create_analyzer.output_kpi_ids.append(_kpi_id) # parameter _threshold_dict = { - # 'avg_value' :(20, 30), 'min_value' :(00, 10), 'max_value' :(45, 50), - 'first_value' :(00, 10), 'last_value' :(40, 50), 'stdev_value':(00, 10)} + 'mean_value' :(20, 30), 'min_value' :(00, 10), 'max_value' :(45, 50), + 'first_value' :(00, 10), 'last_value' :(40, 50), 'std_value':(00, 10) + } _create_analyzer.parameters['thresholds'] = json.dumps(_threshold_dict) - _create_analyzer.parameters['window_size'] = "60 seconds" # Such as "10 seconds", "2 minutes", "3 hours", "4 days" or "5 weeks" - _create_analyzer.parameters['window_slider'] = "30 seconds" # should be less than window size + _create_analyzer.parameters['window_size'] = "10s" # Such as "10 seconds", "2 minutes", "3 hours", "4 days" or "5 weeks" + _create_analyzer.parameters['window_slider'] = "5s" # should be less than window size _create_analyzer.parameters['store_aggregate'] = str(False) # TRUE to store. No implemented yet return _create_analyzer diff --git a/src/analytics/frontend/tests/test_frontend.py b/src/analytics/frontend/tests/test_frontend.py index d2428c01fb021f71a884d9a99c446bfef6e66559..48ab4dac5a5dfbdec688fc5c346f95d41e32c81c 100644 --- a/src/analytics/frontend/tests/test_frontend.py +++ b/src/analytics/frontend/tests/test_frontend.py @@ -97,14 +97,13 @@ def test_validate_kafka_topics(): # assert isinstance(response, AnalyzerId) # To test start and stop listener together -def test_StartStopAnalyzers(analyticsFrontend_client): - LOGGER.info(' >>> test_StartStopAnalyzers START: <<< ') - LOGGER.info('--> StartAnalyzer') +def test_StartAnalyzers(analyticsFrontend_client): + LOGGER.info(' >>> test_StartAnalyzers START: <<< ') added_analyzer_id = analyticsFrontend_client.StartAnalyzer(create_analyzer()) LOGGER.debug(str(added_analyzer_id)) LOGGER.info(' --> Calling StartResponseListener... ') class_obj = AnalyticsFrontendServiceServicerImpl() - response = class_obj.StartResponseListener(added_analyzer_id.analyzer_id._uuid) + response = class_obj.StartResponseListener(added_analyzer_id.analyzer_id.uuid) LOGGER.debug(response) LOGGER.info("waiting for timer to comlete ...") time.sleep(3) @@ -131,4 +130,4 @@ def test_StartStopAnalyzers(analyticsFrontend_client): # class_obj = AnalyticsFrontendServiceServicerImpl() # for response in class_obj.StartResponseListener(analyzer_id.analyzer_id.uuid): # LOGGER.debug(response) -# assert isinstance(response, tuple) \ No newline at end of file +# assert isinstance(response, tuple) diff --git a/src/analytics/requirements.in b/src/analytics/requirements.in index 8ff30ddaad25c39713f2e6f68c8d9aebed74dad0..231dc04e820387c95ffea72cbe67b9f0a9a0865a 100644 --- a/src/analytics/requirements.in +++ b/src/analytics/requirements.in @@ -12,8 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -java==11.0.* -pyspark==3.5.2 confluent-kafka==2.3.* psycopg2-binary==2.9.* SQLAlchemy==1.4.* diff --git a/src/analytics/tests/test_analytics_db.py b/src/analytics/tests/test_analytics_db.py index 58e7d0167044bb461e66b053dcb3999641ea8419..2794edb4a051b38d4cef902fd09aaad5db966179 100644 --- a/src/analytics/tests/test_analytics_db.py +++ b/src/analytics/tests/test_analytics_db.py @@ -15,12 +15,13 @@ import logging from analytics.database.Analyzer_DB import AnalyzerDB +from analytics.database.AnalyzerModel import Analyzer LOGGER = logging.getLogger(__name__) def test_verify_databases_and_tables(): LOGGER.info('>>> test_verify_databases_and_tables : START <<< ') - AnalyzerDBobj = AnalyzerDB() + AnalyzerDBobj = AnalyzerDB(Analyzer) # AnalyzerDBobj.drop_database() # AnalyzerDBobj.verify_tables() AnalyzerDBobj.create_database() diff --git a/src/automation/.gitlab-ci.yml b/src/automation/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..f52dda3f4e3fd7cd4de6f4d03a8ada164796f404 --- /dev/null +++ b/src/automation/.gitlab-ci.yml @@ -0,0 +1,117 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Build, tag, and push the Docker image to the GitLab Docker registry +build automation: + variables: + IMAGE_NAME: 'automation' # name of the microservice + IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) + stage: build + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + script: + - docker buildx build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/Dockerfile . + - docker tag "$IMAGE_NAME:$IMAGE_TAG" "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG" + - docker push "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG" + after_script: + - docker images --filter="dangling=true" --quiet | xargs -r docker rmi + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' + - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' + - changes: + - src/common/**/*.py + - proto/*.proto + - src/$IMAGE_NAME/**/*.{py,in,yml} + - src/$IMAGE_NAME/Dockerfile + - src/$IMAGE_NAME/tests/*.py + - manifests/${IMAGE_NAME}service.yaml + - .gitlab-ci.yml + +# Apply unit test to the component +unit_test automation: + variables: + IMAGE_NAME: 'automation' # name of the microservice + IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) + stage: unit_test + needs: + - build automation + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + - > + if docker network list | grep teraflowbridge; then + echo "teraflowbridge is already created"; + else + docker network create -d bridge teraflowbridge; + fi + - > + if docker container ls | grep $IMAGE_NAME; then + docker rm -f $IMAGE_NAME; + else + echo "$IMAGE_NAME image is not in the system"; + fi + script: + - docker pull "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG" + - docker run --name $IMAGE_NAME -d -p 2020:2020 -v "$PWD/src/$IMAGE_NAME/tests:/opt/results" --network=teraflowbridge $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG + - sleep 5 + - docker ps -a + - docker logs $IMAGE_NAME + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_unitary_emulated.py --junitxml=/opt/results/${IMAGE_NAME}_report_emulated.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_unitary_ietf_actn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_actn.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing" + coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' + after_script: + - docker rm -f $IMAGE_NAME + - docker network rm teraflowbridge + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' + - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' + - changes: + - src/common/**/*.py + - proto/*.proto + - src/$IMAGE_NAME/**/*.{py,in,yml} + - src/$IMAGE_NAME/Dockerfile + - src/$IMAGE_NAME/tests/*.py + - src/$IMAGE_NAME/tests/Dockerfile + - manifests/${IMAGE_NAME}service.yaml + - .gitlab-ci.yml + artifacts: + when: always + reports: + junit: src/$IMAGE_NAME/tests/${IMAGE_NAME}_report_*.xml + +## Deployment of the service in Kubernetes Cluster +#deploy automation: +# variables: +# IMAGE_NAME: 'automation' # name of the microservice +# IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) +# stage: deploy +# needs: +# - unit test automation +# # - integ_test execute +# script: +# - 'sed -i "s/$IMAGE_NAME:.*/$IMAGE_NAME:$IMAGE_TAG/" manifests/${IMAGE_NAME}service.yaml' +# - kubectl version +# - kubectl get all +# - kubectl apply -f "manifests/${IMAGE_NAME}service.yaml" +# - kubectl get all +# # environment: +# # name: test +# # url: https://example.com +# # kubernetes: +# # namespace: test +# rules: +# - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' +# when: manual +# - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' +# when: manual diff --git a/src/automation/Config.py b/src/automation/Config.py new file mode 100644 index 0000000000000000000000000000000000000000..7c7568fdb6e3b1446aa9412ad32a0a5948ba949b --- /dev/null +++ b/src/automation/Config.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/src/automation/Dockerfile b/src/automation/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..deef6b36fb4ab324e75a687bc3ce8c297c186c8f --- /dev/null +++ b/src/automation/Dockerfile @@ -0,0 +1,78 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM python:3.9-slim + +# Install dependencies +RUN apt-get --yes --quiet --quiet update && \ + apt-get --yes --quiet --quiet install wget g++ git && \ + rm -rf /var/lib/apt/lists/* + +# Set Python to show logs as they occur +ENV PYTHONUNBUFFERED=0 + +# Download the gRPC health probe +RUN GRPC_HEALTH_PROBE_VERSION=v0.2.0 && \ + wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \ + chmod +x /bin/grpc_health_probe + +# Get generic Python packages +RUN python3 -m pip install --upgrade pip +RUN python3 -m pip install --upgrade setuptools wheel +RUN python3 -m pip install --upgrade pip-tools + +# Get common Python packages +# Note: this step enables sharing the previous Docker build steps among all the Python components +WORKDIR /var/teraflow +COPY common_requirements.in common_requirements.in +RUN pip-compile --quiet --output-file=common_requirements.txt common_requirements.in +RUN python3 -m pip install -r common_requirements.txt + +# Add common files into working directory +WORKDIR /var/teraflow/common +COPY src/common/. ./ +RUN rm -rf proto + +# Create proto sub-folder, copy .proto files, and generate Python code +RUN mkdir -p /var/teraflow/common/proto +WORKDIR /var/teraflow/common/proto +RUN touch __init__.py +COPY proto/*.proto ./ +RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto +RUN rm *.proto +RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \; + +# Create component sub-folders, get specific Python packages +RUN mkdir -p /var/teraflow/automation +WORKDIR /var/teraflow/automation +COPY src/automation/requirements.in requirements.in +RUN pip-compile --quiet --output-file=requirements.txt requirements.in +RUN python3 -m pip install -r requirements.txt + +# Add component files into working directory +WORKDIR /var/teraflow +COPY src/context/__init__.py context/__init__.py +COPY src/context/client/. context/client/ +COPY src/kpi_manager/__init__.py kpi_manager/__init__.py +COPY src/kpi_manager/client/. kpi_manager/client/ +COPY src/telemetry/__init__.py telemetry/__init__.py +COPY src/telemetry/frontend/__init__.py telemetry/frontend/__init__.py +COPY src/telemetry/frontend/client/. telemetry/frontend/client/ +COPY src/analytics/__init__.py analytics/__init__.py +COPY src/analytics/frontend/__init__.py analytics/frontend/__init__.py +COPY src/analytics/frontend/client/. analytics/frontend/client/ +COPY src/automation/. automation/ + +# Start the service +ENTRYPOINT ["python", "-m", "automation.service"] diff --git a/src/automation/__init__.py b/src/automation/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7c7568fdb6e3b1446aa9412ad32a0a5948ba949b --- /dev/null +++ b/src/automation/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/src/automation/client/PolicyClient.py b/src/automation/client/PolicyClient.py new file mode 100644 index 0000000000000000000000000000000000000000..f2b25f2429d790c9cb25b5d70e1e737594586133 --- /dev/null +++ b/src/automation/client/PolicyClient.py @@ -0,0 +1,55 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import grpc, logging +from common.Constants import ServiceNameEnum +from common.Settings import get_service_host, get_service_port_grpc +from common.proto.policy_pb2 import PolicyRuleService, PolicyRuleState +from common.proto.policy_pb2_grpc import PolicyServiceStub +from common.tools.client.RetryDecorator import retry, delay_exponential +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.proto.openconfig_device_pb2_grpc import OpenConfigServiceStub +LOGGER = logging.getLogger(__name__) +MAX_RETRIES = 15 +DELAY_FUNCTION = delay_exponential(initial=0.01, increment=2.0, maximum=5.0) +RETRY_DECORATOR = retry(max_retries=MAX_RETRIES, delay_function=DELAY_FUNCTION, prepare_method_name='connect') + +class PolicyClient: + def __init__(self, host=None, port=None): + if not host: host = get_service_host(ServiceNameEnum.POLICY) + if not port: port = get_service_port_grpc(ServiceNameEnum.POLICY) + self.endpoint = '{:s}:{:s}'.format(str(host), str(port)) + LOGGER.info('Creating channel to {:s}...'.format(str(self.endpoint))) + self.channel = None + self.stub = None + self.openconfig_stub=None + self.connect() + LOGGER.info('Channel created') + + def connect(self): + self.channel = grpc.insecure_channel(self.endpoint) + self.stub = PolicyServiceStub(self.channel) + self.openconfig_stub=OpenConfigServiceStub(self.channel) + + def close(self): + if self.channel is not None: self.channel.close() + self.channel = None + self.stub = None + + @RETRY_DECORATOR + def PolicyAddService(self, request : PolicyRuleService) -> PolicyRuleState: + LOGGER.debug('AddPolicy request: {:s}'.format(grpc_message_to_json_string(request))) + response = self.stub.PolicyAddService(request) + LOGGER.debug('AddPolicy result: {:s}'.format(grpc_message_to_json_string(response))) + return response diff --git a/src/automation/client/__init__.py b/src/automation/client/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7c7568fdb6e3b1446aa9412ad32a0a5948ba949b --- /dev/null +++ b/src/automation/client/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/src/automation/requirements.in b/src/automation/requirements.in new file mode 100644 index 0000000000000000000000000000000000000000..d81b9ddbeafeff94c830d48ca5594e775b9ce240 --- /dev/null +++ b/src/automation/requirements.in @@ -0,0 +1,20 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apscheduler==3.10.4 +confluent-kafka==2.3.* +psycopg2-binary==2.9.* +SQLAlchemy==1.4.* +sqlalchemy-cockroachdb==1.4.* +SQLAlchemy-Utils==0.38.* diff --git a/src/automation/service/AutomationService.py b/src/automation/service/AutomationService.py new file mode 100644 index 0000000000000000000000000000000000000000..4ff0beb3aea14bc6e3ed014d9cc73e72e856c438 --- /dev/null +++ b/src/automation/service/AutomationService.py @@ -0,0 +1,28 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from common.Constants import ServiceNameEnum +from common.Settings import get_service_port_grpc +from common.proto.automation_pb2_grpc import add_AutomationServiceServicer_to_server +from common.tools.service.GenericGrpcService import GenericGrpcService +from automation.service.AutomationServiceServicerImpl import AutomationServiceServicerImpl + +class AutomationService(GenericGrpcService): + def __init__(self, cls_name: str = __name__) -> None: + port = get_service_port_grpc(ServiceNameEnum.AUTOMATION) + super().__init__(port, cls_name=cls_name) + self.automation_servicer = AutomationServiceServicerImpl() + + def install_servicers(self): + add_AutomationServiceServicer_to_server(self.automation_servicer, self.server) diff --git a/src/automation/service/AutomationServiceServicerImpl.py b/src/automation/service/AutomationServiceServicerImpl.py new file mode 100644 index 0000000000000000000000000000000000000000..94550157e09a316f5705ce2b052a8837d75cd1b7 --- /dev/null +++ b/src/automation/service/AutomationServiceServicerImpl.py @@ -0,0 +1,224 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import grpc, json, logging +from uuid import uuid4 +from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method +from common.method_wrappers.ServiceExceptions import InvalidArgumentException +from common.proto.analytics_frontend_pb2 import Analyzer, AnalyzerId +from common.proto.automation_pb2 import ZSMCreateRequest, ZSMService, ZSMServiceID, ZSMServiceState, ZSMCreateUpdate +from common.proto.automation_pb2_grpc import AutomationServiceServicer +from common.proto.context_pb2 import Service, ServiceId +from common.proto.kpi_manager_pb2 import KpiId, KpiDescriptor +from common.proto.policy_pb2 import PolicyRuleService, PolicyRuleState +from common.proto.policy_action_pb2 import PolicyRuleAction, PolicyRuleActionConfig +from common.proto.policy_condition_pb2 import PolicyRuleCondition +from common.proto.telemetry_frontend_pb2 import Collector, CollectorId + +from analytics.frontend.client.AnalyticsFrontendClient import AnalyticsFrontendClient +from automation.client.PolicyClient import PolicyClient +from context.client.ContextClient import ContextClient +from kpi_manager.client.KpiManagerClient import KpiManagerClient +from telemetry.frontend.client.TelemetryFrontendClient import TelemetryFrontendClient + +LOGGER = logging.getLogger(__name__) +METRICS_POOL = MetricsPool('Automation', 'RPC') + +class AutomationServiceServicerImpl(AutomationServiceServicer): + def __init__(self): + LOGGER.info('Init AutomationService') + + @safe_and_metered_rpc_method(METRICS_POOL,LOGGER) + def ZSMCreate(self, request : ZSMCreateRequest, context : grpc.ServicerContext) -> ZSMService: + + # check that service does not exist + context_client = ContextClient() + kpi_manager_client = KpiManagerClient() + policy_client = PolicyClient() + telemetry_frontend_client = TelemetryFrontendClient() + analytics_frontend_client = AnalyticsFrontendClient() + + try: + + # TODO: Remove static variables(get them from ZSMCreateRequest) + # TODO: Refactor policy component (remove unnecessary variables) + + ####### GET Context ####################### + LOGGER.info('Get the service from Context: ') + service: Service = context_client.GetService(request.serviceId) + LOGGER.info('Service ({:s}) :'.format(str(service))) + ########################################### + + ####### SET Kpi Descriptor LAT ################ + LOGGER.info('Set Kpi Descriptor LAT: ') + + if(len(service.service_constraints) == 0): + raise InvalidArgumentException("service_constraints" , "empty", []); + + if(len(service.service_constraints) > 1): + raise InvalidArgumentException("service_constraints" , ">1", []); + + if(service.service_constraints[0].sla_latency is None ): + raise InvalidArgumentException("sla_latency", "empty", []); + + ## Static Implementation Applied only in case of SLA Latency Constraint ## + + # KPI Descriptor + kpi_descriptor_lat = KpiDescriptor() + kpi_descriptor_lat.kpi_sample_type = 701 #'KPISAMPLETYPE_SERVICE_LATENCY_MS' #static service.service_constraints[].sla_latency.e2e_latency_ms + kpi_descriptor_lat.service_id.service_uuid.uuid = request.serviceId.service_uuid.uuid + kpi_descriptor_lat.kpi_id.kpi_id.uuid = str(uuid4()) + + kpi_id_lat: KpiId = kpi_manager_client.SetKpiDescriptor(kpi_descriptor_lat) + LOGGER.info('The kpi_id_lat({:s})'.format(str(kpi_id_lat))) + ########################################### + + ####### SET Kpi Descriptor TX ################ + LOGGER.info('Set Kpi Descriptor TX: ') + + kpi_descriptor_tx = KpiDescriptor() + kpi_descriptor_tx.kpi_sample_type = 101 # static KPISAMPLETYPE_PACKETS_TRANSMITTED + kpi_descriptor_tx.service_id.service_uuid.uuid = request.serviceId.service_uuid.uuid + kpi_descriptor_tx.kpi_id.kpi_id.uuid = str(uuid4()) + + kpi_id_tx: KpiId = kpi_manager_client.SetKpiDescriptor(kpi_descriptor_tx) + LOGGER.info('The kpi_id_tx({:s})'.format(str(kpi_id_tx))) + ########################################### + + ####### SET Kpi Descriptor RX ################ + LOGGER.info('Set Kpi Descriptor RX: ') + + kpi_descriptor_rx = KpiDescriptor() + kpi_descriptor_rx.kpi_sample_type = 102 # static KPISAMPLETYPE_PACKETS_RECEIVED + kpi_descriptor_rx.service_id.service_uuid.uuid = request.serviceId.service_uuid.uuid + kpi_descriptor_rx.kpi_id.kpi_id.uuid = str(uuid4()) + + kpi_id_rx: KpiId = kpi_manager_client.SetKpiDescriptor(kpi_descriptor_rx) + LOGGER.info('kpi_id_rx({:s})'.format(str(kpi_id_rx))) + ########################################### + + + + ####### START Collector TX ################# + collect_tx = Collector() + collect_tx.collector_id.collector_id.uuid = str(uuid4()) + collect_tx.kpi_id.kpi_id.uuid = kpi_id_tx.kpi_id.uuid + collect_tx.duration_s = 20000 # static + collect_tx.interval_s = 1 # static + LOGGER.info('Start Collector TX'.format(str(collect_tx))) + + collect_id_tx: CollectorId = telemetry_frontend_client.StartCollector(collect_tx) + LOGGER.info('collect_id_tx({:s})'.format(str(collect_id_tx))) + ############################################# + + ####### START Collector RX ################## + collect_rx = Collector() + collect_rx.collector_id.collector_id.uuid = str(uuid4()) + collect_rx.kpi_id.kpi_id.uuid = kpi_id_rx.kpi_id.uuid + collect_rx.duration_s = 20000 # static + collect_rx.interval_s = 1 # static + LOGGER.info('Start Collector RX'.format(str(collect_rx))) + + collect_id_rx: CollectorId = telemetry_frontend_client.StartCollector(collect_rx) + LOGGER.info('collect_id_tx({:s})'.format(str(collect_id_rx))) + ############################################### + + ####### START Analyzer LAT ################ + analyzer = Analyzer() + analyzer.analyzer_id.analyzer_id.uuid = str(uuid4()) + analyzer.algorithm_name = 'Test_Aggregate_and_Threshold' # static + analyzer.operation_mode = 2 + analyzer.input_kpi_ids.append(kpi_id_rx) + analyzer.input_kpi_ids.append(kpi_id_tx) + analyzer.output_kpi_ids.append(kpi_id_lat) + + thresholdStr = service.service_constraints[0].custom.constraint_type + + _threshold_dict = {thresholdStr: (0, int(service.service_constraints[0].custom.constraint_value))} + analyzer.parameters['thresholds'] = json.dumps(_threshold_dict) + analyzer.parameters['window_size'] = "60s" + analyzer.parameters['window_slider'] = "30s" + + analyzer_id_lat: AnalyzerId = analytics_frontend_client.StartAnalyzer(analyzer) + LOGGER.info('analyzer_id_lat({:s})'.format(str(analyzer_id_lat))) + ########################################################### + + ####### SET Policy LAT ################ + policy_lat = PolicyRuleService() + policy_lat.serviceId.service_uuid.uuid = request.serviceId.service_uuid.uuid + policy_lat.serviceId.context_id.context_uuid.uuid = request.serviceId.context_id.context_uuid.uuid + + # PolicyRuleBasic + policy_lat.policyRuleBasic.priority = 0 + policy_lat.policyRuleBasic.policyRuleId.uuid.uuid = str(uuid4()) + policy_lat.policyRuleBasic.booleanOperator = 2 + + # PolicyRuleAction + policyRuleActionConfig = PolicyRuleActionConfig() + policyRuleActionConfig.action_key = "" + policyRuleActionConfig.action_value = "" + + policyRuleAction = PolicyRuleAction() + policyRuleAction.action = 5 + policyRuleAction.action_config.append(policyRuleActionConfig) + policy_lat.policyRuleBasic.actionList.append(policyRuleAction) + + # for constraint in service.service_constraints: + + # PolicyRuleCondition + policyRuleCondition = PolicyRuleCondition() + policyRuleCondition.kpiId.kpi_id.uuid = kpi_id_lat.kpi_id.uuid + policyRuleCondition.numericalOperator = 5 + policyRuleCondition.kpiValue.floatVal = 300 + + policy_lat.policyRuleBasic.conditionList.append(policyRuleCondition) + + policy_rule_state: PolicyRuleState = policy_client.PolicyAddService(policy_lat) + LOGGER.info('policy_rule_state({:s})'.format(str(policy_rule_state))) + + except grpc.RpcError as e: + if e.code() != grpc.StatusCode.NOT_FOUND: raise # pylint: disable=no-member + LOGGER.exception('Unable to get Service({:s})'.format(str(request))) + context_client.close() + kpi_manager_client.close() + policy_client.close() + telemetry_frontend_client.close() + return None + + context_client.close() + kpi_manager_client.close() + policy_client.close() + telemetry_frontend_client.close() + return ZSMService() + + @safe_and_metered_rpc_method(METRICS_POOL,LOGGER) + def ZSMUpdate(self, request : ZSMCreateUpdate, context : grpc.ServicerContext) -> ZSMService: + LOGGER.info('NOT IMPLEMENTED ZSMUpdate') + return ZSMService() + + @safe_and_metered_rpc_method(METRICS_POOL,LOGGER) + def ZSMDelete(self, request : ZSMServiceID, context : grpc.ServicerContext) -> ZSMServiceState: + LOGGER.info('NOT IMPLEMENTED ZSMDelete') + return ZSMServiceState() + + @safe_and_metered_rpc_method(METRICS_POOL,LOGGER) + def ZSMGetById(self, request : ZSMServiceID, context : grpc.ServicerContext) -> ZSMService: + LOGGER.info('NOT IMPLEMENTED ZSMGetById') + return ZSMService() + + + @safe_and_metered_rpc_method(METRICS_POOL,LOGGER) + def ZSMGetByService(self, request : ServiceId, context : grpc.ServicerContext) -> ZSMService: + LOGGER.info('NOT IMPLEMENTED ZSMGetByService') + return ZSMService() diff --git a/src/automation/service/__init__.py b/src/automation/service/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7c7568fdb6e3b1446aa9412ad32a0a5948ba949b --- /dev/null +++ b/src/automation/service/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/src/automation/service/__main__.py b/src/automation/service/__main__.py new file mode 100644 index 0000000000000000000000000000000000000000..39d8beaffd959744b83d7e1ace78da2b1b800a21 --- /dev/null +++ b/src/automation/service/__main__.py @@ -0,0 +1,53 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging, signal, sys, threading +from prometheus_client import start_http_server +from common.Settings import get_log_level, get_metrics_port +from .AutomationService import AutomationService + +LOG_LEVEL = get_log_level() +logging.basicConfig(level=LOG_LEVEL, format="[%(asctime)s] %(levelname)s:%(name)s:%(message)s") +LOGGER = logging.getLogger(__name__) + +terminate = threading.Event() + +def signal_handler(signal, frame): # pylint: disable=redefined-outer-name,unused-argument + LOGGER.warning('Terminate signal received') + terminate.set() + +def main(): + LOGGER.info('Starting...') + signal.signal(signal.SIGINT, signal_handler) + signal.signal(signal.SIGTERM, signal_handler) + + # Start metrics server + metrics_port = get_metrics_port() + start_http_server(metrics_port) + + # Starting context service + grpc_service = AutomationService() + grpc_service.start() + + # Wait for Ctrl+C or termination signal + while not terminate.wait(timeout=1.0): pass + + LOGGER.info('Terminating...') + grpc_service.stop() + + LOGGER.info('Bye') + return 0 + +if __name__ == '__main__': + sys.exit(main()) diff --git a/src/automation/tests/__init__.py b/src/automation/tests/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7c7568fdb6e3b1446aa9412ad32a0a5948ba949b --- /dev/null +++ b/src/automation/tests/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/src/automation/tests/test_unitary_emulated.py b/src/automation/tests/test_unitary_emulated.py new file mode 100644 index 0000000000000000000000000000000000000000..dee3c4fabed496e50a7c7ee5dafa9a98be1d474d --- /dev/null +++ b/src/automation/tests/test_unitary_emulated.py @@ -0,0 +1,22 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging + +LOGGER = logging.getLogger(__name__) + +def test_device_emulated_add_error_cases(): + LOGGER.info("Start Tests") + LOGGER.info("Second log Tests") + assert True diff --git a/src/automation/tests/test_unitary_ietf_actn.py b/src/automation/tests/test_unitary_ietf_actn.py new file mode 100644 index 0000000000000000000000000000000000000000..37a5ac4968c9bb39682b84b3e061ff4a35dbe0f1 --- /dev/null +++ b/src/automation/tests/test_unitary_ietf_actn.py @@ -0,0 +1,21 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging + +LOGGER = logging.getLogger(__name__) + +def test_device_emulated_add_error_cases(): + LOGGER.info("Start Tests") + assert True diff --git a/src/common/Constants.py b/src/common/Constants.py index 74490321f9c8ec016fa4b48b583e2217c61710ec..33a5d5047c8969118417a8b06a13cb8fb6fbf7df 100644 --- a/src/common/Constants.py +++ b/src/common/Constants.py @@ -36,6 +36,7 @@ INTERDOMAIN_TOPOLOGY_NAME = 'inter' # contains the abstract inter-domain top # Default service names class ServiceNameEnum(Enum): + AUTOMATION = 'automation' CONTEXT = 'context' DEVICE = 'device' SERVICE = 'service' @@ -61,6 +62,7 @@ class ServiceNameEnum(Enum): E2EORCHESTRATOR = 'e2e-orchestrator' OPTICALCONTROLLER = 'opticalcontroller' BGPLS = 'bgpls-speaker' + QKD_APP = 'qkd_app' KPIMANAGER = 'kpi-manager' KPIVALUEAPI = 'kpi-value-api' KPIVALUEWRITER = 'kpi-value-writer' @@ -68,6 +70,7 @@ class ServiceNameEnum(Enum): TELEMETRYBACKEND = 'telemetry-backend' ANALYTICSFRONTEND = 'analytics-frontend' ANALYTICSBACKEND = 'analytics-backend' + QOSPROFILE = 'qos-profile' # Used for test and debugging only DLT_GATEWAY = 'dltgateway' @@ -96,7 +99,9 @@ DEFAULT_SERVICE_GRPC_PORTS = { ServiceNameEnum.FORECASTER .value : 10040, ServiceNameEnum.E2EORCHESTRATOR .value : 10050, ServiceNameEnum.OPTICALCONTROLLER .value : 10060, + ServiceNameEnum.QKD_APP .value : 10070, ServiceNameEnum.BGPLS .value : 20030, + ServiceNameEnum.QOSPROFILE .value : 20040, ServiceNameEnum.KPIMANAGER .value : 30010, ServiceNameEnum.KPIVALUEAPI .value : 30020, ServiceNameEnum.KPIVALUEWRITER .value : 30030, @@ -104,6 +109,7 @@ DEFAULT_SERVICE_GRPC_PORTS = { ServiceNameEnum.TELEMETRYBACKEND .value : 30060, ServiceNameEnum.ANALYTICSFRONTEND .value : 30080, ServiceNameEnum.ANALYTICSBACKEND .value : 30090, + ServiceNameEnum.AUTOMATION .value : 30200, # Used for test and debugging only ServiceNameEnum.DLT_GATEWAY .value : 50051, @@ -112,13 +118,12 @@ DEFAULT_SERVICE_GRPC_PORTS = { # Default HTTP/REST-API service ports DEFAULT_SERVICE_HTTP_PORTS = { - ServiceNameEnum.CONTEXT .value : 8080, - ServiceNameEnum.NBI .value : 8080, - ServiceNameEnum.WEBUI .value : 8004, + ServiceNameEnum.NBI .value : 8080, + ServiceNameEnum.WEBUI.value : 8004, } # Default HTTP/REST-API service base URLs DEFAULT_SERVICE_HTTP_BASEURLS = { - ServiceNameEnum.NBI .value : None, - ServiceNameEnum.WEBUI .value : None, + ServiceNameEnum.NBI .value : None, + ServiceNameEnum.WEBUI.value : None, } diff --git a/src/common/DeviceTypes.py b/src/common/DeviceTypes.py index 9ed321d5328aa17a856a3a6401bc35576eef679f..23ebe19d681bd0ba774c8f3f4435c233369d0e28 100644 --- a/src/common/DeviceTypes.py +++ b/src/common/DeviceTypes.py @@ -47,6 +47,7 @@ class DeviceTypeEnum(Enum): PACKET_ROUTER = 'packet-router' PACKET_SWITCH = 'packet-switch' XR_CONSTELLATION = 'xr-constellation' + QKD_NODE = 'qkd-node' # ETSI TeraFlowSDN controller TERAFLOWSDN_CONTROLLER = 'teraflowsdn' diff --git a/src/common/Settings.py b/src/common/Settings.py index eaeb363adc1d9eadb9ddb0487abef8a0885ce380..5845ee5221be69e5d5cf00b60d9376a7fd6fcec3 100644 --- a/src/common/Settings.py +++ b/src/common/Settings.py @@ -15,9 +15,11 @@ import logging, os, re, time from typing import Dict, List from common.Constants import ( - DEFAULT_GRPC_BIND_ADDRESS, DEFAULT_GRPC_GRACE_PERIOD, DEFAULT_GRPC_MAX_WORKERS, DEFAULT_HTTP_BIND_ADDRESS, - DEFAULT_LOG_LEVEL, DEFAULT_METRICS_PORT, DEFAULT_SERVICE_GRPC_PORTS, DEFAULT_SERVICE_HTTP_BASEURLS, - DEFAULT_SERVICE_HTTP_PORTS, ServiceNameEnum + DEFAULT_GRPC_BIND_ADDRESS, DEFAULT_GRPC_GRACE_PERIOD, + DEFAULT_GRPC_MAX_WORKERS, DEFAULT_HTTP_BIND_ADDRESS, + DEFAULT_LOG_LEVEL, DEFAULT_METRICS_PORT, DEFAULT_SERVICE_GRPC_PORTS, + DEFAULT_SERVICE_HTTP_BASEURLS, DEFAULT_SERVICE_HTTP_PORTS, + ServiceNameEnum ) LOGGER = logging.getLogger(__name__) @@ -79,12 +81,12 @@ def get_service_host(service_name : ServiceNameEnum): def get_service_port_grpc(service_name : ServiceNameEnum): envvar_name = get_env_var_name(service_name, ENVVAR_SUFIX_SERVICE_PORT_GRPC) default_value = DEFAULT_SERVICE_GRPC_PORTS.get(service_name.value) - return get_setting(envvar_name, default=default_value) + return int(get_setting(envvar_name, default=default_value)) def get_service_port_http(service_name : ServiceNameEnum): envvar_name = get_env_var_name(service_name, ENVVAR_SUFIX_SERVICE_PORT_HTTP) default_value = DEFAULT_SERVICE_HTTP_PORTS.get(service_name.value) - return get_setting(envvar_name, default=default_value) + return int(get_setting(envvar_name, default=default_value)) def get_service_baseurl_http(service_name : ServiceNameEnum): envvar_name = get_env_var_name(service_name, ENVVAR_SUFIX_SERVICE_BASEURL_HTTP) @@ -95,16 +97,34 @@ def get_log_level(): return get_setting(ENVVAR_LOG_LEVEL, default=DEFAULT_LOG_LEVEL) def get_metrics_port(): - return get_setting(ENVVAR_METRICS_PORT, default=DEFAULT_METRICS_PORT) + return int(get_setting(ENVVAR_METRICS_PORT, default=DEFAULT_METRICS_PORT)) def get_grpc_bind_address(): return get_setting(ENVVAR_GRPC_BIND_ADDRESS, default=DEFAULT_GRPC_BIND_ADDRESS) def get_grpc_max_workers(): - return get_setting(ENVVAR_GRPC_MAX_WORKERS, default=DEFAULT_GRPC_MAX_WORKERS) + return int(get_setting(ENVVAR_GRPC_MAX_WORKERS, default=DEFAULT_GRPC_MAX_WORKERS)) def get_grpc_grace_period(): - return get_setting(ENVVAR_GRPC_GRACE_PERIOD, default=DEFAULT_GRPC_GRACE_PERIOD) + return int(get_setting(ENVVAR_GRPC_GRACE_PERIOD, default=DEFAULT_GRPC_GRACE_PERIOD)) def get_http_bind_address(): return get_setting(ENVVAR_HTTP_BIND_ADDRESS, default=DEFAULT_HTTP_BIND_ADDRESS) + + +##### ----- Detect deployed microservices ----- ##### + +def is_microservice_deployed(service_name : ServiceNameEnum) -> bool: + host_env_var_name = get_env_var_name(service_name, ENVVAR_SUFIX_SERVICE_HOST ) + port_env_var_name = get_env_var_name(service_name, ENVVAR_SUFIX_SERVICE_PORT_GRPC) + return (host_env_var_name in os.environ) and (port_env_var_name in os.environ) + +def is_deployed_bgpls () -> bool: return is_microservice_deployed(ServiceNameEnum.BGPLS ) +def is_deployed_e2e_orch () -> bool: return is_microservice_deployed(ServiceNameEnum.E2EORCHESTRATOR ) +def is_deployed_forecaster() -> bool: return is_microservice_deployed(ServiceNameEnum.FORECASTER ) +def is_deployed_load_gen () -> bool: return is_microservice_deployed(ServiceNameEnum.LOAD_GENERATOR ) +def is_deployed_optical () -> bool: return is_microservice_deployed(ServiceNameEnum.OPTICALCONTROLLER) +def is_deployed_policy () -> bool: return is_microservice_deployed(ServiceNameEnum.POLICY ) +def is_deployed_qkd_app () -> bool: return is_microservice_deployed(ServiceNameEnum.QKD_APP ) +def is_deployed_slice () -> bool: return is_microservice_deployed(ServiceNameEnum.SLICE ) +def is_deployed_te () -> bool: return is_microservice_deployed(ServiceNameEnum.TE ) diff --git a/src/common/method_wrappers/Decorator.py b/src/common/method_wrappers/Decorator.py index 71b3999bf6e42c3cd9130747af2cdcbe2d9a570e..d86a769ef8f2ab120b42d0b12f93530e8c71c2a3 100644 --- a/src/common/method_wrappers/Decorator.py +++ b/src/common/method_wrappers/Decorator.py @@ -235,3 +235,35 @@ def safe_and_metered_rpc_method(metrics_pool : MetricsPool, logger : logging.Log grpc_context.abort(grpc.StatusCode.INTERNAL, str(e)) return inner_wrapper return outer_wrapper + +def safe_and_metered_rpc_method_async(metrics_pool: MetricsPool, logger: logging.Logger): + def outer_wrapper(func): + method_name = func.__name__ + metrics = metrics_pool.get_metrics(method_name) + histogram_duration, counter_started, counter_completed, counter_failed = metrics + + async def inner_wrapper(self, request, grpc_context: grpc.aio.ServicerContext): + counter_started.inc() + try: + logger.debug('{:s} request: {:s}'.format(method_name, grpc_message_to_json_string(request))) + reply = await func(self, request, grpc_context) + logger.debug('{:s} reply: {:s}'.format(method_name, grpc_message_to_json_string(reply))) + counter_completed.inc() + return reply + except ServiceException as e: # pragma: no cover (ServiceException not thrown) + if e.code not in [grpc.StatusCode.NOT_FOUND, grpc.StatusCode.ALREADY_EXISTS]: + # Assume not found or already exists is just a condition, not an error + logger.exception('{:s} exception'.format(method_name)) + counter_failed.inc() + else: + counter_completed.inc() + await grpc_context.abort(e.code, e.details) + except Exception as e: # pragma: no cover, pylint: disable=broad-except + logger.exception('{:s} exception'.format(method_name)) + counter_failed.inc() + await grpc_context.abort(grpc.StatusCode.INTERNAL, str(e)) + + return inner_wrapper + + return outer_wrapper + diff --git a/src/kpi_manager/database/Kpi_DB.py b/src/common/tools/database/GenericDatabase.py similarity index 58% rename from src/kpi_manager/database/Kpi_DB.py rename to src/common/tools/database/GenericDatabase.py index 49ad9c9b579daa918818366a1d9505089968edc2..0cd41b9ef0c97263b56a5eda67b173f6ba61a997 100644 --- a/src/kpi_manager/database/Kpi_DB.py +++ b/src/common/tools/database/GenericDatabase.py @@ -12,52 +12,54 @@ # See the License for the specific language governing permissions and # limitations under the License. + import logging import sqlalchemy_utils +from .GenericEngine import Engine +from sqlalchemy import inspect from sqlalchemy.orm import sessionmaker -from kpi_manager.database.KpiEngine import KpiEngine -from kpi_manager.database.KpiModel import Kpi as KpiModel -from common.method_wrappers.ServiceExceptions import ( - AlreadyExistsException, OperationFailedException , NotFoundException) +from common.Settings import get_setting + +from common.method_wrappers.ServiceExceptions import (OperationFailedException, AlreadyExistsException) LOGGER = logging.getLogger(__name__) -DB_NAME = "tfs_kpi_mgmt" -class KpiDB: - def __init__(self): - self.db_engine = KpiEngine.get_engine() +class Database: + def __init__(self, model): + self.db_engine = Engine.get_engine() if self.db_engine is None: LOGGER.error('Unable to get SQLAlchemy DB Engine...') - return False - self.db_name = DB_NAME - self.Session = sessionmaker(bind=self.db_engine) - - def create_database(self) -> None: + raise Exception('Failed to initialize the database engine.') + self.db_model = model + self.db_table = model.__name__ + self.Session = sessionmaker(bind=self.db_engine) + + def create_database(self): if not sqlalchemy_utils.database_exists(self.db_engine.url): - sqlalchemy_utils.create_database(self.db_engine.url) LOGGER.debug("Database created. {:}".format(self.db_engine.url)) + sqlalchemy_utils.create_database(self.db_engine.url) def drop_database(self) -> None: if sqlalchemy_utils.database_exists(self.db_engine.url): sqlalchemy_utils.drop_database(self.db_engine.url) def create_tables(self): - # TODO: use "get_tables(declatrative class obj)" method of "sqlalchemy_utils" to verify tables. try: - KpiModel.metadata.create_all(self.db_engine) # type: ignore - LOGGER.debug("Tables created in the DB Name: {:}".format(self.db_name)) + self.db_model.metadata.create_all(self.db_engine) + LOGGER.debug("Tables created in the database: {:}".format(self.db_table)) except Exception as e: - LOGGER.debug("Tables cannot be created in the kpi database. {:s}".format(str(e))) + LOGGER.debug("Tables cannot be created in the database. {:s}".format(str(e))) raise OperationFailedException ("Tables can't be created", extra_details=["unable to create table {:}".format(e)]) def verify_tables(self): try: - with self.db_engine.connect() as connection: - result = connection.execute("SHOW TABLES;") - tables = result.fetchall() # type: ignore - LOGGER.debug("Tables verified: {:}".format(tables)) + inspect_object = inspect(self.db_engine) + if(inspect_object.has_table(self.db_table , None)): + LOGGER.info("Table exists in DB: {:}".format(self.db_name)) except Exception as e: - LOGGER.debug("Unable to fetch Table names. {:s}".format(str(e))) + LOGGER.info("Unable to fetch Table names. {:s}".format(str(e))) + +# ----------------- DB OPERATIONS --------------------- def add_row_to_db(self, row): session = self.Session() @@ -70,7 +72,8 @@ class KpiDB: session.rollback() if "psycopg2.errors.UniqueViolation" in str(e): LOGGER.error(f"Unique key voilation: {row.__class__.__name__} table. {str(e)}") - raise AlreadyExistsException(row.__class__.__name__, row, extra_details=["Unique key voilation: {:}".format(e)] ) + raise AlreadyExistsException(row.__class__.__name__, row, + extra_details=["Unique key voilation: {:}".format(e)] ) else: LOGGER.error(f"Failed to insert new row into {row.__class__.__name__} table. {str(e)}") raise OperationFailedException ("Deletion by column id", extra_details=["unable to delete row {:}".format(e)]) @@ -89,6 +92,7 @@ class KpiDB: print("{:} ID not found, No matching row: {:}".format(model.__name__, id_to_search)) return None except Exception as e: + session.rollback() LOGGER.debug(f"Failed to retrieve {model.__name__} ID. {str(e)}") raise OperationFailedException ("search by column id", extra_details=["unable to search row {:}".format(e)]) finally: @@ -112,43 +116,24 @@ class KpiDB: finally: session.close() - def select_with_filter(self, model, filter_object): - session = self.Session() + def select_with_filter(self, query_object, session, model): + """ + Generic method to apply filters dynamically based on filter. + params: model_name: SQLAlchemy model class name. + query_object : Object that contains query with applied filters. + session: session of the query. + return: List of filtered records. + """ try: - query = session.query(KpiModel) - # Apply filters based on the filter_object - if filter_object.kpi_id: - query = query.filter(KpiModel.kpi_id.in_([k.kpi_id.uuid for k in filter_object.kpi_id])) - - if filter_object.kpi_sample_type: - query = query.filter(KpiModel.kpi_sample_type.in_(filter_object.kpi_sample_type)) - - if filter_object.device_id: - query = query.filter(KpiModel.device_id.in_([d.device_uuid.uuid for d in filter_object.device_id])) - - if filter_object.endpoint_id: - query = query.filter(KpiModel.endpoint_id.in_([e.endpoint_uuid.uuid for e in filter_object.endpoint_id])) - - if filter_object.service_id: - query = query.filter(KpiModel.service_id.in_([s.service_uuid.uuid for s in filter_object.service_id])) - - if filter_object.slice_id: - query = query.filter(KpiModel.slice_id.in_([s.slice_uuid.uuid for s in filter_object.slice_id])) - - if filter_object.connection_id: - query = query.filter(KpiModel.connection_id.in_([c.connection_uuid.uuid for c in filter_object.connection_id])) - - if filter_object.link_id: - query = query.filter(KpiModel.link_id.in_([l.link_uuid.uuid for l in filter_object.link_id])) - result = query.all() - + result = query_object.all() + # Log result and handle empty case if result: - LOGGER.debug(f"Fetched filtered rows from {model.__name__} table with filters: {filter_object}") # - Results: {result} + LOGGER.debug(f"Fetched filtered rows from {model.__name__} with filters: {query_object}") else: - LOGGER.debug(f"No matching row found in {model.__name__} table with filters: {filter_object}") + LOGGER.warning(f"No matching rows found in {model.__name__} with filters: {query_object}") return result except Exception as e: - LOGGER.error(f"Error fetching filtered rows from {model.__name__} table with filters {filter_object} ::: {e}") - raise OperationFailedException ("Select by filter", extra_details=["unable to apply the filter {:}".format(e)]) + LOGGER.error(f"Error fetching filtered rows from {model.__name__} with filters {query_object} ::: {e}") + raise OperationFailedException("Select by filter", extra_details=[f"Unable to apply the filter: {e}"]) finally: session.close() diff --git a/src/analytics/database/AnalyzerEngine.py b/src/common/tools/database/GenericEngine.py similarity index 92% rename from src/analytics/database/AnalyzerEngine.py rename to src/common/tools/database/GenericEngine.py index 9294e09966ef9e13c9cfa3cab590e5d0c8b6a80e..18bb15360853524ed93606f3137972aa76aa850a 100644 --- a/src/analytics/database/AnalyzerEngine.py +++ b/src/common/tools/database/GenericEngine.py @@ -18,14 +18,14 @@ from common.Settings import get_setting LOGGER = logging.getLogger(__name__) CRDB_URI_TEMPLATE = 'cockroachdb://{:s}:{:s}@cockroachdb-public.{:s}.svc.cluster.local:{:s}/{:s}?sslmode={:s}' -class AnalyzerEngine: +class Engine: @staticmethod def get_engine() -> sqlalchemy.engine.Engine: crdb_uri = get_setting('CRDB_URI', default=None) if crdb_uri is None: CRDB_NAMESPACE = get_setting('CRDB_NAMESPACE') CRDB_SQL_PORT = get_setting('CRDB_SQL_PORT') - CRDB_DATABASE = "tfs-analyzer" # TODO: define variable get_setting('CRDB_DATABASE_KPI_MGMT') + CRDB_DATABASE = get_setting('CRDB_DATABASE') CRDB_USERNAME = get_setting('CRDB_USERNAME') CRDB_PASSWORD = get_setting('CRDB_PASSWORD') CRDB_SSLMODE = get_setting('CRDB_SSLMODE') diff --git a/src/common/tools/database/__init__.py b/src/common/tools/database/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 --- /dev/null +++ b/src/common/tools/database/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/src/common/tools/descriptor/Loader.py b/src/common/tools/descriptor/Loader.py index f2f54bbd70eae2722f29e254495dddedadf2617b..2fcc5b63a66ae3c3e96ab774d34958a110f0454a 100644 --- a/src/common/tools/descriptor/Loader.py +++ b/src/common/tools/descriptor/Loader.py @@ -33,20 +33,25 @@ # # do test ... # descriptor_loader.unload() -import concurrent.futures, json, logging, operator +import concurrent.futures, copy, json, logging, operator from typing import Any, Dict, List, Optional, Tuple, Union from common.proto.context_pb2 import ( - Connection, Context, ContextId, Device, DeviceId, Empty, Link, LinkId, Service, ServiceId, Slice, SliceId, - Topology, TopologyId) + Connection, Context, ContextId, Device, DeviceId, Empty, + Link, LinkId, Service, ServiceId, Slice, SliceId, + Topology, TopologyId +) from common.tools.object_factory.Context import json_context_id from context.client.ContextClient import ContextClient from device.client.DeviceClient import DeviceClient from service.client.ServiceClient import ServiceClient from slice.client.SliceClient import SliceClient from .Tools import ( - format_device_custom_config_rules, format_service_custom_config_rules, format_slice_custom_config_rules, - get_descriptors_add_contexts, get_descriptors_add_services, get_descriptors_add_slices, - get_descriptors_add_topologies, split_controllers_and_network_devices, split_devices_by_rules) + format_device_custom_config_rules, format_service_custom_config_rules, + format_slice_custom_config_rules, get_descriptors_add_contexts, + get_descriptors_add_services, get_descriptors_add_slices, + get_descriptors_add_topologies, split_controllers_and_network_devices, + split_devices_by_rules +) LOGGER = logging.getLogger(__name__) LOGGERS = { @@ -78,6 +83,30 @@ TypeResults = List[Tuple[str, str, int, List[str]]] # entity_name, action, num_o TypeNotification = Tuple[str, str] # message, level TypeNotificationList = List[TypeNotification] +SLICE_TEMPLATE = { + "slice_id": { + "context_id": {"context_uuid": {"uuid": "admin"}}, + "slice_uuid": {"uuid": None} + }, + "name": {}, + "slice_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "/settings", "resource_value": { + "address_families": ["IPV4"], "bgp_as": 65000, + "bgp_route_target": "65000:333", "mtu": 1512 + }}} + ]}, + "slice_constraints": [ + {"sla_capacity": {"capacity_gbps": 20.0}}, + {"sla_availability": {"availability": 20.0, "num_disjoint_paths": 1, "all_active": True}}, + {"sla_isolation": {"isolation_level": [0]}} + ], + "slice_endpoint_ids": [ + + ], + "slice_status": {"slice_status": 1} +} + + class DescriptorLoader: def __init__( self, descriptors : Optional[Union[str, Dict]] = None, descriptors_file : Optional[str] = None, @@ -106,8 +135,53 @@ class DescriptorLoader: self.__links = self.__descriptors.get('links' , []) self.__services = self.__descriptors.get('services' , []) self.__slices = self.__descriptors.get('slices' , []) + self.__ietf_slices = self.__descriptors.get('ietf-network-slice-service:network-slice-services', {}) self.__connections = self.__descriptors.get('connections', []) + if len(self.__ietf_slices) > 0: + for slice_service in self.__ietf_slices["slice-service"]: + tfs_slice = copy.deepcopy(SLICE_TEMPLATE) + tfs_slice["slice_id"]["slice_uuid"]["uuid"] = slice_service["id"] + tfs_slice["name"] = slice_service["description"] + for sdp in slice_service["sdps"]["sdp"]: + sdp_id = sdp["id"] + for attcircuit in sdp["attachment-circuits"]["attachment-circuit"]: + att_cir_tp_id = attcircuit["ac-tp-id"] + RESOURCE_KEY = "/device[{:s}]/endpoint[{:s}]/settings" + resource_key = RESOURCE_KEY.format(str(sdp_id), str(att_cir_tp_id)) + + for tag in attcircuit['ac-tags']['ac-tag']: + if tag.get('tag-type') == 'ietf-nss:vlan-id': + vlan_id = tag.get('value') + else: + vlan_id = 0 + + tfs_slice["slice_config"]["config_rules"].append({ + "action": 1, "custom": { + "resource_key": resource_key, "resource_value": { + "router_id": sdp.get("node-id",[]), + "sub_interface_index": 0, + "vlan_id": vlan_id + } + } + }) + tfs_slice["slice_endpoint_ids"].append({ + "device_id": {"device_uuid": {"uuid": sdp_id}}, + "endpoint_uuid": {"uuid": att_cir_tp_id}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, + "topology_uuid": {"uuid": "admin"}} + }) + #tfs_slice["slice_constraints"].append({ + # "endpoint_location": { + # "endpoint_id": { + # "device_id": {"device_uuid": {"uuid": sdp["id"]}}, + # "endpoint_uuid": {"uuid": attcircuit["ac-tp-id"]} + # }, + # "location": {"region": "4"} + # } + #}) + self.__slices.append(tfs_slice) + self.__contexts_add = None self.__topologies_add = None self.__devices_add = None @@ -232,7 +306,9 @@ class DescriptorLoader: def _load_dummy_mode(self) -> None: # Dummy Mode: used to pre-load databases (WebUI debugging purposes) with no smart or automated tasks. + controllers, network_devices = split_controllers_and_network_devices(self.__devices) + self.__ctx_cli.connect() self._process_descr('context', 'add', self.__ctx_cli.SetContext, Context, self.__contexts_add ) self._process_descr('topology', 'add', self.__ctx_cli.SetTopology, Topology, self.__topologies_add) diff --git a/src/common/tools/kafka/Variables.py b/src/common/tools/kafka/Variables.py index fc43c315114e7b51c4e2604afbb14e165796e7c5..8ff6447f7784fd9e6846c1b73bc176b0a49f25e1 100644 --- a/src/common/tools/kafka/Variables.py +++ b/src/common/tools/kafka/Variables.py @@ -25,11 +25,11 @@ class KafkaConfig(Enum): @staticmethod def get_kafka_address() -> str: - # kafka_server_address = get_setting('KFK_SERVER_ADDRESS', default=None) - # if kafka_server_address is None: - KFK_NAMESPACE = get_setting('KFK_NAMESPACE') - KFK_PORT = get_setting('KFK_SERVER_PORT') - kafka_server_address = KFK_SERVER_ADDRESS_TEMPLATE.format(KFK_NAMESPACE, KFK_PORT) + kafka_server_address = get_setting('KFK_SERVER_ADDRESS', default=None) + if kafka_server_address is None: + KFK_NAMESPACE = get_setting('KFK_NAMESPACE') + KFK_PORT = get_setting('KFK_SERVER_PORT') + kafka_server_address = KFK_SERVER_ADDRESS_TEMPLATE.format(KFK_NAMESPACE, KFK_PORT) return kafka_server_address @staticmethod @@ -46,6 +46,7 @@ class KafkaTopic(Enum): RAW = 'topic_raw' LABELED = 'topic_labeled' VALUE = 'topic_value' + ALARMS = 'topic_alarms' ANALYTICS_REQUEST = 'topic_request_analytics' ANALYTICS_RESPONSE = 'topic_response_analytics' @@ -89,4 +90,4 @@ class KafkaTopic(Enum): return False return True -# create all topics after the deployments (Telemetry and Analytics) +# TODO: create all topics after the deployments (Telemetry and Analytics) diff --git a/src/common/tools/object_factory/QKDApp.py b/src/common/tools/object_factory/QKDApp.py new file mode 100644 index 0000000000000000000000000000000000000000..936a0f228302469ec51321623f8d8050f3daced0 --- /dev/null +++ b/src/common/tools/object_factory/QKDApp.py @@ -0,0 +1,24 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import copy +from typing import Dict, List, Optional +from common.Constants import DEFAULT_CONTEXT_NAME +from common.tools.object_factory.Context import json_context_id + + +def json_app_id(app_uuid : str, context_id : Optional[Dict] = None) -> Dict: + result = {'app_uuid': {'uuid': app_uuid}} + if context_id is not None: result['context_id'] = copy.deepcopy(context_id) + return result diff --git a/src/common/tools/object_factory/Service.py b/src/common/tools/object_factory/Service.py index 32b99a31f22072874ab894de2a87ce2b7d56ba85..b05821c7814ce250abca1819b111376af7c0430f 100644 --- a/src/common/tools/object_factory/Service.py +++ b/src/common/tools/object_factory/Service.py @@ -42,6 +42,16 @@ def json_service( 'service_config' : {'config_rules': copy.deepcopy(config_rules)}, } +def json_service_qkd_planned( + service_uuid : str, endpoint_ids : List[Dict] = [], constraints : List[Dict] = [], + config_rules : List[Dict] = [], context_uuid : str = DEFAULT_CONTEXT_NAME + ): + + return json_service( + service_uuid, ServiceTypeEnum.SERVICETYPE_QKD, context_id=json_context_id(context_uuid), + status=ServiceStatusEnum.SERVICESTATUS_PLANNED, endpoint_ids=endpoint_ids, constraints=constraints, + config_rules=config_rules) + def json_service_l2nm_planned( service_uuid : str, endpoint_ids : List[Dict] = [], constraints : List[Dict] = [], config_rules : List[Dict] = [], context_uuid : str = DEFAULT_CONTEXT_NAME diff --git a/src/common/tools/service/GenericGrpcServiceAsync.py b/src/common/tools/service/GenericGrpcServiceAsync.py new file mode 100644 index 0000000000000000000000000000000000000000..488d861777ee7200fc4331449f21dded6b2f6dac --- /dev/null +++ b/src/common/tools/service/GenericGrpcServiceAsync.py @@ -0,0 +1,72 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Optional, Union +import grpc +import logging +from concurrent import futures +from grpc_health.v1.health import HealthServicer, OVERALL_HEALTH +from grpc_health.v1.health_pb2 import HealthCheckResponse +from grpc_health.v1.health_pb2_grpc import add_HealthServicer_to_server +from common.Settings import get_grpc_bind_address, get_grpc_grace_period, get_grpc_max_workers + +class GenericGrpcServiceAsync: + def __init__( + self, bind_port: Union[str, int], bind_address: Optional[str] = None, max_workers: Optional[int] = None, + grace_period: Optional[int] = None, enable_health_servicer: bool = True, cls_name: str = __name__ + ) -> None: + self.logger = logging.getLogger(cls_name) + self.bind_port = bind_port + self.bind_address = get_grpc_bind_address() if bind_address is None else bind_address + self.max_workers = get_grpc_max_workers() if max_workers is None else max_workers + self.grace_period = get_grpc_grace_period() if grace_period is None else grace_period + self.enable_health_servicer = enable_health_servicer + self.endpoint = None + self.health_servicer = None + self.pool = None + self.server = None + + async def install_servicers(self): + pass + + async def start(self): + self.endpoint = '{:s}:{:s}'.format(str(self.bind_address), str(self.bind_port)) + self.logger.info('Starting Service (tentative endpoint: {:s}, max_workers: {:s})...'.format( + str(self.endpoint), str(self.max_workers))) + + self.pool = futures.ThreadPoolExecutor(max_workers=self.max_workers) + self.server = grpc.aio.server(self.pool) + + await self.install_servicers() # Ensure this is awaited + + if self.enable_health_servicer: + self.health_servicer = HealthServicer( + experimental_non_blocking=True, experimental_thread_pool=futures.ThreadPoolExecutor(max_workers=1)) + add_HealthServicer_to_server(self.health_servicer, self.server) + + self.bind_port = self.server.add_insecure_port(self.endpoint) + self.endpoint = '{:s}:{:s}'.format(str(self.bind_address), str(self.bind_port)) + self.logger.info('Listening on {:s}...'.format(str(self.endpoint))) + await self.server.start() + if self.enable_health_servicer: + self.health_servicer.set(OVERALL_HEALTH, HealthCheckResponse.SERVING) + + self.logger.debug('Service started') + + async def stop(self): + self.logger.debug('Stopping service (grace period {:s} seconds)...'.format(str(self.grace_period))) + if self.enable_health_servicer: + self.health_servicer.enter_graceful_shutdown() + await self.server.stop(self.grace_period) + self.logger.debug('Service stopped') diff --git a/src/context/.gitlab-ci.yml b/src/context/.gitlab-ci.yml index c1caed6679e9c24599f1992e49eb0874e81bea49..f0558a2d22e0baf70768227b7728d4ff4ca23060 100644 --- a/src/context/.gitlab-ci.yml +++ b/src/context/.gitlab-ci.yml @@ -112,9 +112,9 @@ unit_test context: - manifests/${IMAGE_NAME}service.yaml - .gitlab-ci.yml artifacts: - when: always - reports: - junit: src/$IMAGE_NAME/tests/${IMAGE_NAME}_report.xml + when: always + reports: + junit: src/$IMAGE_NAME/tests/${IMAGE_NAME}_report.xml ## Deployment of the service in Kubernetes Cluster #deploy context: diff --git a/src/context/service/database/Constraint.py b/src/context/service/database/Constraint.py index db96ed9dece96cd5b77412c5d031e7337e360668..0b042219273f4a58e0bfc857ea2df6a3422d94cb 100644 --- a/src/context/service/database/Constraint.py +++ b/src/context/service/database/Constraint.py @@ -69,7 +69,8 @@ def compose_constraints_data( constraint_name = '{:s}:{:s}:{:s}'.format(parent_kind, kind.value, endpoint_uuid) elif kind in { ConstraintKindEnum.SCHEDULE, ConstraintKindEnum.SLA_CAPACITY, ConstraintKindEnum.SLA_LATENCY, - ConstraintKindEnum.SLA_AVAILABILITY, ConstraintKindEnum.SLA_ISOLATION, ConstraintKindEnum.EXCLUSIONS + ConstraintKindEnum.SLA_AVAILABILITY, ConstraintKindEnum.SLA_ISOLATION, ConstraintKindEnum.EXCLUSIONS, + ConstraintKindEnum.QOS_PROFILE }: constraint_name = '{:s}:{:s}:'.format(parent_kind, kind.value) else: diff --git a/src/context/service/database/models/ConstraintModel.py b/src/context/service/database/models/ConstraintModel.py index fc56a1145983776f1604a8cc6a6b36cbd12370b3..3eef030fccccbe4e4806f12188161bf97018c5f5 100644 --- a/src/context/service/database/models/ConstraintModel.py +++ b/src/context/service/database/models/ConstraintModel.py @@ -31,6 +31,7 @@ class ConstraintKindEnum(enum.Enum): SLA_LATENCY = 'sla_latency' SLA_AVAILABILITY = 'sla_availability' SLA_ISOLATION = 'sla_isolation' + QOS_PROFILE = 'qos_profile' EXCLUSIONS = 'exclusions' class ServiceConstraintModel(_Base): diff --git a/src/context/service/database/models/enums/DeviceDriver.py b/src/context/service/database/models/enums/DeviceDriver.py index 06d73177036d8bfe8b6f72d6c97b03f78aaf7531..cf900ed6df3b4699a4e56f53873174ddd997cd53 100644 --- a/src/context/service/database/models/enums/DeviceDriver.py +++ b/src/context/service/database/models/enums/DeviceDriver.py @@ -34,6 +34,7 @@ class ORM_DeviceDriverEnum(enum.Enum): OPTICAL_TFS = DeviceDriverEnum.DEVICEDRIVER_OPTICAL_TFS IETF_ACTN = DeviceDriverEnum.DEVICEDRIVER_IETF_ACTN OC = DeviceDriverEnum.DEVICEDRIVER_OC + QKD = DeviceDriverEnum.DEVICEDRIVER_QKD grpc_to_enum__device_driver = functools.partial( grpc_to_enum, DeviceDriverEnum, ORM_DeviceDriverEnum) diff --git a/src/context/service/database/models/enums/ServiceType.py b/src/context/service/database/models/enums/ServiceType.py index 62d5380b56803b3cc21dd1456292ec9df470cb15..cd6819999a585b541ef716fa481910ae3b53ecbf 100644 --- a/src/context/service/database/models/enums/ServiceType.py +++ b/src/context/service/database/models/enums/ServiceType.py @@ -29,6 +29,7 @@ class ORM_ServiceTypeEnum(enum.Enum): TE = ServiceTypeEnum.SERVICETYPE_TE E2E = ServiceTypeEnum.SERVICETYPE_E2E OPTICAL_CONNECTIVITY = ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY + QKD = ServiceTypeEnum.SERVICETYPE_QKD grpc_to_enum__service_type = functools.partial( grpc_to_enum, ServiceTypeEnum, ORM_ServiceTypeEnum) diff --git a/src/context/tests/conftest.py b/src/context/tests/conftest.py index 905c87c3179aec400e35d12c4d0c5ddbcc21529f..108814c58c7d1f641c3fbcd5dc13a7c7f7159f48 100644 --- a/src/context/tests/conftest.py +++ b/src/context/tests/conftest.py @@ -18,8 +18,9 @@ from _pytest.terminal import TerminalReporter from typing import Tuple from common.Constants import ServiceNameEnum from common.Settings import ( - ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, ENVVAR_SUFIX_SERVICE_PORT_HTTP, get_env_var_name, - get_service_port_grpc, get_service_port_http) + ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, + get_env_var_name, get_service_port_grpc +) from common.message_broker.Factory import get_messagebroker_backend from common.message_broker.MessageBroker import MessageBroker from common.method_wrappers.Decorator import MetricsPool @@ -30,11 +31,9 @@ from context.service.database.models._Base import rebuild_database LOCAL_HOST = '127.0.0.1' GRPC_PORT = 10000 + int(get_service_port_grpc(ServiceNameEnum.CONTEXT)) # avoid privileged ports -HTTP_PORT = 10000 + int(get_service_port_http(ServiceNameEnum.CONTEXT)) # avoid privileged ports os.environ[get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST) os.environ[get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(GRPC_PORT) -os.environ[get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_PORT_HTTP)] = str(HTTP_PORT) @pytest.fixture(scope='session') def context_db_mb(request) -> Tuple[sqlalchemy.engine.Engine, MessageBroker]: # pylint: disable=unused-argument diff --git a/src/device/.gitlab-ci.yml b/src/device/.gitlab-ci.yml index 9106c96a8bed2cea406dd150fe656927311958cf..3ae6b2b20d22d0a91d10b61acd20fd0d2d4a28ac 100644 --- a/src/device/.gitlab-ci.yml +++ b/src/device/.gitlab-ci.yml @@ -38,6 +38,30 @@ build device: - manifests/${IMAGE_NAME}service.yaml - .gitlab-ci.yml +## Start Mock QKD Nodes before unit testing +#start_mock_nodes: +# stage: deploy +# script: +# - bash src/tests/tools/mock_qkd_nodes/start.sh & +# - sleep 10 # wait for nodes to spin up +# artifacts: +# paths: +# - mock_nodes.log +# rules: +# - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' +# - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' + +## Prepare Scenario (Start NBI, mock services) +#prepare_scenario: +# stage: deploy +# script: +# - pytest src/tests/qkd/unit/PrepareScenario.py +# needs: +# - start_mock_nodes +# rules: +# - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' +# - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' + # Apply unit test to the component unit_test device: variables: @@ -46,6 +70,8 @@ unit_test device: stage: unit_test needs: - build device + #- start_mock_nodes + #- prepare_scenario before_script: - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - > @@ -68,6 +94,7 @@ unit_test device: - docker logs $IMAGE_NAME - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_unitary_emulated.py --junitxml=/opt/results/${IMAGE_NAME}_report_emulated.xml" - docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_unitary_ietf_actn.py --junitxml=/opt/results/${IMAGE_NAME}_report_ietf_actn.xml" + #- docker exec -i $IMAGE_NAME bash -c "coverage run --append -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/qkd/unit/test_*.py" - docker exec -i $IMAGE_NAME bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing" coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' after_script: diff --git a/src/device/service/drivers/__init__.py b/src/device/service/drivers/__init__.py index cb6158b965a21c974605a27582340620f368bdb9..a5e7f377113342b98203a23a426540f6188f784e 100644 --- a/src/device/service/drivers/__init__.py +++ b/src/device/service/drivers/__init__.py @@ -178,3 +178,14 @@ if LOAD_ALL_DEVICE_DRIVERS: FilterFieldEnum.DRIVER : DeviceDriverEnum.DEVICEDRIVER_OC, } ])) + +if LOAD_ALL_DEVICE_DRIVERS: + from .qkd.QKDDriver2 import QKDDriver # pylint: disable=wrong-import-position + DRIVERS.append( + (QKDDriver, [ + { + # Close enough, it does optical switching + FilterFieldEnum.DEVICE_TYPE: DeviceTypeEnum.QKD_NODE, + FilterFieldEnum.DRIVER : DeviceDriverEnum.DEVICEDRIVER_QKD, + } + ])) diff --git a/src/device/service/drivers/qkd/QKDDriver.py b/src/device/service/drivers/qkd/QKDDriver.py new file mode 100644 index 0000000000000000000000000000000000000000..a49144d6fc0840498c5f5f1267d1cef25cb1177a --- /dev/null +++ b/src/device/service/drivers/qkd/QKDDriver.py @@ -0,0 +1,168 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import json, logging, requests, threading +from requests.auth import HTTPBasicAuth +from typing import Any, Iterator, List, Optional, Tuple, Union +from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method +from common.type_checkers.Checkers import chk_string, chk_type +from device.service.driver_api._Driver import _Driver +from . import ALL_RESOURCE_KEYS +from .Tools import find_key, config_getter, create_connectivity_link + +LOGGER = logging.getLogger(__name__) + +DRIVER_NAME = 'qkd' +METRICS_POOL = MetricsPool('Device', 'Driver', labels={'driver': DRIVER_NAME}) + + +class QKDDriver(_Driver): + def __init__(self, address: str, port: int, **settings) -> None: + super().__init__(DRIVER_NAME, address, port, **settings) + self.__lock = threading.Lock() + self.__started = threading.Event() + self.__terminate = threading.Event() + username = self.settings.get('username') + password = self.settings.get('password') + self.__auth = HTTPBasicAuth(username, password) if username is not None and password is not None else None + scheme = self.settings.get('scheme', 'http') + self.__qkd_root = '{:s}://{:s}:{:d}'.format(scheme, self.address, int(self.port)) + self.__timeout = int(self.settings.get('timeout', 120)) + self.__node_ids = set(self.settings.get('node_ids', [])) + token = self.settings.get('token') + self.__headers = {'Authorization': 'Bearer ' + token} + self.__initial_data = None + + def Connect(self) -> bool: + url = self.__qkd_root + '/restconf/data/etsi-qkd-sdn-node:qkd_node' + with self.__lock: + if self.__started.is_set(): return True + r = None + try: + LOGGER.info(f'requests.get("{url}", timeout={self.__timeout}, verify=False, auth={self.__auth}, headers={self.__headers})') + r = requests.get(url, timeout=self.__timeout, verify=False, auth=self.__auth, headers=self.__headers) + LOGGER.info(f'R: {r}') + LOGGER.info(f'Text: {r.text}') + LOGGER.info(f'Json: {r.json()}') + except requests.exceptions.Timeout: + LOGGER.exception('Timeout connecting {:s}'.format(str(self.__qkd_root))) + return False + except Exception: # pylint: disable=broad-except + LOGGER.exception('Exception connecting {:s}'.format(str(self.__qkd_root))) + return False + else: + self.__started.set() + self.__initial_data = r.json() + return True + + def Disconnect(self) -> bool: + with self.__lock: + self.__terminate.set() + return True + + @metered_subclass_method(METRICS_POOL) + def GetInitialConfig(self) -> List[Tuple[str, Any]]: + with self.__lock: + return self.__initial_data + + @metered_subclass_method(METRICS_POOL) + def GetConfig(self, resource_keys : List[str] = []) -> List[Tuple[str, Union[Any, None, Exception]]]: + chk_type('resources', resource_keys, list) + results = [] + with self.__lock: + if len(resource_keys) == 0: resource_keys = ALL_RESOURCE_KEYS + for i, resource_key in enumerate(resource_keys): + str_resource_name = 'resource_key[#{:d}]'.format(i) + chk_string(str_resource_name, resource_key, allow_empty=False) + results.extend(config_getter( + self.__qkd_root, resource_key, timeout=self.__timeout, auth=self.__auth, + node_ids=self.__node_ids, headers=self.__headers)) + return results + + + @metered_subclass_method(METRICS_POOL) + def SetConfig(self, resources: List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + results = [] + if len(resources) == 0: + return results + with self.__lock: + for resource_key, resource_value in resources: + LOGGER.info('resource = {:s}'.format(str(resource_key))) + + if resource_key.startswith('/link'): + try: + resource_value = json.loads(resource_value) + link_uuid = resource_value['uuid'] + + node_id_src = resource_value['src_qkdn_id'] + interface_id_src = resource_value['src_interface_id'] + node_id_dst = resource_value['dst_qkdn_id'] + interface_id_dst = resource_value['dst_interface_id'] + virt_prev_hop = resource_value.get('virt_prev_hop') + virt_next_hops = resource_value.get('virt_next_hops') + virt_bandwidth = resource_value.get('virt_bandwidth') + + + data = create_connectivity_link( + self.__qkd_root, link_uuid, node_id_src, interface_id_src, node_id_dst, interface_id_dst, + virt_prev_hop, virt_next_hops, virt_bandwidth, + timeout=self.__timeout, auth=self.__auth, headers=self.__headers + ) + + #data = create_connectivity_link( + # self.__qkd_root, link_uuid, node_id_src, interface_id_src, node_id_dst, interface_id_dst, + # timeout=self.__timeout, auth=self.__auth + #) + results.append(True) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Unhandled error processing resource_key({:s})'.format(str(resource_key))) + results.append(e) + else: + results.append(True) + + LOGGER.info('Test keys: ' + str([x for x,y in resources])) + LOGGER.info('Test values: ' + str(results)) + return results + + ''' + @metered_subclass_method(METRICS_POOL) + def DeleteConfig(self, resources: List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + results = [] + if len(resources) == 0: return results + with self.__lock: + for resource in resources: + LOGGER.info('resource = {:s}'.format(str(resource))) + uuid = find_key(resource, 'uuid') + results.extend(delete_connectivity_service( + self.__qkd_root, uuid, timeout=self.__timeout, auth=self.__auth)) + return results + ''' + + @metered_subclass_method(METRICS_POOL) + def SubscribeState(self, subscriptions : List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: + # TODO: QKD API Driver does not support monitoring by now + LOGGER.info(f'Subscribe {self.address}: {subscriptions}') + return [True for _ in subscriptions] + + @metered_subclass_method(METRICS_POOL) + def UnsubscribeState(self, subscriptions : List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: + # TODO: QKD API Driver does not support monitoring by now + return [False for _ in subscriptions] + + def GetState( + self, blocking=False, terminate : Optional[threading.Event] = None + ) -> Iterator[Tuple[float, str, Any]]: + # TODO: QKD API Driver does not support monitoring by now + LOGGER.info(f'GetState {self.address} called') + return [] diff --git a/src/device/service/drivers/qkd/QKDDriver2.py b/src/device/service/drivers/qkd/QKDDriver2.py new file mode 100644 index 0000000000000000000000000000000000000000..c73a83141d92955d01a6a00912389b671fe7ef98 --- /dev/null +++ b/src/device/service/drivers/qkd/QKDDriver2.py @@ -0,0 +1,216 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import os +import json +import logging +import requests +import threading +from requests.auth import HTTPBasicAuth +from typing import Any, List, Optional, Tuple, Union +from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method +from common.type_checkers.Checkers import chk_string, chk_type +from device.service.driver_api._Driver import _Driver +from .Tools2 import config_getter, create_connectivity_link +from device.service.driver_api._Driver import _Driver +from . import ALL_RESOURCE_KEYS + +LOGGER = logging.getLogger(__name__) + +DRIVER_NAME = 'qkd' +METRICS_POOL = MetricsPool('Device', 'Driver', labels={'driver': DRIVER_NAME}) + + +class QKDDriver(_Driver): + def __init__(self, address: str, port: int, **settings) -> None: + LOGGER.info(f"Initializing QKDDriver with address={address}, port={port}, settings={settings}") + super().__init__(DRIVER_NAME, address, port, **settings) + self.__lock = threading.Lock() + self.__started = threading.Event() + self.__terminate = threading.Event() + self.__auth = None + self.__headers = {} + self.__qkd_root = os.getenv('QKD_API_URL', f"http://{self.address}:{self.port}") # Simplified URL management + self.__timeout = int(self.settings.get('timeout', 120)) + self.__node_ids = set(self.settings.get('node_ids', [])) + self.__initial_data = None + + # Optionally pass headers for authentication (e.g., JWT) + self.__headers = settings.get('headers', {}) + self.__auth = settings.get('auth', None) + + LOGGER.info(f"QKDDriver initialized with QKD root URL: {self.__qkd_root}") + + def Connect(self) -> bool: + url = self.__qkd_root + '/restconf/data/etsi-qkd-sdn-node:qkd_node' + with self.__lock: + LOGGER.info(f"Starting connection to {url}") + if self.__started.is_set(): + LOGGER.info("Already connected, skipping re-connection.") + return True + + try: + LOGGER.info(f'Attempting to connect to {url} with headers {self.__headers} and timeout {self.__timeout}') + response = requests.get(url, timeout=self.__timeout, verify=False, headers=self.__headers, auth=self.__auth) + LOGGER.info(f'Received response: {response.status_code}, content: {response.text}') + response.raise_for_status() + self.__initial_data = response.json() + self.__started.set() + LOGGER.info('Connection successful') + return True + except requests.exceptions.RequestException as e: + LOGGER.error(f'Connection failed: {e}') + return False + + def Disconnect(self) -> bool: + LOGGER.info("Disconnecting QKDDriver") + with self.__lock: + self.__terminate.set() + LOGGER.info("QKDDriver disconnected successfully") + return True + + @metered_subclass_method(METRICS_POOL) + def GetInitialConfig(self) -> List[Tuple[str, Any]]: + LOGGER.info("Getting initial configuration") + with self.__lock: + if isinstance(self.__initial_data, dict): + initial_config = [('qkd_node', self.__initial_data.get('qkd_node', {}))] + LOGGER.info(f"Initial configuration: {initial_config}") + return initial_config + LOGGER.warning("Initial data is not a dictionary") + return [] + + @metered_subclass_method(METRICS_POOL) + def GetConfig(self, resource_keys: List[str] = []) -> List[Tuple[str, Union[Any, None, Exception]]]: + chk_type('resources', resource_keys, list) + LOGGER.info(f"Getting configuration for resource_keys: {resource_keys}") + results = [] + with self.__lock: + if not resource_keys: + resource_keys = ALL_RESOURCE_KEYS + for i, resource_key in enumerate(resource_keys): + chk_string(f'resource_key[{i}]', resource_key, allow_empty=False) + LOGGER.info(f"Retrieving resource key: {resource_key}") + resource_results = config_getter( + self.__qkd_root, resource_key, timeout=self.__timeout, headers=self.__headers, auth=self.__auth) + results.extend(resource_results) + LOGGER.info(f"Resource results for {resource_key}: {resource_results}") + LOGGER.info(f"Final configuration results: {results}") + return results + + @metered_subclass_method(METRICS_POOL) + def SetConfig(self, resources: List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + results = [] + if len(resources) == 0: + return results + + with self.__lock: + for resource_key, resource_value in resources: + LOGGER.info('Processing resource_key = {:s}'.format(str(resource_key))) + + # Only process '/link' keys + if resource_key.startswith('/link'): + try: + # Ensure resource_value is deserialized + if isinstance(resource_value, str): + resource_value = json.loads(resource_value) + + # Extract values from resource_value dictionary + link_uuid = resource_value['uuid'] + node_id_src = resource_value['src_qkdn_id'] + interface_id_src = resource_value['src_interface_id'] + node_id_dst = resource_value['dst_qkdn_id'] + interface_id_dst = resource_value['dst_interface_id'] + virt_prev_hop = resource_value.get('virt_prev_hop') + virt_next_hops = resource_value.get('virt_next_hops') + virt_bandwidth = resource_value.get('virt_bandwidth') + + # Call create_connectivity_link with the extracted values + LOGGER.info(f"Creating connectivity link with UUID: {link_uuid}") + data = create_connectivity_link( + self.__qkd_root, link_uuid, node_id_src, interface_id_src, node_id_dst, interface_id_dst, + virt_prev_hop, virt_next_hops, virt_bandwidth, + timeout=self.__timeout, auth=self.__auth + ) + + # Append success result + results.append(True) + LOGGER.info(f"Connectivity link {link_uuid} created successfully") + + except Exception as e: + # Catch and log any unhandled exceptions + LOGGER.exception(f'Unhandled error processing resource_key({resource_key})') + results.append(e) + else: + # Skip unsupported resource keys and append success + results.append(True) + + # Logging test results + LOGGER.info('Test keys: ' + str([x for x,y in resources])) + LOGGER.info('Test values: ' + str(results)) + + return results + + @metered_subclass_method(METRICS_POOL) + def DeleteConfig(self, resources: List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + LOGGER.info(f"Deleting configuration for resources: {resources}") + results = [] + if not resources: + LOGGER.warning("No resources provided for DeleteConfig") + return results + with self.__lock: + for resource in resources: + LOGGER.info(f'Resource to delete: {resource}') + uuid = resource[1].get('uuid') + if uuid: + LOGGER.info(f'Resource with UUID {uuid} deleted successfully') + results.append(True) + else: + LOGGER.warning(f"UUID not found in resource: {resource}") + results.append(False) + LOGGER.info(f"DeleteConfig results: {results}") + return results + + @metered_subclass_method(METRICS_POOL) + def SubscribeState(self, subscriptions: List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: + LOGGER.info(f"Subscribing to state updates: {subscriptions}") + results = [True for _ in subscriptions] + LOGGER.info(f"Subscription results: {results}") + return results + + @metered_subclass_method(METRICS_POOL) + def UnsubscribeState(self, subscriptions: List[Tuple[str, float, float]]) -> List[Union[bool, Exception]]: + LOGGER.info(f"Unsubscribing from state updates: {subscriptions}") + results = [True for _ in subscriptions] + LOGGER.info(f"Unsubscription results: {results}") + return results + + @metered_subclass_method(METRICS_POOL) + def GetState(self, blocking=False, terminate: Optional[threading.Event] = None) -> Union[dict, list]: + LOGGER.info(f"GetState called with blocking={blocking}, terminate={terminate}") + url = self.__qkd_root + '/restconf/data/etsi-qkd-sdn-node:qkd_node' + try: + LOGGER.info(f"Making GET request to {url} to retrieve state") + response = requests.get(url, timeout=self.__timeout, verify=False, headers=self.__headers, auth=self.__auth) + LOGGER.info(f"Received state response: {response.status_code}, content: {response.text}") + response.raise_for_status() + state_data = response.json() + LOGGER.info(f"State data retrieved: {state_data}") + return state_data + except requests.exceptions.Timeout: + LOGGER.error(f'Timeout getting state from {self.__qkd_root}') + return [] + except Exception as e: + LOGGER.error(f'Exception getting state from {self.__qkd_root}: {e}') + return [] diff --git a/src/device/service/drivers/qkd/Tools.py b/src/device/service/drivers/qkd/Tools.py new file mode 100644 index 0000000000000000000000000000000000000000..c17d01915dcdda55b36317c683fd60524c97239b --- /dev/null +++ b/src/device/service/drivers/qkd/Tools.py @@ -0,0 +1,173 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import json, logging, requests +from requests.auth import HTTPBasicAuth +from typing import Dict, Optional, Set +from device.service.driver_api._Driver import RESOURCE_ENDPOINTS, RESOURCE_INTERFACES, RESOURCE_NETWORK_INSTANCES +from . import RESOURCE_APPS, RESOURCE_LINKS, RESOURCE_CAPABILITES, RESOURCE_NODE + + +LOGGER = logging.getLogger(__name__) + +HTTP_OK_CODES = { + 200, # OK + 201, # Created + 202, # Accepted + 204, # No Content +} + +def find_key(resource, key): + return json.loads(resource[1])[key] + + + +def config_getter( + root_url : str, resource_key : str, auth : Optional[HTTPBasicAuth] = None, timeout : Optional[int] = None, + node_ids : Set[str] = set(), headers={} +): + # getting endpoints + + url = root_url + '/restconf/data/etsi-qkd-sdn-node:qkd_node/' + + + result = [] + + try: + if resource_key in [RESOURCE_ENDPOINTS, RESOURCE_INTERFACES]: + url += 'qkd_interfaces/' + r = requests.get(url, timeout=timeout, verify=False, auth=auth, headers=headers) + interfaces = r.json()['qkd_interfaces']['qkd_interface'] + + # If it's a physical endpoint + if resource_key == RESOURCE_ENDPOINTS: + for interface in interfaces: + resource_value = interface.get('qkdi_att_point', {}) + if 'device' in resource_value and 'port' in resource_value: + uuid = '{}:{}'.format(resource_value['device'], resource_value['port']) + resource_key = '/endpoints/endpoint[{:s}]'.format(uuid) + resource_value['uuid'] = uuid + + sample_types = {} + metric_name = 'KPISAMPLETYPE_LINK_TOTAL_CAPACITY_GBPS' + metric_id = 301 + metric_name = metric_name.lower().replace('kpisampletype_', '') + monitoring_resource_key = '{:s}/state/{:s}'.format(resource_key, metric_name) + sample_types[metric_id] = monitoring_resource_key + + + + resource_value['sample_types'] = sample_types + + + + result.append((resource_key, resource_value)) + else: + for interface in interfaces: + resource_key = '/interface[{:s}]'.format(interface['qkdi_id']) + endpoint_value = interface.get('qkdi_att_point', {}) + + if 'device' in endpoint_value and 'port' in endpoint_value: + name = '{}:{}'.format(endpoint_value['device'], endpoint_value['port']) + interface['name'] = name + interface['enabled'] = True # For test purpose only + + result.append((resource_key, interface)) + + elif resource_key in [RESOURCE_LINKS, RESOURCE_NETWORK_INSTANCES]: + url += 'qkd_links/' + r = requests.get(url, timeout=timeout, verify=False, auth=auth, headers=headers) + links = r.json()['qkd_links']['qkd_link'] + + if resource_key == RESOURCE_LINKS: + for link in links: + link_type = link.get('qkdl_type', 'Direct') + + if link_type == 'Direct': + resource_key = '/link[{:s}]'.format(link['qkdl_id']) + result.append((resource_key, link)) + else: + for link in links: + link_type = link.get('qkdl_type', 'Direct') + + if link_type == 'Virtual': + resource_key = '/service[{:s}]'.format(link['qkdl_id']) + result.append((resource_key, link)) + + elif resource_key == RESOURCE_APPS: + url += 'qkd_applications/' + r = requests.get(url, timeout=timeout, verify=False, auth=auth, headers=headers) + apps = r.json()['qkd_applications']['qkd_app'] + + for app in apps: + resource_key = '/app[{:s}]'.format(app['app_id']) + result.append((resource_key, app)) + + + elif resource_key == RESOURCE_CAPABILITES: + url += 'qkdn_capabilities/' + r = requests.get(url, timeout=timeout, verify=False, auth=auth, headers=headers) + capabilities = r.json()['qkdn_capabilities'] + + result.append((resource_key, capabilities)) + + elif resource_key == RESOURCE_NODE: + r = requests.get(url, timeout=timeout, verify=False, auth=auth, headers=headers) + node = r.json()['qkd_node'] + + result.append((resource_key, node)) + + except requests.exceptions.Timeout: + LOGGER.exception('Timeout connecting {:s}'.format(url)) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Exception retrieving/parsing endpoints for {:s}'.format(resource_key)) + result.append((resource_key, e)) + + + return result + + + +def create_connectivity_link( + root_url, link_uuid, node_id_src, interface_id_src, node_id_dst, interface_id_dst, + virt_prev_hop = None, virt_next_hops = None, virt_bandwidth = None, + auth : Optional[HTTPBasicAuth] = None, timeout : Optional[int] = None, headers={} +): + + url = root_url + '/restconf/data/etsi-qkd-sdn-node:qkd_node/qkd_links/' + is_virtual = bool(virt_prev_hop or virt_next_hops) + + qkd_link = { + 'qkdl_id': link_uuid, + 'qkdl_type': 'etsi-qkd-node-types:' + ('VIRT' if is_virtual else 'PHYS'), + 'qkdl_local': { + 'qkdn_id': node_id_src, + 'qkdi_id': interface_id_src + }, + 'qkdl_remote': { + 'qkdn_id': node_id_dst, + 'qkdi_id': interface_id_dst + } + } + + if is_virtual: + qkd_link['virt_prev_hop'] = virt_prev_hop + qkd_link['virt_next_hop'] = virt_next_hops or [] + qkd_link['virt_bandwidth'] = virt_bandwidth + + + data = {'qkd_links': {'qkd_link': [qkd_link]}} + + requests.post(url, json=data, headers=headers) + diff --git a/src/device/service/drivers/qkd/Tools2.py b/src/device/service/drivers/qkd/Tools2.py new file mode 100644 index 0000000000000000000000000000000000000000..c598c7443d276ea0eb76ce761d173de9944c3cfb --- /dev/null +++ b/src/device/service/drivers/qkd/Tools2.py @@ -0,0 +1,272 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import json +import logging +import requests +from typing import Dict, Optional, Set, List, Tuple, Union, Any +from device.service.driver_api._Driver import RESOURCE_ENDPOINTS, RESOURCE_INTERFACES, RESOURCE_NETWORK_INSTANCES +from . import RESOURCE_APPS, RESOURCE_LINKS, RESOURCE_CAPABILITES, RESOURCE_NODE + +LOGGER = logging.getLogger(__name__) + +HTTP_OK_CODES = {200, 201, 202, 204} + +def find_key(resource: Tuple[str, str], key: str) -> Any: + """ + Extracts a specific key from a JSON resource. + """ + return json.loads(resource[1]).get(key) + + +def config_getter( + root_url: str, resource_key: str, auth: Optional[Any] = None, timeout: Optional[int] = None, + node_ids: Set[str] = set(), headers: Dict[str, str] = {} +) -> List[Tuple[str, Union[Dict[str, Any], Exception]]]: + """ + Fetches configuration data from a QKD node for a specified resource key. + Returns a list of tuples containing the resource key and the corresponding data or exception. + The function is agnostic to authentication: headers and auth are passed from external sources. + """ + url = f"{root_url}/restconf/data/etsi-qkd-sdn-node:qkd_node/" + LOGGER.info(f"Fetching configuration for {resource_key} from {root_url}") + + try: + if resource_key in [RESOURCE_ENDPOINTS, RESOURCE_INTERFACES]: + return fetch_interfaces(url, resource_key, headers, auth, timeout) + + elif resource_key in [RESOURCE_LINKS, RESOURCE_NETWORK_INSTANCES]: + return fetch_links(url, resource_key, headers, auth, timeout) + + elif resource_key in [RESOURCE_APPS]: + return fetch_apps(url, resource_key, headers, auth, timeout) + + elif resource_key in [RESOURCE_CAPABILITES]: + return fetch_capabilities(url, resource_key, headers, auth, timeout) + + elif resource_key in [RESOURCE_NODE]: + return fetch_node(url, resource_key, headers, auth, timeout) + + else: + LOGGER.warning(f"Unknown resource key: {resource_key}") + return [(resource_key, ValueError(f"Unknown resource key: {resource_key}"))] + + except requests.exceptions.RequestException as e: + LOGGER.error(f'Error retrieving/parsing {resource_key} from {url}: {e}') + return [(resource_key, e)] + + +def fetch_interfaces(url: str, resource_key: str, headers: Dict[str, str], auth: Optional[Any], timeout: Optional[int]) -> List[Tuple[str, Union[Dict[str, Any], Exception]]]: + """ + Fetches interface data from the QKD node. Adapts to both mocked and real QKD data structures. + """ + result = [] + url += 'qkd_interfaces/' + + try: + r = requests.get(url, timeout=timeout, verify=False, auth=auth, headers=headers) + r.raise_for_status() + + # Handle both real and mocked QKD response structures + response_data = r.json() + + if isinstance(response_data.get('qkd_interfaces'), dict): + interfaces = response_data.get('qkd_interfaces', {}).get('qkd_interface', []) + else: + interfaces = response_data.get('qkd_interface', []) + + for interface in interfaces: + if resource_key in [RESOURCE_ENDPOINTS]: + # Handle real QKD data format + resource_value = interface.get('qkdi_att_point', {}) + if 'device' in resource_value and 'port' in resource_value: + uuid = f"{resource_value['device']}:{resource_value['port']}" + resource_key_with_uuid = f"/endpoints/endpoint[{uuid}]" + resource_value['uuid'] = uuid + + # Add sample types (for demonstration purposes) + sample_types = {} + metric_name = 'KPISAMPLETYPE_LINK_TOTAL_CAPACITY_GBPS' + metric_id = 301 + metric_name = metric_name.lower().replace('kpisampletype_', '') + monitoring_resource_key = '{:s}/state/{:s}'.format(resource_key, metric_name) + sample_types[metric_id] = monitoring_resource_key + resource_value['sample_types'] = sample_types + + result.append((resource_key_with_uuid, resource_value)) + + else: + # Handle both real and mocked QKD formats + endpoint_value = interface.get('qkdi_att_point', {}) + if 'device' in endpoint_value and 'port' in endpoint_value: + # Real QKD data format + interface_uuid = f"{endpoint_value['device']}:{endpoint_value['port']}" + interface['uuid'] = interface_uuid + interface['name'] = interface_uuid + interface['enabled'] = True # Assume enabled for real data + else: + # Mocked QKD data format + interface_uuid = interface.get('uuid', f"/interface[{interface['qkdi_id']}]") + interface['uuid'] = interface_uuid + interface['name'] = interface.get('name', interface_uuid) + interface['enabled'] = interface.get('enabled', False) # Mocked enabled status + + result.append((f"/interface[{interface['qkdi_id']}]", interface)) + + except requests.RequestException as e: + LOGGER.error(f"Error fetching interfaces from {url}: {e}") + result.append((resource_key, e)) + + return result + +def fetch_links(url: str, resource_key: str, headers: Dict[str, str], auth: Optional[Any], timeout: Optional[int]) -> List[Tuple[str, Union[Dict[str, Any], Exception]]]: + """ + Fetches link data from the QKD node. Adapts to both mocked and real QKD data structures. + """ + result = [] + + if resource_key in [RESOURCE_LINKS, RESOURCE_NETWORK_INSTANCES]: + url += 'qkd_links/' + + try: + r = requests.get(url, timeout=timeout, verify=False, auth=auth, headers=headers) + r.raise_for_status() + + # Handle real and mocked QKD data structures + links = r.json().get('qkd_links', []) + + for link in links: + # For real QKD format (QKD links returned as dictionary objects) + if isinstance(link, dict): + qkdl_id = link.get('qkdl_id') + link_type = link.get('qkdl_type', 'Direct') + + # Handle both real (PHYS, VIRT) and mocked (DIRECT) link types + if link_type == 'PHYS' or link_type == 'VIRT': + resource_key_direct = f"/link[{qkdl_id}]" + result.append((resource_key_direct, link)) + elif link_type == 'DIRECT': + # Mocked QKD format has a slightly different structure + result.append((f"/link/link[{qkdl_id}]", link)) + + # For mocked QKD format (QKD links returned as lists) + elif isinstance(link, list): + for l in link: + qkdl_id = l.get('uuid') + link_type = l.get('type', 'Direct') + + if link_type == 'DIRECT': + resource_key_direct = f"/link/link[{qkdl_id}]" + result.append((resource_key_direct, l)) + + except requests.RequestException as e: + LOGGER.error(f"Error fetching links from {url}: {e}") + result.append((resource_key, e)) + + return result + +def fetch_apps(url: str, resource_key: str, headers: Dict[str, str], auth: Optional[Any], timeout: Optional[int]) -> List[Tuple[str, Union[Dict[str, Any], Exception]]]: + """ + Fetches application data from the QKD node. + """ + result = [] + url += 'qkd_applications/' + + try: + r = requests.get(url, timeout=timeout, verify=False, auth=auth, headers=headers) + r.raise_for_status() + + apps = r.json().get('qkd_applications', {}).get('qkd_app', []) + for app in apps: + result.append((f"/app[{app['app_id']}]", app)) + except requests.RequestException as e: + LOGGER.error(f"Error fetching applications from {url}: {e}") + result.append((resource_key, e)) + + return result + + +def fetch_capabilities(url: str, resource_key: str, headers: Dict[str, str], auth: Optional[Any], timeout: Optional[int]) -> List[Tuple[str, Union[Dict[str, Any], Exception]]]: + """ + Fetches capabilities data from the QKD node. + """ + result = [] + url += 'qkdn_capabilities/' + + try: + r = requests.get(url, timeout=timeout, verify=False, auth=auth, headers=headers) + r.raise_for_status() + result.append((resource_key, r.json())) + except requests.RequestException as e: + LOGGER.error(f"Error fetching capabilities from {url}: {e}") + result.append((resource_key, e)) + + return result + + +def fetch_node(url: str, resource_key: str, headers: Dict[str, str], auth: Optional[Any], timeout: Optional[int]) -> List[Tuple[str, Union[Dict[str, Any], Exception]]]: + """ + Fetches node data from the QKD node. + """ + result = [] + + try: + r = requests.get(url, timeout=timeout, verify=False, auth=auth, headers=headers) + r.raise_for_status() + result.append((resource_key, r.json().get('qkd_node', {}))) + except requests.RequestException as e: + LOGGER.error(f"Error fetching node from {url}: {e}") + result.append((resource_key, e)) + + return result + + +def create_connectivity_link( + root_url: str, link_uuid: str, node_id_src: str, interface_id_src: str, node_id_dst: str, interface_id_dst: str, + virt_prev_hop: Optional[str] = None, virt_next_hops: Optional[List[str]] = None, virt_bandwidth: Optional[int] = None, + auth: Optional[Any] = None, timeout: Optional[int] = None, headers: Dict[str, str] = {} +) -> Union[bool, Exception]: + """ + Creates a connectivity link between QKD nodes using the provided parameters. + """ + url = f"{root_url}/restconf/data/etsi-qkd-sdn-node:qkd_node/qkd_links/" + + qkd_link = { + 'qkdl_id': link_uuid, + 'qkdl_type': 'etsi-qkd-node-types:' + ('VIRT' if virt_prev_hop or virt_next_hops else 'PHYS'), + 'qkdl_local': {'qkdn_id': node_id_src, 'qkdi_id': interface_id_src}, + 'qkdl_remote': {'qkdn_id': node_id_dst, 'qkdi_id': interface_id_dst} + } + + if virt_prev_hop or virt_next_hops: + qkd_link['virt_prev_hop'] = virt_prev_hop + qkd_link['virt_next_hop'] = virt_next_hops or [] + qkd_link['virt_bandwidth'] = virt_bandwidth + + data = {'qkd_links': {'qkd_link': [qkd_link]}} + + LOGGER.info(f"Creating connectivity link with payload: {json.dumps(data)}") + + try: + r = requests.post(url, json=data, timeout=timeout, verify=False, auth=auth, headers=headers) + r.raise_for_status() + if r.status_code in HTTP_OK_CODES: + LOGGER.info(f"Link {link_uuid} created successfully.") + return True + else: + LOGGER.error(f"Failed to create link {link_uuid}, status code: {r.status_code}") + return False + except requests.exceptions.RequestException as e: + LOGGER.error(f"Exception creating link {link_uuid} with payload {json.dumps(data)}: {e}") + return e diff --git a/src/device/service/drivers/qkd/__init__.py b/src/device/service/drivers/qkd/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e24e5523a216f79dcec21f2ac21b2262426acc04 --- /dev/null +++ b/src/device/service/drivers/qkd/__init__.py @@ -0,0 +1,27 @@ +from device.service.driver_api._Driver import RESOURCE_ENDPOINTS, RESOURCE_INTERFACES, RESOURCE_NETWORK_INSTANCES + +RESOURCE_LINKS = '__links__' +RESOURCE_APPS = '__apps__' +RESOURCE_CAPABILITES = '__capabilities__' +RESOURCE_NODE = '__node__' + + +ALL_RESOURCE_KEYS = [ + RESOURCE_ENDPOINTS, + RESOURCE_INTERFACES, + RESOURCE_NETWORK_INSTANCES, + RESOURCE_LINKS, + RESOURCE_APPS, + RESOURCE_CAPABILITES, + RESOURCE_NODE +] + +RESOURCE_KEY_MAPPINGS = { + RESOURCE_ENDPOINTS : 'component', + RESOURCE_INTERFACES : 'interface', + RESOURCE_NETWORK_INSTANCES: 'network_instance', + RESOURCE_LINKS : 'links', + RESOURCE_APPS : 'apps', + RESOURCE_CAPABILITES : 'capabilities', + RESOURCE_NODE : 'node' +} diff --git a/src/device/tests/qkd/integration/test_external_qkd_retrieve_information.py b/src/device/tests/qkd/integration/test_external_qkd_retrieve_information.py new file mode 100644 index 0000000000000000000000000000000000000000..0bb91191a96d0b3b6cfeef107b50a881c2261e60 --- /dev/null +++ b/src/device/tests/qkd/integration/test_external_qkd_retrieve_information.py @@ -0,0 +1,184 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import pytest +import requests +import json +import os +from device.service.drivers.qkd.QKDDriver2 import QKDDriver +from device.service.drivers.qkd.Tools2 import ( + RESOURCE_INTERFACES, + RESOURCE_LINKS, + RESOURCE_CAPABILITES, + RESOURCE_NODE, + RESOURCE_APPS +) + +# Test ID: INT_LQ_Test_01 (QKD Node Authentication) +# Function to retrieve JWT token +def get_jwt_token(node_address, port, username, password): + """ Retrieve JWT token from a node's login endpoint if it's secured. """ + login_url = f"http://{node_address}:{port}/login" + payload = {'username': username, 'password': password} + try: + print(f"Attempting to retrieve JWT token from {login_url}...") + response = requests.post(login_url, headers={'Content-Type': 'application/x-www-form-urlencoded'}, data=payload) + response.raise_for_status() + print(f"Successfully retrieved JWT token from {login_url}") + return response.json().get('access_token') + except requests.exceptions.RequestException as e: + print(f"Failed to retrieve JWT token from {login_url}: {e}") + return None + + +# Environment variables for sensitive information +QKD1_ADDRESS = os.getenv("QKD1_ADDRESS") +QKD2_ADDRESS = os.getenv("QKD2_ADDRESS") +PORT = os.getenv("QKD_PORT") +USERNAME = os.getenv("QKD_USERNAME") +PASSWORD = os.getenv("QKD_PASSWORD") + +# Pytest fixture to initialize QKDDriver with token for Node 1 +@pytest.fixture +def driver_qkd1(): + token = get_jwt_token(QKD1_ADDRESS, PORT, USERNAME, PASSWORD) + headers = {'Authorization': f'Bearer {token}'} if token else {} + return QKDDriver(address=QKD1_ADDRESS, port=PORT, headers=headers) + +# Pytest fixture to initialize QKDDriver with token for Node 2 +@pytest.fixture +def driver_qkd2(): + token = get_jwt_token(QKD2_ADDRESS, PORT, USERNAME, PASSWORD) + headers = {'Authorization': f'Bearer {token}'} if token else {} + return QKDDriver(address=QKD2_ADDRESS, port=PORT, headers=headers) + +# Utility function to save data to a JSON file, filtering out non-serializable objects +def save_json_file(filename, data): + serializable_data = filter_serializable(data) + with open(filename, 'w') as f: + json.dump(serializable_data, f, indent=2) + print(f"Saved data to {filename}") + +# Function to filter out non-serializable objects like HTTPError +def filter_serializable(data): + if isinstance(data, list): + return [filter_serializable(item) for item in data if not isinstance(item, requests.exceptions.RequestException)] + elif isinstance(data, dict): + return {key: filter_serializable(value) for key, value in data.items() if not isinstance(value, requests.exceptions.RequestException)} + return data + +# Utility function to print the retrieved data for debugging, handling errors +def print_data(label, data): + try: + print(f"{label}: {json.dumps(data, indent=2)}") + except TypeError as e: + print(f"Error printing {label}: {e}, Data: {data}") + +# General function to retrieve and handle HTTP errors +def retrieve_data(driver_qkd, resource, resource_name): + try: + data = driver_qkd.GetConfig([resource]) + assert isinstance(data, list), f"Expected a list for {resource_name}" + assert len(data) > 0, f"No {resource_name} found in the system" + return data + except requests.exceptions.HTTPError as e: + print(f"HTTPError while fetching {resource_name}: {e}") + return None + except AssertionError as e: + print(f"AssertionError: {e}") + return None + +# Test ID: INT_LQ_Test_02 (QKD Node Capabilities) +def retrieve_capabilities(driver_qkd, node_name): + capabilities = retrieve_data(driver_qkd, RESOURCE_CAPABILITES, "capabilities") + if capabilities: + print_data(f"{node_name} Capabilities", capabilities) + return capabilities + +# Test ID: INT_LQ_Test_03 (QKD Interfaces) +def retrieve_interfaces(driver_qkd, node_name): + interfaces = retrieve_data(driver_qkd, RESOURCE_INTERFACES, "interfaces") + if interfaces: + print_data(f"{node_name} Interfaces", interfaces) + return interfaces + +# Test ID: INT_LQ_Test_04 (QKD Links) +def retrieve_links(driver_qkd, node_name): + links = retrieve_data(driver_qkd, RESOURCE_LINKS, "links") + if links: + print_data(f"{node_name} Links", links) + return links + +# Test ID: INT_LQ_Test_05 (QKD Link Metrics) +def retrieve_link_metrics(driver_qkd, node_name): + links = retrieve_links(driver_qkd, node_name) + if links: + for link in links: + if 'performance_metrics' in link[1]: + print_data(f"{node_name} Link Metrics", link[1]['performance_metrics']) + else: + print(f"No metrics found for link {link[0]}") + return links + +# Test ID: INT_LQ_Test_06 (QKD Applications) +def retrieve_applications(driver_qkd, node_name): + applications = retrieve_data(driver_qkd, RESOURCE_APPS, "applications") + if applications: + print_data(f"{node_name} Applications", applications) + return applications + +# Test ID: INT_LQ_Test_07 (System Health Check) +def retrieve_node_data(driver_qkd, node_name): + node_data = retrieve_data(driver_qkd, RESOURCE_NODE, "node data") + if node_data: + print_data(f"{node_name} Node Data", node_data) + return node_data + +# Main test to retrieve and save data from QKD1 and QKD2 to files +def test_retrieve_and_save_data(driver_qkd1, driver_qkd2): + # Retrieve data for QKD1 + qkd1_interfaces = retrieve_interfaces(driver_qkd1, "QKD1") + qkd1_links = retrieve_links(driver_qkd1, "QKD1") + qkd1_capabilities = retrieve_capabilities(driver_qkd1, "QKD1") + qkd1_node_data = retrieve_node_data(driver_qkd1, "QKD1") + qkd1_apps = retrieve_applications(driver_qkd1, "QKD1") + + qkd1_data = { + "interfaces": qkd1_interfaces, + "links": qkd1_links, + "capabilities": qkd1_capabilities, + "apps": qkd1_apps, + "node_data": qkd1_node_data + } + + # Save QKD1 data to file + save_json_file('qkd1_data.json', qkd1_data) + + # Retrieve data for QKD2 + qkd2_interfaces = retrieve_interfaces(driver_qkd2, "QKD2") + qkd2_links = retrieve_links(driver_qkd2, "QKD2") + qkd2_capabilities = retrieve_capabilities(driver_qkd2, "QKD2") + qkd2_node_data = retrieve_node_data(driver_qkd2, "QKD2") + qkd2_apps = retrieve_applications(driver_qkd2, "QKD2") + + qkd2_data = { + "interfaces": qkd2_interfaces, + "links": qkd2_links, + "capabilities": qkd2_capabilities, + "apps": qkd2_apps, + "node_data": qkd2_node_data + } + + # Save QKD2 data to file + save_json_file('qkd2_data.json', qkd2_data) diff --git a/src/device/tests/qkd/unit/PrepareScenario.py b/src/device/tests/qkd/unit/PrepareScenario.py new file mode 100644 index 0000000000000000000000000000000000000000..756b914d55df788472ed6e839e1fc29e356877e4 --- /dev/null +++ b/src/device/tests/qkd/unit/PrepareScenario.py @@ -0,0 +1,126 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import pytest, os, time, logging +from common.Constants import ServiceNameEnum +from common.Settings import ( + ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_HTTP, + get_env_var_name, get_service_port_http +) +from context.client.ContextClient import ContextClient +from nbi.service.rest_server.RestServer import RestServer +from nbi.service.rest_server.nbi_plugins.tfs_api import register_tfs_api +from device.client.DeviceClient import DeviceClient +from device.service.DeviceService import DeviceService +from device.service.driver_api.DriverFactory import DriverFactory +from device.service.driver_api.DriverInstanceCache import DriverInstanceCache +from device.service.drivers import DRIVERS +from device.tests.CommonObjects import CONTEXT, TOPOLOGY +from device.tests.MockService_Dependencies import MockService_Dependencies +from monitoring.client.MonitoringClient import MonitoringClient +from requests import codes as requests_codes +import requests + +# Constants +LOCAL_HOST = '127.0.0.1' +MOCKSERVICE_PORT = 8080 + +# Get dynamic port for NBI service +NBI_SERVICE_PORT = MOCKSERVICE_PORT + get_service_port_http(ServiceNameEnum.NBI) + +# Set environment variables for the NBI service host and port +os.environ[get_env_var_name(ServiceNameEnum.NBI, ENVVAR_SUFIX_SERVICE_HOST)] = str(LOCAL_HOST) +os.environ[get_env_var_name(ServiceNameEnum.NBI, ENVVAR_SUFIX_SERVICE_PORT_HTTP)] = str(NBI_SERVICE_PORT) + +# Expected status codes for requests +EXPECTED_STATUS_CODES = {requests_codes['OK'], requests_codes['CREATED'], requests_codes['ACCEPTED'], requests_codes['NO_CONTENT']} + +# Debugging output for the port number +print(f"MOCKSERVICE_PORT: {MOCKSERVICE_PORT}") +print(f"NBI_SERVICE_PORT: {NBI_SERVICE_PORT}") + +@pytest.fixture(scope='session') +def mock_service(): + _service = MockService_Dependencies(MOCKSERVICE_PORT) + _service.configure_env_vars() + _service.start() + yield _service + _service.stop() + +@pytest.fixture(scope='session') +def nbi_service_rest(mock_service): # Pass the `mock_service` as an argument if needed + _rest_server = RestServer() + register_tfs_api(_rest_server) # Register the TFS API with the REST server + _rest_server.start() + time.sleep(1) # Give time for the server to start + yield _rest_server + _rest_server.shutdown() + _rest_server.join() + +@pytest.fixture(scope='session') +def context_client(mock_service): + _client = ContextClient() + yield _client + _client.close() + +@pytest.fixture(scope='session') +def device_service(context_client, monitoring_client): + _driver_factory = DriverFactory(DRIVERS) + _driver_instance_cache = DriverInstanceCache(_driver_factory) + _service = DeviceService(_driver_instance_cache) + _service.start() + yield _service + _service.stop() + +@pytest.fixture(scope='session') +def device_client(device_service): + _client = DeviceClient() + yield _client + _client.close() + +# General request function +def do_rest_request(method, url, body=None, timeout=10, allow_redirects=True, logger=None): + # Construct the request URL with NBI service port + request_url = f"http://{LOCAL_HOST}:{NBI_SERVICE_PORT}{url}" + + # Log the request details for debugging + if logger: + msg = f"Request: {method.upper()} {request_url}" + if body: + msg += f" body={body}" + logger.warning(msg) + + # Send the request + reply = requests.request(method, request_url, timeout=timeout, json=body, allow_redirects=allow_redirects) + + # Log the response details for debugging + if logger: + logger.warning(f"Reply: {reply.text}") + + # Print status code and response for debugging instead of asserting + print(f"Status code: {reply.status_code}") + print(f"Response: {reply.text}") + + # Return the JSON response if present + if reply.content: + return reply.json() + return None + +# Function for GET requests +def do_rest_get_request(url, body=None, timeout=10, allow_redirects=True, logger=None): + return do_rest_request('get', url, body, timeout, allow_redirects, logger=logger) + +# Function for POST requests +def do_rest_post_request(url, body=None, timeout=10, allow_redirects=True, logger=None): + return do_rest_request('post', url, body, timeout, allow_redirects, logger=logger) diff --git a/src/device/tests/qkd/unit/descriptorQKD_links.json b/src/device/tests/qkd/unit/descriptorQKD_links.json new file mode 100644 index 0000000000000000000000000000000000000000..28a9e7d5ae014f78cfa0e554ee73a53449bba03c --- /dev/null +++ b/src/device/tests/qkd/unit/descriptorQKD_links.json @@ -0,0 +1,77 @@ +{ + "contexts": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}} + ], + "topologies": [ + {"topology_id": {"topology_uuid": {"uuid": "admin"}, "context_id": {"context_uuid": {"uuid": "admin"}}}} + ], + "devices": [ + { + "device_id": {"device_uuid": {"uuid": "QKD1"}}, "device_type": "qkd-node", + "device_operational_status": 0, "device_drivers": [12], "device_endpoints": [], + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.0.2.10"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "11111"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "scheme": "http" + }}} + ]} + + }, + { + "device_id": {"device_uuid": {"uuid": "QKD2"}}, "device_type": "qkd-node", + "device_operational_status": 0, "device_drivers": [12], "device_endpoints": [], + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.0.2.10"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "22222"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "scheme": "http" + }}} + ]} + + }, + { + "device_id": {"device_uuid": {"uuid": "QKD3"}}, "device_type": "qkd-node", + "device_operational_status": 0, "device_drivers": [12], "device_endpoints": [], + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "10.0.2.10"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "33333"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "scheme": "http" + }}} + ]} + + } + ], + "links": [ + { + "link_id": {"link_uuid": {"uuid": "QKD1/10.0.2.10:1001==QKD2/10.0.2.10:2001"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "QKD1"}}, "endpoint_uuid": {"uuid": "10.0.2.10:1001"}}, + {"device_id": {"device_uuid": {"uuid": "QKD2"}}, "endpoint_uuid": {"uuid": "10.0.2.10:2001"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "QKD2/10.0.2.10:2001==QKD1/10.0.2.10:1001"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "QKD2"}}, "endpoint_uuid": {"uuid": "10.0.2.10:2001"}}, + {"device_id": {"device_uuid": {"uuid": "QKD1"}}, "endpoint_uuid": {"uuid": "10.0.2.10:1001"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "QKD2/10.0.2.10:2002==QKD3/10.0.2.10:3001"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "QKD2"}}, "endpoint_uuid": {"uuid": "10.0.2.10:2002"}}, + {"device_id": {"device_uuid": {"uuid": "QKD3"}}, "endpoint_uuid": {"uuid": "10.0.2.10:3001"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "QKD3/10.0.2.10:3001==QKD2/10.0.2.10:2002"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "QKD3"}}, "endpoint_uuid": {"uuid": "10.0.2.10:3001"}}, + {"device_id": {"device_uuid": {"uuid": "QKD2"}}, "endpoint_uuid": {"uuid": "10.0.2.10:2002"}} + ] + } + + ] +} diff --git a/src/device/tests/qkd/unit/retrieve_device_mock_information.py b/src/device/tests/qkd/unit/retrieve_device_mock_information.py new file mode 100644 index 0000000000000000000000000000000000000000..f6e18f51d4ce788cbc40dc6befe101df65ef765f --- /dev/null +++ b/src/device/tests/qkd/unit/retrieve_device_mock_information.py @@ -0,0 +1,104 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging, urllib +from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME +from common.proto.context_pb2 import ContextId +from common.tools.descriptor.Loader import DescriptorLoader +from context.client.ContextClient import ContextClient +from nbi.service.rest_server.RestServer import RestServer +from common.tools.object_factory.Context import json_context_id +from device.tests.qkd.unit.PrepareScenario import mock_service, nbi_service_rest, do_rest_get_request + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +JSON_ADMIN_CONTEXT_ID = json_context_id(DEFAULT_CONTEXT_NAME) +ADMIN_CONTEXT_ID = ContextId(**JSON_ADMIN_CONTEXT_ID) + + +# ----- Context -------------------------------------------------------------------------------------------------------- + +def test_rest_get_context_ids(nbi_service_rest: RestServer): # pylint: disable=redefined-outer-name, unused-argument + reply = do_rest_get_request('/tfs-api/context_ids') + print("Context IDs:", reply) + +def test_rest_get_contexts(nbi_service_rest: RestServer): # pylint: disable=redefined-outer-name, unused-argument + reply = do_rest_get_request('/tfs-api/contexts') + print("Contexts:", reply) + +def test_rest_get_context(nbi_service_rest: RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + reply = do_rest_get_request(f'/tfs-api/context/{context_uuid}') + print("Context data:", reply) + + +# ----- Topology ------------------------------------------------------------------------------------------------------- + +def test_rest_get_topology_ids(nbi_service_rest: RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + reply = do_rest_get_request(f'/tfs-api/context/{context_uuid}/topology_ids') + print("Topology IDs:", reply) + +def test_rest_get_topologies(nbi_service_rest: RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + reply = do_rest_get_request(f'/tfs-api/context/{context_uuid}/topologies') + print("Topologies:", reply) + +def test_rest_get_topology(nbi_service_rest: RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + topology_uuid = urllib.parse.quote(DEFAULT_TOPOLOGY_NAME) + reply = do_rest_get_request(f'/tfs-api/context/{context_uuid}/topology/{topology_uuid}') + print("Topology data:", reply) + + +# ----- Device --------------------------------------------------------------------------------------------------------- + +def test_rest_get_device_ids(nbi_service_rest: RestServer): # pylint: disable=redefined-outer-name, unused-argument + reply = do_rest_get_request('/tfs-api/device_ids') + print("Device IDs:", reply) + +def test_rest_get_devices(nbi_service_rest: RestServer): # pylint: disable=redefined-outer-name, unused-argument + reply = do_rest_get_request('/tfs-api/devices') + print("Devices:", reply) + + +# ----- Link ----------------------------------------------------------------------------------------------------------- + +def test_rest_get_link_ids(nbi_service_rest: RestServer): # pylint: disable=redefined-outer-name, unused-argument + reply = do_rest_get_request('/tfs-api/link_ids') + print("Link IDs:", reply) + +def test_rest_get_links(nbi_service_rest: RestServer): # pylint: disable=redefined-outer-name, unused-argument + reply = do_rest_get_request('/tfs-api/links') + print("Links:", reply) + + +# ----- Service -------------------------------------------------------------------------------------------------------- + +def test_rest_get_service_ids(nbi_service_rest: RestServer): # pylint: disable=redefined-outer-name, unused-argument + reply = do_rest_get_request('/tfs-api/link_ids') + print("Service IDs:", reply) + +def test_rest_get_topologies(nbi_service_rest: RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) + reply = do_rest_get_request(f'/tfs-api/context/{context_uuid}/services') + print("Services:", reply) + +# ----- Apps ----------------------------------------------------------------------------------------------------------- + +def test_rest_get_apps(nbi_service_rest: RestServer): # pylint: disable=redefined-outer-name, unused-argument + context_uuid = urllib.parse.quote(DEFAULT_CONTEXT_NAME) # Context ID + reply = do_rest_get_request(f'/tfs-api/context/{context_uuid}/apps') + print("Apps:", reply) diff --git a/src/device/tests/qkd/unit/test_application_deployment.py b/src/device/tests/qkd/unit/test_application_deployment.py new file mode 100644 index 0000000000000000000000000000000000000000..d10ddc523062e1377c7621edfdd42b57c32bad56 --- /dev/null +++ b/src/device/tests/qkd/unit/test_application_deployment.py @@ -0,0 +1,49 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import pytest +import json +import os +os.environ['DEVICE_EMULATED_ONLY'] = 'YES' +from device.service.drivers.qkd.QKDDriver2 import QKDDriver + +MOCK_QKD_ADDRRESS = '10.0.2.10' +MOCK_PORT = 11111 + +@pytest.fixture +def qkd_driver(): + # Initialize the QKD driver with the appropriate settings + return QKDDriver(address=MOCK_QKD_ADDRRESS, port=MOCK_PORT, username='user', password='pass') + +def test_application_deployment(qkd_driver): + qkd_driver.Connect() + + # Application registration data + app_data = { + 'qkd_app': [ + { + 'app_id': '00000001-0001-0000-0000-000000000001', + 'client_app_id': [], + 'app_statistics': {'statistics': []}, + 'app_qos': {}, + 'backing_qkdl_id': [] + } + ] + } + + # Send a POST request to create the application + response = qkd_driver.SetConfig([('/qkd_applications/qkd_app', json.dumps(app_data))]) + + # Verify response + assert response[0] is True, "Expected application registration to succeed" diff --git a/src/device/tests/qkd/unit/test_create_apps.py b/src/device/tests/qkd/unit/test_create_apps.py new file mode 100644 index 0000000000000000000000000000000000000000..4724e5c4abd04e28586d54ae6dbbbf0be3c7dc5c --- /dev/null +++ b/src/device/tests/qkd/unit/test_create_apps.py @@ -0,0 +1,40 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import requests + +QKD_ADDRESS = '10.0.2.10' +QKD_URL = 'http://{:s}/qkd_app/create_qkd_app'.format(QKD_ADDRESS) + +QKD_REQUEST_1 = { + 'app': { + 'server_app_id': '1', + 'client_app_id': [], + 'app_status': 'ON', + 'local_qkdn_id': '00000001-0000-0000-0000-0000000000', + 'backing_qkdl_id': ['00000003-0002-0000-0000-0000000000'] + } +} +print(requests.post(QKD_URL, json=QKD_REQUEST_1)) + +QKD_REQUEST_2 = { + 'app': { + 'server_app_id': '1', + 'client_app_id': [], + 'app_status': 'ON', + 'local_qkdn_id': '00000003-0000-0000-0000-0000000000', + 'backing_qkdl_id': ['00000003-0002-0000-0000-0000000000'] + } +} +print(requests.post(QKD_URL, json=QKD_REQUEST_2)) diff --git a/src/device/tests/qkd/unit/test_mock_qkd_node.py b/src/device/tests/qkd/unit/test_mock_qkd_node.py new file mode 100644 index 0000000000000000000000000000000000000000..f679a8389476c35a6881b7dc6484baab8ef4e20b --- /dev/null +++ b/src/device/tests/qkd/unit/test_mock_qkd_node.py @@ -0,0 +1,31 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import pytest +import requests +from requests.exceptions import ConnectionError + +def test_mock_qkd_node_responses(): + response = requests.get('http://127.0.0.1:11111/restconf/data/etsi-qkd-sdn-node:qkd_node') + assert response.status_code == 200 + data = response.json() + assert 'qkd_node' in data + +def test_mock_node_failure_scenarios(): + try: + response = requests.get('http://127.0.0.1:12345/restconf/data/etsi-qkd-sdn-node:qkd_node') + except ConnectionError as e: + assert isinstance(e, ConnectionError) + else: + pytest.fail("ConnectionError not raised as expected") diff --git a/src/device/tests/qkd/unit/test_qkd_compliance.py b/src/device/tests/qkd/unit/test_qkd_compliance.py new file mode 100644 index 0000000000000000000000000000000000000000..2f305888e952e7d9acc3e96ffc1e427a7cc85685 --- /dev/null +++ b/src/device/tests/qkd/unit/test_qkd_compliance.py @@ -0,0 +1,24 @@ + +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import pytest +import requests +from tests.tools.mock_qkd_nodes.YangValidator import YangValidator + +def test_compliance_with_yang_models(): + validator = YangValidator('etsi-qkd-sdn-node', ['etsi-qkd-node-types']) + response = requests.get('http://127.0.0.1:11111/restconf/data/etsi-qkd-sdn-node:qkd_node') + data = response.json() + assert validator.parse_to_dict(data) is not None diff --git a/src/device/tests/qkd/unit/test_qkd_configuration.py b/src/device/tests/qkd/unit/test_qkd_configuration.py new file mode 100644 index 0000000000000000000000000000000000000000..15c4787c28a92ed07d8666b4c715954da1e690d6 --- /dev/null +++ b/src/device/tests/qkd/unit/test_qkd_configuration.py @@ -0,0 +1,230 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import pytest +import json +from requests.exceptions import HTTPError +from device.service.drivers.qkd.QKDDriver2 import QKDDriver +import requests +from device.service.drivers.qkd.Tools2 import ( + RESOURCE_INTERFACES, + RESOURCE_LINKS, + RESOURCE_ENDPOINTS, + RESOURCE_APPS, + RESOURCE_CAPABILITES, + RESOURCE_NODE +) + +MOCK_QKD_ADDRRESS = '127.0.0.1' +MOCK_PORT = 11111 + +@pytest.fixture +def qkd_driver(): + # Initialize the QKD driver with the appropriate settings, ensure correct JWT headers are included + token = "YOUR_JWT_TOKEN" # Replace with your actual JWT token + if not token: + pytest.fail("JWT token is missing. Make sure to generate a valid JWT token.") + headers = {"Authorization": f"Bearer {token}"} + return QKDDriver(address=MOCK_QKD_ADDRRESS, port=MOCK_PORT, headers=headers) + +# Utility function to print the retrieved data for debugging +def print_data(label, data): + print(f"{label}: {json.dumps(data, indent=2)}") + +# Test ID: SBI_Test_03 (Initial Config Retrieval) +def test_initial_config_retrieval(qkd_driver): + qkd_driver.Connect() + + # Retrieve and validate the initial configuration + config = qkd_driver.GetInitialConfig() + + # Since GetInitialConfig returns a list, adjust the assertions accordingly + assert isinstance(config, list), "Expected a list for initial config" + assert len(config) > 0, "Initial config should not be empty" + + # Output for debugging + print_data("Initial Config", config) + +# Test ID: INT_LQ_Test_05 (QKD Devices Retrieval) +def test_retrieve_devices(qkd_driver): + qkd_driver.Connect() + + # Retrieve and validate device information + devices = qkd_driver.GetConfig([RESOURCE_NODE]) + assert isinstance(devices, list), "Expected a list of devices" + + if not devices: + pytest.skip("No devices found in the system. Skipping device test.") + + for device in devices: + assert isinstance(device, tuple), "Each device entry must be a tuple" + assert isinstance(device[1], dict), "Device data must be a dictionary" + if isinstance(device[1], Exception): + pytest.fail(f"Error retrieving devices: {device[1]}") + + # Output for debugging + print_data("Devices", devices) + +# Test ID: INT_LQ_Test_04 (QKD Links Retrieval) +def test_retrieve_links(qkd_driver): + qkd_driver.Connect() + + try: + # Fetch the links using the correct resource key + links = qkd_driver.GetConfig([RESOURCE_LINKS]) + assert isinstance(links, list), "Expected a list of tuples (resource key, data)." + + if len(links) == 0: + pytest.skip("No links found in the system, skipping link validation.") + + for link in links: + assert isinstance(link, tuple), "Each link entry must be a tuple" + resource_key, link_data = link # Unpack the tuple + + # Handle HTTPError or exception in the response + if isinstance(link_data, requests.exceptions.HTTPError): + pytest.fail(f"Failed to retrieve links due to HTTP error: {link_data}") + + if isinstance(link_data, dict): + # For real QKD data (links as dictionaries) + assert 'qkdl_id' in link_data, "Missing 'qkdl_id' in link data" + assert 'qkdl_local' in link_data, "Missing 'qkdl_local' in link data" + assert 'qkdl_remote' in link_data, "Missing 'qkdl_remote' in link data" + assert 'qkdl_type' in link_data, "Missing 'qkdl_type' in link data" + + # Check 'virt_prev_hop' only for virtual links (VIRT) + if link_data['qkdl_type'] == 'etsi-qkd-node-types:VIRT': + virt_prev_hop = link_data.get('virt_prev_hop') + assert virt_prev_hop is None or re.match(r'[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}', str(virt_prev_hop)), \ + f"Invalid 'virt_prev_hop': {virt_prev_hop}" + + # Print out the link details for debugging + print(f"Link ID: {link_data['qkdl_id']}") + print(f"Link Type: {link_data['qkdl_type']}") + print(f"Local QKD: {json.dumps(link_data['qkdl_local'], indent=2)}") + print(f"Remote QKD: {json.dumps(link_data['qkdl_remote'], indent=2)}") + + elif isinstance(link_data, list): + # For mocked QKD data (links as lists of dictionaries) + for mock_link in link_data: + assert 'uuid' in mock_link, "Missing 'uuid' in mocked link data" + assert 'src_qkdn_id' in mock_link, "Missing 'src_qkdn_id' in mocked link data" + assert 'dst_qkdn_id' in mock_link, "Missing 'dst_qkdn_id' in mocked link data" + + # Print out the mocked link details for debugging + print(f"Mock Link ID: {mock_link['uuid']}") + print(f"Source QKD ID: {mock_link['src_qkdn_id']}") + print(f"Destination QKD ID: {mock_link['dst_qkdn_id']}") + + else: + pytest.fail(f"Unexpected link data format: {type(link_data)}") + + except HTTPError as e: + pytest.fail(f"HTTP error occurred while retrieving links: {e}") + except Exception as e: + pytest.fail(f"An unexpected error occurred: {e}") + +# Test for QKD Services +def test_retrieve_services(qkd_driver): + qkd_driver.Connect() + services = qkd_driver.GetConfig([RESOURCE_ENDPOINTS]) + assert isinstance(services, list), "Expected a list of services" + + if not services: + pytest.skip("No services found in the system. Skipping service test.") + + for service in services: + assert isinstance(service, tuple), "Each service entry must be a tuple" + assert isinstance(service[1], dict), "Service data must be a dictionary" + if isinstance(service[1], Exception): + pytest.fail(f"Error retrieving services: {service[1]}") + + print("Services:", json.dumps(services, indent=2)) + +# Test ID: INT_LQ_Test_07 (QKD Applications Retrieval) +def test_retrieve_applications(qkd_driver): + qkd_driver.Connect() + + # Retrieve and validate applications information + applications = qkd_driver.GetConfig([RESOURCE_APPS]) # Adjust to fetch applications using the correct key + assert isinstance(applications, list), "Expected a list of applications" + + if not applications: + pytest.skip("No applications found in the system. Skipping applications test.") + + for app in applications: + assert isinstance(app, tuple), "Each application entry must be a tuple" + assert isinstance(app[1], dict), "Application data must be a dictionary" + if isinstance(app[1], Exception): + pytest.fail(f"Error retrieving applications: {app[1]}") + + # Output for debugging + print_data("Applications", applications) + +# Test ID: INT_LQ_Test_03 (QKD Interfaces Retrieval) +def test_retrieve_interfaces(qkd_driver): + qkd_driver.Connect() + + # Retrieve and validate interface information + interfaces = qkd_driver.GetConfig([RESOURCE_INTERFACES]) + + assert isinstance(interfaces, list), "Expected a list of interfaces" + assert len(interfaces) > 0, "No interfaces found in the system" + + for interface in interfaces: + assert isinstance(interface, tuple), "Each interface entry must be a tuple" + assert isinstance(interface[1], dict), "Interface data must be a dictionary" + if isinstance(interface[1], Exception): + pytest.fail(f"Error retrieving interfaces: {interface[1]}") + + # Output for debugging + print_data("Interfaces", interfaces) + +# Test ID: INT_LQ_Test_02 (QKD Capabilities Retrieval) +def test_retrieve_capabilities(qkd_driver): + qkd_driver.Connect() + + # Retrieve and validate capabilities information + capabilities = qkd_driver.GetConfig([RESOURCE_CAPABILITES]) + + assert isinstance(capabilities, list), "Expected a list of capabilities" + assert len(capabilities) > 0, "No capabilities found in the system" + + for capability in capabilities: + assert isinstance(capability, tuple), "Each capability entry must be a tuple" + assert isinstance(capability[1], dict), "Capability data must be a dictionary" + if isinstance(capability[1], Exception): + pytest.fail(f"Error retrieving capabilities: {capability[1]}") + + # Output for debugging + print_data("Capabilities", capabilities) + +# Test ID: INT_LQ_Test_03 (QKD Endpoints Retrieval) +def test_retrieve_endpoints(qkd_driver): + qkd_driver.Connect() + + # Retrieve and validate endpoint information + endpoints = qkd_driver.GetConfig([RESOURCE_ENDPOINTS]) + + assert isinstance(endpoints, list), "Expected a list of endpoints" + assert len(endpoints) > 0, "No endpoints found in the system" + + for endpoint in endpoints: + assert isinstance(endpoint, tuple), "Each endpoint entry must be a tuple" + assert isinstance(endpoint[1], dict), "Endpoint data must be a dictionary" + if isinstance(endpoint[1], Exception): + pytest.fail(f"Error retrieving endpoints: {endpoint[1]}") + + # Output for debugging + print_data("Endpoints", endpoints) diff --git a/src/device/tests/qkd/unit/test_qkd_error_hanling.py b/src/device/tests/qkd/unit/test_qkd_error_hanling.py new file mode 100644 index 0000000000000000000000000000000000000000..d93e3711136de496fd39365563032f827cfbe913 --- /dev/null +++ b/src/device/tests/qkd/unit/test_qkd_error_hanling.py @@ -0,0 +1,93 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import pytest, requests +from requests.exceptions import ConnectionError, HTTPError, Timeout +from device.service.drivers.qkd.QKDDriver2 import QKDDriver + +MOCK_QKD_ADDRRESS = '127.0.0.1' +MOCK_PORT = 11111 + +@pytest.fixture +def qkd_driver(): + # Initialize the QKD driver for testing + return QKDDriver(address=MOCK_QKD_ADDRRESS, port=MOCK_PORT, username='user', password='pass') + +def test_invalid_operations_on_network_links(qkd_driver): + """ + Test Case ID: SBI_Test_09 - Perform invalid operations and validate error handling. + Objective: Perform invalid operations on network links and ensure proper error handling and logging. + """ + qkd_driver.Connect() + + # Step 1: Perform invalid operation with an incorrect resource key + invalid_payload = { + "invalid_resource_key": { + "invalid_field": "invalid_value" + } + } + + try: + # Attempt to perform an invalid operation (simulate wrong resource key) + response = requests.post(f'http://{qkd_driver.address}/invalid_resource', json=invalid_payload) + response.raise_for_status() + + except HTTPError as e: + # Step 2: Validate proper error handling and user-friendly messages + print(f"Handled HTTPError: {e}") + assert e.response.status_code in [400, 404], "Expected 400 Bad Request or 404 Not Found for invalid operation." + if e.response.status_code == 404: + assert "Not Found" in e.response.text, "Expected user-friendly 'Not Found' message." + elif e.response.status_code == 400: + assert "Invalid resource key" in e.response.text, "Expected user-friendly 'Bad Request' message." + + except Exception as e: + # Log unexpected exceptions + pytest.fail(f"Unexpected error occurred: {e}") + + finally: + qkd_driver.Disconnect() + +def test_network_failure_simulation(qkd_driver): + """ + Test Case ID: SBI_Test_10 - Simulate network failures and validate resilience and recovery. + Objective: Simulate network failures (e.g., QKD node downtime) and validate system's resilience. + """ + qkd_driver.Connect() + + try: + # Step 1: Simulate network failure (disconnect QKD node, or use unreachable address/port) + qkd_driver_with_failure = QKDDriver(address='127.0.0.1', port=12345, username='user', password='pass') # Valid but incorrect port + + # Try to connect and retrieve state, expecting a failure + response = qkd_driver_with_failure.GetState() + + # Step 2: Validate resilience and recovery mechanisms + # Check if the response is empty, indicating a failure to retrieve state + if not response: + print("Network failure simulated successfully and handled.") + else: + pytest.fail("Expected network failure but received a valid response.") + + except HTTPError as e: + # Log HTTP errors as part of error handling + print(f"Handled network failure error: {e}") + + except Exception as e: + # Step 3: Log unexpected exceptions + print(f"Network failure encountered: {e}") + + finally: + # Step 4: Ensure driver disconnects properly + qkd_driver.Disconnect() diff --git a/src/device/tests/qkd/unit/test_qkd_mock_connectivity.py b/src/device/tests/qkd/unit/test_qkd_mock_connectivity.py new file mode 100644 index 0000000000000000000000000000000000000000..be9427d9b619423a61a3e6f5270d8aab76dc8955 --- /dev/null +++ b/src/device/tests/qkd/unit/test_qkd_mock_connectivity.py @@ -0,0 +1,41 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import pytest, requests +from unittest.mock import patch +from device.service.drivers.qkd.QKDDriver import QKDDriver + +MOCK_QKD_ADDRRESS = '127.0.0.1' +MOCK_PORT = 11111 + +@pytest.fixture +def qkd_driver(): + return QKDDriver(address=MOCK_QKD_ADDRRESS, port=MOCK_PORT, username='user', password='pass') + +# Deliverable Test ID: SBI_Test_01 +def test_qkd_driver_connection(qkd_driver): + assert qkd_driver.Connect() is True + +# Deliverable Test ID: SBI_Test_01 +def test_qkd_driver_invalid_connection(): + qkd_driver = QKDDriver(address='127.0.0.1', port=12345, username='user', password='pass') # Use invalid port directly + assert qkd_driver.Connect() is False + +# Deliverable Test ID: SBI_Test_10 +@patch('device.service.drivers.qkd.QKDDriver2.requests.get') +def test_qkd_driver_timeout_connection(mock_get, qkd_driver): + mock_get.side_effect = requests.exceptions.Timeout + qkd_driver.timeout = 0.001 # Simulate very short timeout + assert qkd_driver.Connect() is False + diff --git a/src/device/tests/qkd/unit/test_qkd_performance.py b/src/device/tests/qkd/unit/test_qkd_performance.py new file mode 100644 index 0000000000000000000000000000000000000000..b15d1ab070b61333c55f7674e39ba74aae891de6 --- /dev/null +++ b/src/device/tests/qkd/unit/test_qkd_performance.py @@ -0,0 +1,32 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# tests/unit/test_qkd_performance.py + +import pytest, time +from device.service.drivers.qkd.QKDDriver2 import QKDDriver + +MOCK_QKD_ADDRRESS = '127.0.0.1' +MOCK_PORT = 11111 + +def test_performance_under_load(): + driver = QKDDriver(address=MOCK_QKD_ADDRRESS, port=MOCK_PORT, username='user', password='pass') + driver.Connect() + + start_time = time.time() + for _ in range(1000): + driver.GetConfig(['/qkd_interfaces/qkd_interface']) + end_time = time.time() + + assert (end_time - start_time) < 60 diff --git a/src/device/tests/qkd/unit/test_qkd_security.py b/src/device/tests/qkd/unit/test_qkd_security.py new file mode 100644 index 0000000000000000000000000000000000000000..f2942fd4685dce13f89832528d4298b267707886 --- /dev/null +++ b/src/device/tests/qkd/unit/test_qkd_security.py @@ -0,0 +1,88 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import json +import os +import pytest +import requests +from requests.exceptions import HTTPError +from device.service.drivers.qkd.QKDDriver2 import QKDDriver +from device.service.drivers.qkd.Tools2 import RESOURCE_CAPABILITES + +# Helper function to print data in a formatted JSON style for debugging +def print_data(label, data): + print(f"{label}: {json.dumps(data, indent=2)}") + +# Environment variables for sensitive information +QKD1_ADDRESS = os.getenv("QKD1_ADDRESS") +MOCK_QKD_ADDRRESS = '127.0.0.1' +MOCK_PORT = 11111 +PORT = os.getenv("QKD_PORT") +USERNAME = os.getenv("QKD_USERNAME") +PASSWORD = os.getenv("QKD_PASSWORD") + + +# Utility function to retrieve JWT token +def get_jwt_token(address, port, username, password): + url = f"http://{address}:{port}/login" + headers = {"Content-Type": "application/x-www-form-urlencoded"} + payload = f"username={username}&password={password}" + + try: + response = requests.post(url, data=payload, headers=headers) + response.raise_for_status() + return response.json().get('access_token') + except requests.exceptions.RequestException as e: + print(f"Failed to retrieve JWT token: {e}") + return None + +# Real QKD Driver (Requires JWT token) +@pytest.fixture +def real_qkd_driver(): + token = get_jwt_token(QKD1_ADDRESS, PORT, USERNAME, PASSWORD) # Replace with actual details + if not token: + pytest.fail("Failed to retrieve JWT token.") + headers = {'Authorization': f'Bearer {token}'} + return QKDDriver(address=QKD1_ADDRESS, port=PORT, headers=headers) + +# Mock QKD Driver (No actual connection, mock capabilities) +@pytest.fixture +def mock_qkd_driver(): + # Initialize the mock QKD driver with mock settings + token = "mock_token" + headers = {"Authorization": f"Bearer {token}"} + return QKDDriver(address=MOCK_QKD_ADDRRESS, port=MOCK_PORT, headers=headers) + +# General function to retrieve and test capabilities +def retrieve_capabilities(qkd_driver, driver_name): + try: + qkd_driver.Connect() + capabilities = qkd_driver.GetConfig([RESOURCE_CAPABILITES]) + assert isinstance(capabilities, list), "Expected a list of capabilities" + assert len(capabilities) > 0, f"No capabilities found for {driver_name}" + print_data(f"{driver_name} Capabilities", capabilities) + except HTTPError as e: + pytest.fail(f"HTTPError while fetching capabilities for {driver_name}: {e}") + except AssertionError as e: + pytest.fail(f"AssertionError: {e}") + except Exception as e: + pytest.fail(f"An unexpected error occurred: {e}") + +# Test for Real QKD Capabilities +def test_real_qkd_capabilities(real_qkd_driver): + retrieve_capabilities(real_qkd_driver, "Real QKD") + +# Test for Mock QKD Capabilities +def test_mock_qkd_capabilities(mock_qkd_driver): + retrieve_capabilities(mock_qkd_driver, "Mock QKD") diff --git a/src/device/tests/qkd/unit/test_qkd_subscription.py b/src/device/tests/qkd/unit/test_qkd_subscription.py new file mode 100644 index 0000000000000000000000000000000000000000..883fe2a1a6defe85a995c12e824a5e7d88159981 --- /dev/null +++ b/src/device/tests/qkd/unit/test_qkd_subscription.py @@ -0,0 +1,53 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import pytest +from typing import List, Tuple +from device.service.drivers.qkd.QKDDriver2 import QKDDriver + +MOCK_QKD_ADDRRESS = '127.0.0.1' +MOCK_PORT = 11111 + + +@pytest.fixture +def qkd_driver(): + # Initialize the QKD driver + return QKDDriver(address=MOCK_QKD_ADDRRESS, port=MOCK_PORT, username='user', password='pass') + + +def test_state_subscription(qkd_driver): + """ + Test Case ID: SBI_Test_06 - Subscribe to state changes and validate the subscription process. + """ + qkd_driver.Connect() + + try: + # Step 1: Define the subscription + subscriptions = [ + ('00000001-0000-0000-0000-000000000000', 60, 10) # (node_id, frequency, timeout) + ] + + # Step 2: Subscribe to state changes using the driver method + subscription_results = qkd_driver.SubscribeState(subscriptions) + + # Step 3: Validate that the subscription was successful + assert all(result is True for result in subscription_results), "Subscription to state changes failed." + + print("State subscription successful:", subscription_results) + + except Exception as e: + pytest.fail(f"An unexpected error occurred during state subscription: {e}") + + finally: + qkd_driver.Disconnect() diff --git a/src/device/tests/qkd/unit/test_qkd_unsubscription.py b/src/device/tests/qkd/unit/test_qkd_unsubscription.py new file mode 100644 index 0000000000000000000000000000000000000000..883fe2a1a6defe85a995c12e824a5e7d88159981 --- /dev/null +++ b/src/device/tests/qkd/unit/test_qkd_unsubscription.py @@ -0,0 +1,53 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import pytest +from typing import List, Tuple +from device.service.drivers.qkd.QKDDriver2 import QKDDriver + +MOCK_QKD_ADDRRESS = '127.0.0.1' +MOCK_PORT = 11111 + + +@pytest.fixture +def qkd_driver(): + # Initialize the QKD driver + return QKDDriver(address=MOCK_QKD_ADDRRESS, port=MOCK_PORT, username='user', password='pass') + + +def test_state_subscription(qkd_driver): + """ + Test Case ID: SBI_Test_06 - Subscribe to state changes and validate the subscription process. + """ + qkd_driver.Connect() + + try: + # Step 1: Define the subscription + subscriptions = [ + ('00000001-0000-0000-0000-000000000000', 60, 10) # (node_id, frequency, timeout) + ] + + # Step 2: Subscribe to state changes using the driver method + subscription_results = qkd_driver.SubscribeState(subscriptions) + + # Step 3: Validate that the subscription was successful + assert all(result is True for result in subscription_results), "Subscription to state changes failed." + + print("State subscription successful:", subscription_results) + + except Exception as e: + pytest.fail(f"An unexpected error occurred during state subscription: {e}") + + finally: + qkd_driver.Disconnect() diff --git a/src/device/tests/qkd/unit/test_set_new_configuration.py b/src/device/tests/qkd/unit/test_set_new_configuration.py new file mode 100644 index 0000000000000000000000000000000000000000..438e46d74f0ad1204f496aaf99e29e21f41c5805 --- /dev/null +++ b/src/device/tests/qkd/unit/test_set_new_configuration.py @@ -0,0 +1,126 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import pytest, requests, uuid +from requests.exceptions import HTTPError +from device.service.drivers.qkd.QKDDriver2 import QKDDriver +from device.service.drivers.qkd.Tools2 import RESOURCE_APPS + +MOCK_QKD1_ADDRRESS = '127.0.0.1' +MOCK_PORT1 = 11111 +MOCK_QKD3_ADDRRESS = '127.0.0.1' +MOCK_PORT3 = 33333 + +@pytest.fixture +def qkd_driver1(): + # Initialize the QKD driver for QKD1 + return QKDDriver(address=MOCK_QKD1_ADDRRESS, port=MOCK_PORT1, username='user', password='pass') + +@pytest.fixture +def qkd_driver3(): + # Initialize the QKD driver for QKD3 + return QKDDriver(address=MOCK_QKD3_ADDRRESS, port=MOCK_PORT3, username='user', password='pass') + +def create_qkd_app(driver, qkdn_id, backing_qkdl_id, client_app_id=None): + """ + Helper function to create QKD applications on the given driver. + """ + server_app_id = str(uuid.uuid4()) # Generate a unique server_app_id + + app_payload = { + 'app': { + 'server_app_id': server_app_id, + 'client_app_id': client_app_id if client_app_id else [], # Add client_app_id if provided + 'app_status': 'ON', + 'local_qkdn_id': qkdn_id, + 'backing_qkdl_id': backing_qkdl_id + } + } + + try: + # Log the payload being sent + print(f"Sending payload to {driver.address}: {app_payload}") + + # Send POST request to create the application + response = requests.post(f'http://{driver.address}/app/create_qkd_app', json=app_payload) + + # Check if the request was successful (HTTP 2xx) + response.raise_for_status() + + # Validate the response + assert response.status_code == 200, f"Failed to create QKD app for {driver.address}: {response.text}" + + response_data = response.json() + assert response_data.get('status') == 'success', "Application creation failed." + + # Log the response from the server + print(f"Server {driver.address} response: {response_data}") + + return server_app_id # Return the created server_app_id + + except HTTPError as e: + pytest.fail(f"HTTP error occurred while creating the QKD application on {driver.address}: {e}") + except Exception as e: + pytest.fail(f"An unexpected error occurred: {e}") + +def test_create_qkd_application_bidirectional(qkd_driver1, qkd_driver3): + """ + Create QKD applications on both qkd1 and qkd3, and validate the complete creation in both directions. + """ + + qkd_driver1.Connect() + qkd_driver3.Connect() + + try: + # Step 1: Create QKD application for qkd1, referencing qkd3 as the backing QKDL + server_app_id_qkd1 = create_qkd_app( + qkd_driver1, + qkdn_id='00000001-0000-0000-0000-000000000000', + backing_qkdl_id=['00000003-0002-0000-0000-000000000000'] # qkd3's QKDL + ) + + # Step 2: Create QKD application for qkd3, referencing qkd1 as the backing QKDL, and setting client_app_id to qkd1's app + create_qkd_app( + qkd_driver3, + qkdn_id='00000003-0000-0000-0000-000000000000', + backing_qkdl_id=['00000003-0002-0000-0000-000000000000'], # qkd3's QKDL + client_app_id=[server_app_id_qkd1] # Set qkd1 as the client + ) + + # Step 3: Fetch applications from both qkd1 and qkd3 to validate that the applications exist + apps_qkd1 = qkd_driver1.GetConfig([RESOURCE_APPS]) + apps_qkd3 = qkd_driver3.GetConfig([RESOURCE_APPS]) + + print(f"QKD1 applications config: {apps_qkd1}") + print(f"QKD3 applications config: {apps_qkd3}") + + # Debugging: Print the full structure of the apps to understand what is returned + for app in apps_qkd1: + print(f"QKD1 App: {app}") + + # Debugging: Print the full structure of the apps to understand what is returned + for app in apps_qkd3: + print(f"QKD3 App: {app}") + + # Step 4: Validate the applications are created using app_id instead of server_app_id + assert any(app[1].get('app_id') == '00000001-0001-0000-0000-000000000000' for app in apps_qkd1), "QKD app not created on qkd1." + assert any(app[1].get('app_id') == '00000003-0001-0000-0000-000000000000' for app in apps_qkd3), "QKD app not created on qkd3." + + print("QKD applications created successfully in both directions.") + + except Exception as e: + pytest.fail(f"An unexpected error occurred: {e}") + finally: + qkd_driver1.Disconnect() + qkd_driver3.Disconnect() diff --git a/src/dlt/connector/client/DltConnectorClientAsync.py b/src/dlt/connector/client/DltConnectorClientAsync.py new file mode 100644 index 0000000000000000000000000000000000000000..b9ed8a4d6e1f3878ad148cac5529bd6908a03a24 --- /dev/null +++ b/src/dlt/connector/client/DltConnectorClientAsync.py @@ -0,0 +1,113 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import grpc, logging, asyncio + +from common.Constants import ServiceNameEnum +from common.Settings import get_service_host, get_service_port_grpc +from common.proto.context_pb2 import Empty, TopologyId +from common.proto.dlt_connector_pb2 import DltDeviceId, DltLinkId, DltServiceId, DltSliceId +from common.proto.dlt_connector_pb2_grpc import DltConnectorServiceStub +from common.tools.client.RetryDecorator import retry, delay_exponential +from common.tools.grpc.Tools import grpc_message_to_json_string + +LOGGER = logging.getLogger(__name__) +MAX_RETRIES = 15 +DELAY_FUNCTION = delay_exponential(initial=0.01, increment=2.0, maximum=5.0) +RETRY_DECORATOR = retry(max_retries=MAX_RETRIES, delay_function=DELAY_FUNCTION, prepare_method_name='connect') + +class DltConnectorClientAsync: + def __init__(self, host=None, port=None): + if not host: host = get_service_host(ServiceNameEnum.DLT) + if not port: port = get_service_port_grpc(ServiceNameEnum.DLT) + self.endpoint = '{:s}:{:s}'.format(str(host), str(port)) + LOGGER.debug('Creating channel to {:s}...'.format(self.endpoint)) + self.channel = None + self.stub = None + #self.connect() + #LOGGER.debug('Channel created') + + async def connect(self): + self.channel = grpc.aio.insecure_channel(self.endpoint) + self.stub = DltConnectorServiceStub(self.channel) + LOGGER.debug('Channel created') + + async def close(self): + if self.channel is not None: + await self.channel.close() + self.channel = None + self.stub = None + + @RETRY_DECORATOR + async def RecordAll(self, request: TopologyId) -> Empty: + LOGGER.debug('RecordAll request: {:s}'.format(grpc_message_to_json_string(request))) + response = await self.stub.RecordAll(request) + LOGGER.debug('RecordAll result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + @RETRY_DECORATOR + async def RecordAllDevices(self, request: TopologyId) -> Empty: + LOGGER.debug('RecordAllDevices request: {:s}'.format(grpc_message_to_json_string(request))) + response = await self.stub.RecordAllDevices(request) + LOGGER.debug('RecordAllDevices result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + @RETRY_DECORATOR + async def RecordDevice(self, request: DltDeviceId) -> Empty: + LOGGER.debug('RECORD_DEVICE request: {:s}'.format(grpc_message_to_json_string(request))) + response = await self.stub.RecordDevice(request) + LOGGER.debug('RecordDevice result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + @RETRY_DECORATOR + async def RecordAllLinks(self, request: TopologyId) -> Empty: + LOGGER.debug('RecordAllLinks request: {:s}'.format(grpc_message_to_json_string(request))) + response = await self.stub.RecordAllLinks(request) + LOGGER.debug('RecordAllLinks result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + @RETRY_DECORATOR + async def RecordLink(self, request: DltLinkId) -> Empty: + LOGGER.debug('RecordLink request: {:s}'.format(grpc_message_to_json_string(request))) + response = await self.stub.RecordLink(request) + LOGGER.debug('RecordLink result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + @RETRY_DECORATOR + async def RecordAllServices(self, request: TopologyId) -> Empty: + LOGGER.debug('RecordAllServices request: {:s}'.format(grpc_message_to_json_string(request))) + response = await self.stub.RecordAllServices(request) + LOGGER.debug('RecordAllServices result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + @RETRY_DECORATOR + async def RecordService(self, request: DltServiceId) -> Empty: + LOGGER.debug('RecordService request: {:s}'.format(grpc_message_to_json_string(request))) + response = await self.stub.RecordService(request) + LOGGER.debug('RecordService result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + @RETRY_DECORATOR + async def RecordAllSlices(self, request: TopologyId) -> Empty: + LOGGER.debug('RecordAllSlices request: {:s}'.format(grpc_message_to_json_string(request))) + response = await self.stub.RecordAllSlices(request) + LOGGER.debug('RecordAllSlices result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + @RETRY_DECORATOR + async def RecordSlice(self, request: DltSliceId) -> Empty: + LOGGER.debug('RecordSlice request: {:s}'.format(grpc_message_to_json_string(request))) + response = await self.stub.RecordSlice(request) + LOGGER.debug('RecordSlice result: {:s}'.format(grpc_message_to_json_string(response))) + return response diff --git a/src/dlt/connector/client/DltEventsCollector.py b/src/dlt/connector/client/DltEventsCollector.py index e59784a4d2902459d7bc88925e5b83a698770012..ce7d01480ba522a4006ca5d7b02943a157a10d29 100644 --- a/src/dlt/connector/client/DltEventsCollector.py +++ b/src/dlt/connector/client/DltEventsCollector.py @@ -19,7 +19,6 @@ from common.tools.grpc.Tools import grpc_message_to_json_string from dlt.connector.client.DltGatewayClient import DltGatewayClient LOGGER = logging.getLogger(__name__) -LOGGER.setLevel(logging.DEBUG) # This class accepts an event_handler method as attribute that can be used to pre-process and # filter events before they reach the events_queue. Depending on the handler, the supported diff --git a/src/dlt/connector/client/DltGatewayClient.py b/src/dlt/connector/client/DltGatewayClient.py index 31ad4cca22d087f1a8d3d9ce573a6605adf3c1df..21d4df57dd5eaa72eddc147b83b6a66344e20f02 100644 --- a/src/dlt/connector/client/DltGatewayClient.py +++ b/src/dlt/connector/client/DltGatewayClient.py @@ -12,11 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -from typing import Iterator + import grpc, logging +from typing import Iterator from common.proto.context_pb2 import Empty, TeraFlowController from common.proto.dlt_gateway_pb2 import ( - DltPeerStatus, DltPeerStatusList, DltRecord, DltRecordEvent, DltRecordId, DltRecordStatus, DltRecordSubscription) + DltPeerStatus, DltPeerStatusList, DltRecord, DltRecordEvent, DltRecordId, DltRecordStatus, DltRecordSubscription +) from common.proto.dlt_gateway_pb2_grpc import DltGatewayServiceStub from common.tools.client.RetryDecorator import retry, delay_exponential from common.tools.grpc.Tools import grpc_message_to_json_string @@ -43,7 +45,8 @@ class DltGatewayClient: self.stub = DltGatewayServiceStub(self.channel) def close(self): - if self.channel is not None: self.channel.close() + if self.channel is not None: + self.channel.close() self.channel = None self.stub = None diff --git a/src/dlt/connector/client/DltGatewayClientAsync.py b/src/dlt/connector/client/DltGatewayClientAsync.py new file mode 100644 index 0000000000000000000000000000000000000000..816241ec587295ffd6a8ef24cca5c66942a849d5 --- /dev/null +++ b/src/dlt/connector/client/DltGatewayClientAsync.py @@ -0,0 +1,85 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import asyncio, grpc, logging +from typing import Iterator, List +from common.proto.context_pb2 import Empty, TeraFlowController +from common.proto.dlt_gateway_pb2 import ( + DltPeerStatus, DltPeerStatusList, DltRecord, DltRecordEvent, DltRecordId, DltRecordStatus, DltRecordSubscription +) +from common.proto.dlt_gateway_pb2_grpc import DltGatewayServiceStub +from common.tools.client.RetryDecorator import retry, delay_exponential +from common.tools.grpc.Tools import grpc_message_to_json_string +from dlt.connector.Config import DLT_GATEWAY_HOST, DLT_GATEWAY_PORT + +LOGGER = logging.getLogger(__name__) +MAX_RETRIES = 15 +DELAY_FUNCTION = delay_exponential(initial=0.01, increment=2.0, maximum=5.0) +RETRY_DECORATOR = retry(max_retries=MAX_RETRIES, delay_function=DELAY_FUNCTION, prepare_method_name='connect') + +class DltGatewayClientAsync: + def __init__(self, host=None, port=None): + if not host: host = DLT_GATEWAY_HOST + if not port: port = DLT_GATEWAY_PORT + self.endpoint = '{:s}:{:s}'.format(str(host), str(port)) + LOGGER.debug('Creating channel to {:s}...'.format(self.endpoint)) + self.channel = None + self.stub = None + self.message_queue: List[DltRecord] = [] + + async def connect(self): + self.channel = grpc.aio.insecure_channel(self.endpoint) + self.stub = DltGatewayServiceStub(self.channel) + LOGGER.debug('Channel created') + + async def close(self): + if self.channel is not None: + await self.channel.close() + self.channel = None + self.stub = None + + @RETRY_DECORATOR + async def RecordToDlt(self, request : DltRecord) -> DltRecordStatus: + LOGGER.debug('RecordToDlt request: {:s}'.format(grpc_message_to_json_string(request))) + response = await self.stub.RecordToDlt(request) + LOGGER.debug('RecordToDlt result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + @RETRY_DECORATOR + async def GetFromDlt(self, request : DltRecordId) -> DltRecord: + LOGGER.debug('GetFromDlt request: {:s}'.format(grpc_message_to_json_string(request))) + response = await self.stub.GetFromDlt(request) + LOGGER.debug('GetFromDlt result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + @RETRY_DECORATOR + def SubscribeToDlt(self, request : DltRecordSubscription) -> Iterator[DltRecordEvent]: + LOGGER.debug('SubscribeToDlt request: {:s}'.format(grpc_message_to_json_string(request))) + response = self.stub.SubscribeToDlt(request) + LOGGER.debug('SubscribeToDlt result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + @RETRY_DECORATOR + async def GetDltStatus(self, request : TeraFlowController) -> DltPeerStatus: + LOGGER.debug('GetDltStatus request: {:s}'.format(grpc_message_to_json_string(request))) + response = await self.stub.GetDltStatus(request) + LOGGER.debug('GetDltStatus result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + @RETRY_DECORATOR + async def GetDltPeers(self, request : Empty) -> DltPeerStatusList: + LOGGER.debug('GetDltPeers request: {:s}'.format(grpc_message_to_json_string(request))) + response = await self.stub.GetDltPeers(request) + LOGGER.debug('GetDltPeers result: {:s}'.format(grpc_message_to_json_string(response))) + return response diff --git a/src/dlt/connector/service/DltConnectorService.py b/src/dlt/connector/service/DltConnectorService.py index 7e99cb8f85e519ec875a1decc7dc0ad1e030a6f4..601d3e70d298d8ae2a098339e71fc49d66fb79ad 100644 --- a/src/dlt/connector/service/DltConnectorService.py +++ b/src/dlt/connector/service/DltConnectorService.py @@ -14,15 +14,16 @@ from common.Constants import ServiceNameEnum from common.Settings import get_service_port_grpc -from common.tools.service.GenericGrpcService import GenericGrpcService +from common.tools.service.GenericGrpcServiceAsync import GenericGrpcServiceAsync from common.proto.dlt_connector_pb2_grpc import add_DltConnectorServiceServicer_to_server from .DltConnectorServiceServicerImpl import DltConnectorServiceServicerImpl -class DltConnectorService(GenericGrpcService): +class DltConnectorService(GenericGrpcServiceAsync): def __init__(self, cls_name: str = __name__) -> None: port = get_service_port_grpc(ServiceNameEnum.DLT) super().__init__(port, cls_name=cls_name) self.dltconnector_servicer = DltConnectorServiceServicerImpl() - def install_servicers(self): - add_DltConnectorServiceServicer_to_server(self.dltconnector_servicer, self.server) + async def install_servicers(self): + await self.dltconnector_servicer.initialize() + add_DltConnectorServiceServicer_to_server(self.dltconnector_servicer, self.server) \ No newline at end of file diff --git a/src/dlt/connector/service/DltConnectorServiceServicerImpl.py b/src/dlt/connector/service/DltConnectorServiceServicerImpl.py index 42e86b102d3715d68f198d5e341a6f663f35ef4b..c1a4b7b1ea2f978e798d77bfe05cfa3f245283ce 100644 --- a/src/dlt/connector/service/DltConnectorServiceServicerImpl.py +++ b/src/dlt/connector/service/DltConnectorServiceServicerImpl.py @@ -12,16 +12,17 @@ # See the License for the specific language governing permissions and # limitations under the License. -import grpc, logging +import logging +from grpc.aio import ServicerContext from typing import Optional -from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method +from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method_async from common.proto.context_pb2 import Empty, TopologyId from common.proto.dlt_connector_pb2 import DltDeviceId, DltLinkId, DltServiceId, DltSliceId from common.proto.dlt_connector_pb2_grpc import DltConnectorServiceServicer from common.proto.dlt_gateway_pb2 import DltRecord, DltRecordId, DltRecordOperationEnum, DltRecordTypeEnum from common.tools.grpc.Tools import grpc_message_to_json_string from context.client.ContextClient import ContextClient -from dlt.connector.client.DltGatewayClient import DltGatewayClient +from dlt.connector.client.DltGatewayClientAsync import DltGatewayClientAsync from .tools.Checkers import record_exists LOGGER = logging.getLogger(__name__) @@ -31,86 +32,91 @@ METRICS_POOL = MetricsPool('DltConnector', 'RPC') class DltConnectorServiceServicerImpl(DltConnectorServiceServicer): def __init__(self): LOGGER.debug('Creating Servicer...') + self.dltgateway_client = DltGatewayClientAsync() LOGGER.debug('Servicer Created') - @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) - def RecordAll(self, request : TopologyId, context : grpc.ServicerContext) -> Empty: + async def initialize(self): + await self.dltgateway_client.connect() + + @safe_and_metered_rpc_method_async(METRICS_POOL, LOGGER) + async def RecordAll(self, request : TopologyId, context : ServicerContext) -> Empty: return Empty() - @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) - def RecordAllDevices(self, request : TopologyId, context : grpc.ServicerContext) -> Empty: + @safe_and_metered_rpc_method_async(METRICS_POOL, LOGGER) + async def RecordAllDevices(self, request : TopologyId, context : ServicerContext) -> Empty: return Empty() - @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) - def RecordDevice(self, request : DltDeviceId, context : grpc.ServicerContext) -> Empty: + @safe_and_metered_rpc_method_async(METRICS_POOL, LOGGER) + async def RecordDevice(self, request : DltDeviceId, context : ServicerContext) -> Empty: data_json = None - if not request.delete: + LOGGER.debug('RECORD_DEVICE = {:s}'.format(grpc_message_to_json_string(request))) + if not request.delete: context_client = ContextClient() device = context_client.GetDevice(request.device_id) data_json = grpc_message_to_json_string(device) - self._record_entity( + await self._record_entity( request.topology_id.topology_uuid.uuid, DltRecordTypeEnum.DLTRECORDTYPE_DEVICE, request.device_id.device_uuid.uuid, request.delete, data_json) return Empty() - @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) - def RecordAllLinks(self, request : TopologyId, context : grpc.ServicerContext) -> Empty: + @safe_and_metered_rpc_method_async(METRICS_POOL, LOGGER) + async def RecordAllLinks(self, request : TopologyId, context : ServicerContext) -> Empty: return Empty() - @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) - def RecordLink(self, request : DltLinkId, context : grpc.ServicerContext) -> Empty: + @safe_and_metered_rpc_method_async(METRICS_POOL, LOGGER) + async def RecordLink(self, request : DltLinkId, context : ServicerContext) -> Empty: data_json = None + LOGGER.debug('RECORD_LINK = {:s}'.format(grpc_message_to_json_string(request))) + if not request.delete: context_client = ContextClient() link = context_client.GetLink(request.link_id) data_json = grpc_message_to_json_string(link) - self._record_entity( + await self._record_entity( request.topology_id.topology_uuid.uuid, DltRecordTypeEnum.DLTRECORDTYPE_LINK, request.link_id.link_uuid.uuid, request.delete, data_json) return Empty() - @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) - def RecordAllServices(self, request : TopologyId, context : grpc.ServicerContext) -> Empty: + @safe_and_metered_rpc_method_async(METRICS_POOL, LOGGER) + async def RecordAllServices(self, request : TopologyId, context : ServicerContext) -> Empty: return Empty() - @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) - def RecordService(self, request : DltServiceId, context : grpc.ServicerContext) -> Empty: + @safe_and_metered_rpc_method_async(METRICS_POOL, LOGGER) + async def RecordService(self, request : DltServiceId, context : ServicerContext) -> Empty: data_json = None if not request.delete: context_client = ContextClient() service = context_client.GetService(request.service_id) data_json = grpc_message_to_json_string(service) - self._record_entity( + await self._record_entity( request.topology_id.topology_uuid.uuid, DltRecordTypeEnum.DLTRECORDTYPE_SERVICE, request.service_id.service_uuid.uuid, request.delete, data_json) return Empty() - @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) - def RecordAllSlices(self, request : TopologyId, context : grpc.ServicerContext) -> Empty: + @safe_and_metered_rpc_method_async(METRICS_POOL, LOGGER) + async def RecordAllSlices(self, request : TopologyId, context : ServicerContext) -> Empty: return Empty() - @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) - def RecordSlice(self, request : DltSliceId, context : grpc.ServicerContext) -> Empty: + @safe_and_metered_rpc_method_async(METRICS_POOL, LOGGER) + async def RecordSlice(self, request : DltSliceId, context : ServicerContext) -> Empty: data_json = None if not request.delete: context_client = ContextClient() slice_ = context_client.GetSlice(request.slice_id) data_json = grpc_message_to_json_string(slice_) - self._record_entity( + await self._record_entity( request.topology_id.topology_uuid.uuid, DltRecordTypeEnum.DLTRECORDTYPE_SLICE, request.slice_id.slice_uuid.uuid, request.delete, data_json) return Empty() - def _record_entity( + async def _record_entity( self, dlt_domain_uuid : str, dlt_record_type : DltRecordTypeEnum, dlt_record_uuid : str, delete : bool, data_json : Optional[str] = None ) -> None: - dltgateway_client = DltGatewayClient() - dlt_record_id = DltRecordId() dlt_record_id.domain_uuid.uuid = dlt_domain_uuid # pylint: disable=no-member dlt_record_id.type = dlt_record_type @@ -118,7 +124,7 @@ class DltConnectorServiceServicerImpl(DltConnectorServiceServicer): str_dlt_record_id = grpc_message_to_json_string(dlt_record_id) LOGGER.debug('[_record_entity] sent dlt_record_id = {:s}'.format(str_dlt_record_id)) - dlt_record = dltgateway_client.GetFromDlt(dlt_record_id) + dlt_record = await self.dltgateway_client.GetFromDlt(dlt_record_id) str_dlt_record = grpc_message_to_json_string(dlt_record) LOGGER.debug('[_record_entity] recv dlt_record = {:s}'.format(str_dlt_record)) @@ -131,17 +137,19 @@ class DltConnectorServiceServicerImpl(DltConnectorServiceServicer): dlt_record.operation = DltRecordOperationEnum.DLTRECORDOPERATION_DELETE elif not delete and exists: dlt_record.operation = DltRecordOperationEnum.DLTRECORDOPERATION_UPDATE - if data_json is None: raise Exception('data_json must be provided when updating') + if data_json is None: + raise Exception('data_json must be provided when updating') dlt_record.data_json = data_json elif not delete and not exists: dlt_record.operation = DltRecordOperationEnum.DLTRECORDOPERATION_ADD - if data_json is None: raise Exception('data_json must be provided when adding') + if data_json is None: + raise Exception('data_json must be provided when adding') dlt_record.data_json = data_json else: return str_dlt_record = grpc_message_to_json_string(dlt_record) LOGGER.debug('[_record_entity] sent dlt_record = {:s}'.format(str_dlt_record)) - dlt_record_status = dltgateway_client.RecordToDlt(dlt_record) + dlt_record_status = await self.dltgateway_client.RecordToDlt(dlt_record) str_dlt_record_status = grpc_message_to_json_string(dlt_record_status) LOGGER.debug('[_record_entity] recv dlt_record_status = {:s}'.format(str_dlt_record_status)) diff --git a/src/dlt/connector/service/__main__.py b/src/dlt/connector/service/__main__.py index 5e0fb6f878dca4e244274632e8931bc25a4f1319..d1c9461247176f4f8d2849fb4cd594072d2c3a55 100644 --- a/src/dlt/connector/service/__main__.py +++ b/src/dlt/connector/service/__main__.py @@ -12,7 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging, signal, sys, threading + +import logging, signal, threading, asyncio +from typing import Optional from prometheus_client import start_http_server from common.Constants import ServiceNameEnum from common.Settings import ( @@ -22,13 +24,13 @@ from .event_dispatcher.DltEventDispatcher import DltEventDispatcher from .DltConnectorService import DltConnectorService terminate = threading.Event() -LOGGER : logging.Logger = None +LOGGER : Optional[logging.Logger] = None def signal_handler(signal, frame): # pylint: disable=redefined-outer-name LOGGER.warning('Terminate signal received') terminate.set() -def main(): +async def main(): global LOGGER # pylint: disable=global-statement log_level = get_log_level() @@ -55,13 +57,14 @@ def main(): # Starting DLT connector service grpc_service = DltConnectorService() - grpc_service.start() + await grpc_service.start() # Wait for Ctrl+C or termination signal - while not terminate.wait(timeout=1.0): pass + while not terminate.is_set(): + await asyncio.sleep(1.0) LOGGER.info('Terminating...') - grpc_service.stop() + await grpc_service.stop() event_dispatcher.stop() event_dispatcher.join() @@ -69,4 +72,4 @@ def main(): return 0 if __name__ == '__main__': - sys.exit(main()) + asyncio.run(main()) diff --git a/src/dlt/connector/service/tools/Checkers.py b/src/dlt/connector/service/tools/Checkers.py index 6ad0f4b82626740c594829831b08fcefbc15096d..5b19afcd24171767c9b1130c8cb9d594b5afa5bf 100644 --- a/src/dlt/connector/service/tools/Checkers.py +++ b/src/dlt/connector/service/tools/Checkers.py @@ -20,5 +20,5 @@ def record_exists(record : DltRecord) -> bool: exists = exists and (record.record_id.type != DLTRECORDTYPE_UNDEFINED) exists = exists and (len(record.record_id.record_uuid.uuid) > 0) #exists = exists and (record.operation != DLTRECORDOPERATION_UNDEFINED) - exists = exists and (len(record.data_json) > 0) + #exists = exists and (len(record.data_json) > 0) # It conflicts as sometimes records do not have a data_json. return exists diff --git a/src/dlt/connector/tests/basic.py b/src/dlt/connector/tests/basic.py index da400dcbeed261578929262a6cc0bcc29dc5390e..08c5980889d66318b2221f6c62ff7918f05d1efc 100644 --- a/src/dlt/connector/tests/basic.py +++ b/src/dlt/connector/tests/basic.py @@ -17,12 +17,12 @@ # PYTHONPATH=/home/cttc/teraflow/src python -m dlt.connector.tests.basic import logging, sys, time +from common.proto.context_pb2 import DEVICEOPERATIONALSTATUS_ENABLED, Device from common.proto.dlt_gateway_pb2 import ( DLTRECORDOPERATION_ADD, DLTRECORDOPERATION_UNDEFINED, DLTRECORDOPERATION_UPDATE, DLTRECORDTYPE_DEVICE, DLTRECORDTYPE_UNDEFINED, DltRecord, DltRecordId) from common.tools.object_factory.Device import json_device from common.tools.grpc.Tools import grpc_message_to_json_string -from src.common.proto.context_pb2 import DEVICEOPERATIONALSTATUS_ENABLED, Device from ..client.DltGatewayClient import DltGatewayClient from ..client.DltEventsCollector import DltEventsCollector diff --git a/src/dlt/gateway/Dockerfile b/src/dlt/gateway/Dockerfile index 5b888b410360330cdf044c88f5832d1738d546e8..ace9cb22ee691efd7565120034a6a1ef36a27aaf 100644 --- a/src/dlt/gateway/Dockerfile +++ b/src/dlt/gateway/Dockerfile @@ -12,30 +12,34 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM zenika/kotlin:1.4-jdk12 +# Use an official Node.js runtime as a parent image +FROM node:20 -# Make working directory move to it and copy DLT Gateway code -RUN mkdir -p /var/teraflow/dlt/gateway -WORKDIR /var/teraflow/dlt/gateway -COPY src/dlt/gateway/. ./ +# Set the working directory in the container +WORKDIR /usr/dltApp -# Make directory for proto files and copy them -RUN mkdir proto -COPY proto/*.proto ./proto/ +# Create proto directory before copying the .proto files +RUN mkdir -p ./proto -# Build DLT Gateway -RUN ./gradlew build +# Copy package.json and package-lock.json +COPY src/dlt/gateway/dltApp/package*.json ./ +# Copy tsconfig.json +COPY src/dlt/gateway/dltApp/tsconfig*.json ./ +# Copy the proto folder contents +COPY proto/acl.proto ./proto/acl.proto +COPY proto/kpi_sample_types.proto ./proto/kpi_sample_types.proto +COPY proto/context.proto ./proto/context.proto +COPY proto/dlt_gateway.proto ./proto/dlt_gateway.proto + +# Copy the src folder +COPY src/dlt/gateway/dltApp/src/ ./src + +# Install dependencies +RUN npm install + +# Expose the port that the gRPC service runs on EXPOSE 50051 -# Create entrypoint.sh script -RUN echo "#!/bin/sh" > /entrypoint.sh -RUN echo "echo 195.37.154.24 peer0.org1.example.com >> /etc/hosts" >> /entrypoint.sh -RUN echo "echo 195.37.154.24 peer0.org2.example.com >> /etc/hosts" >> /entrypoint.sh -RUN echo "echo 195.37.154.24 orderer0.example.com >> /etc/hosts" >> /entrypoint.sh -RUN echo "cd /var/teraflow/dlt/gateway" >> /entrypoint.sh -RUN echo "./gradlew runServer" >> /entrypoint.sh -RUN chmod +x /entrypoint.sh - -# Gateway entry point -ENTRYPOINT ["sh", "/entrypoint.sh"] +# Command to run the service +CMD ["node", "src/dltGateway.js"] diff --git a/src/dlt/gateway/README.md b/src/dlt/gateway/README.md index 2cf6cfeb1682ade5a77f53fe13c96daed6dc33fd..4a38545eae7492e8ec5abac4fdf209da51b00aff 100644 --- a/src/dlt/gateway/README.md +++ b/src/dlt/gateway/README.md @@ -1,134 +1,35 @@ -``` - NEC Laboratories Europe GmbH - - PROPRIETARY INFORMATION - - The software and its source code contain valuable trade secrets and - shall be maintained in confidence and treated as confidential - information. The software may only be used for evaluation and/or - testing purposes, unless otherwise explicitly stated in a written - agreement with NEC Laboratories Europe GmbH. - - Any unauthorized publication, transfer to third parties or - duplication of the object or source code - either totally or in - part - is strictly prohibited. - - Copyright (c) 2022 NEC Laboratories Europe GmbH - All Rights Reserved. - - Authors: Konstantin Munichev <konstantin.munichev@neclab.eu> - - - NEC Laboratories Europe GmbH DISCLAIMS ALL WARRANTIES, EITHER - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES - OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND THE - WARRANTY AGAINST LATENT DEFECTS, WITH RESPECT TO THE PROGRAM AND - THE ACCOMPANYING DOCUMENTATION. - - NO LIABILITIES FOR CONSEQUENTIAL DAMAGES: IN NO EVENT SHALL NEC - Laboratories Europe GmbH or ANY OF ITS SUBSIDIARIES BE LIABLE FOR - ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR - LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF - INFORMATION, OR OTHER PECUNIARY LOSS AND INDIRECT, CONSEQUENTIAL, - INCIDENTAL, ECONOMIC OR PUNITIVE DAMAGES) ARISING OUT OF THE USE OF - OR INABILITY TO USE THIS PROGRAM, EVEN IF NEC Laboratories Europe - GmbH HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - - THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY. - ``` +# DLT Gateway -# DLT module guide +## Description -## General information -The DLT module is used to provide access to the underlying Fabric deployment. It allows clients -to add, retrieve, modify and delete blockchain-backed data, essentially working as a key-value -database. External clients should use gRPC API to communicate with this service, its detailed -description available below. +The DLT Gateway consists of a **fabricConnect.ts** TypeScript file, which contains the logic for identification +management (certificates required for the MSP), connection management to the blockchain, and finally, it exposes a +contract object with all the required information for interacting with the chaincode. The **fabricConnect.ts** is +coded following the Fabric Gateway API recommendations from Hyperledger Fabric 2.4+. The compiled **fabricConnect.ts** +logic is imported into a **dltGateway.js** file, which contains the gRPC logic for interaction with the TFS controller. +Testing code for various performance tests is included inside the [/tests](./tests/) folder. -## Code structure -The whole DLT module consists of several packages: -- fabric package -- http package -- proto package -- client example +The chaincode is written in Go, providing a reference for the operations that are recorded in the blockchain. This +chaincode must already be deployed in a working Hyperledger Fabric blockchain. -### Fabric package -The most important class in this package is `FabricConnector`. First, it establishes connection -with the underlying Fabric network using Java Gateway SDK. After that, it could be used as a -CRUD interface. -Other files contain auxiliary code for `FabricConnector` which allows it to register/enroll -users and to obtain smart contract instances. +## Requisites -### Grpc package -Contains server side gRPC handler. It accepts requests from the outside and performs the -requested operation. For the more detailed description see Proto package description right below. +* NodeJS +* Docker +* Kubernetes (K8s) + +Sign and TLS certificates, and private key of the MSP user from the Hyperledger Fabric deployment must be copied to the +[/keys](./keys/) directory inside this repository. -### Proto package -The proto package contains `dlt.proto` file which defines gRPC service `DltService` API and messages -it uses. There are 3 main functions: `RecordToDlt` which allows to create/modify/delete data, -`GetFromDlt` which returns already written data and `SubscribeToDlt` which allows clients subscribe -for future create/modify/delete events with provided filters. -Other proto files don't play any significant role and could be safely ignored by end users. +Example: -### Client example -This code is not necessary to the service, but it could be used to test the service. It contains -a sample gRPC client which connects the service and perform all the CRUD operations. +```bash +cp ~/fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/ca.crt src/dlt/gateway/keys/ -# Fabric deployment notes +cp ~/fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/signcerts/User1@org1.example.com-cert.pem src/dlt/gateway/keys/cert.pem -## General notes -Current Fabric deployment uses Fabric test network with some additional helping scripts on top of it. -To start the network just run the `raft.sh` from `blockchain/scripts` directory. Use `stop.sh` -when you need to stop the network. - -## Server start preparations -To run the server it's necessary to copy certificate file -`fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem` -to the config folder (replacing the existing one). Also, it's necessary to copy `scripts/connection-org1.json` -file (again, replacing the old one). After copying, it must be edited. First, all `localhost` entrances -should be replaced with `teraflow.nlehd.de`. Second, `channel` section at the end of the file should be removed. -This should be done after every restart of the Fabric network. - -## Fabric configuration -Even though a test network is easy to deploy and use it's better to perform a custom configuration -for a production deployment. In practice every participating organization will likely prefer to have -its own Peer/Orderer/CA instances to prevent possible dependency on any other participants. This leads -not only to a better privacy/availability/security in general but also to the more complicated -deployment process as a side effect. Here we provide a very brief description of the most important points. - -### Organizations -Organization represents a network participant, which can be an individual, a large corporation or any other -entity. Each organization has its own CAs, orderers and peers. The recommendation here is to create an -organization entity for every independent participant and then decide how many CAs/peers/orderers does -every organization need and which channels should it has access to based on the exact project's goals. - -### Channels -Each channel represents an independent ledger with its own genesis block. Each transaction is executed -on a specific channel, and it's possible to define which organization has access to a given channel. -As a result channels are a pretty powerful privacy mechanism which allows to limit access to the private -data between organization. - -### Certificate authorities, peers and orderers -Certificate authorities (CA) are used to generate crypto materials for each organization. Two types of CA -exist: one is used to generate the certificates of the admin, the MSP and certificates of non-admin users. -Another type of CA is used to generate TLS certificates. As a result it's preferable to have at least two -CAs for every organization. - -Peers are entities which host ledgers and smart contracts. They communicate with applications and orderers, -receiving chaincode invocations (proposals), invoking chaincode, updating ledger when necessary and -returning result of execution. Peers can handle one or many ledgers, depending on the configuration. It's -very use case specific how many peers are necessary to the exact deployment. - -Orderers are used to execute a consensus in a distributing network making sure that every channel participant -has the same blocks with the same data. The default consensus algorithm is Raft which provides only a crash -fault tolerance. - -### Conclusion -As you can see, configuration procedure for Fabric is pretty tricky and includes quite a lot of entities. -In real world it will very likely involve participants from multiple organizations each of them performing -its own part of configuration. +cp ~/fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/keystore/priv_sk src/dlt/gateway/keys/ +``` -As a further reading it's recommended to start with the -[official deployment guide](https://hyperledger-fabric.readthedocs.io/en/release-2.2/deployment_guide_overview.html). -It contains a high level overview of a deployment process as well as links to the detailed descriptions to -CA/Peer/Orderer configuration descriptions. \ No newline at end of file +These files are essential for establishing the identity and secure connection to the blockchain. Make sure you replace +the paths with your actual file locations from your Hyperledger Fabric deployment. diff --git a/src/dlt/gateway/.gitignore b/src/dlt/gateway/_legacy/.gitignore similarity index 100% rename from src/dlt/gateway/.gitignore rename to src/dlt/gateway/_legacy/.gitignore diff --git a/src/dlt/gateway/_legacy/Dockerfile b/src/dlt/gateway/_legacy/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..5b888b410360330cdf044c88f5832d1738d546e8 --- /dev/null +++ b/src/dlt/gateway/_legacy/Dockerfile @@ -0,0 +1,41 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM zenika/kotlin:1.4-jdk12 + +# Make working directory move to it and copy DLT Gateway code +RUN mkdir -p /var/teraflow/dlt/gateway +WORKDIR /var/teraflow/dlt/gateway +COPY src/dlt/gateway/. ./ + +# Make directory for proto files and copy them +RUN mkdir proto +COPY proto/*.proto ./proto/ + +# Build DLT Gateway +RUN ./gradlew build + +EXPOSE 50051 + +# Create entrypoint.sh script +RUN echo "#!/bin/sh" > /entrypoint.sh +RUN echo "echo 195.37.154.24 peer0.org1.example.com >> /etc/hosts" >> /entrypoint.sh +RUN echo "echo 195.37.154.24 peer0.org2.example.com >> /etc/hosts" >> /entrypoint.sh +RUN echo "echo 195.37.154.24 orderer0.example.com >> /etc/hosts" >> /entrypoint.sh +RUN echo "cd /var/teraflow/dlt/gateway" >> /entrypoint.sh +RUN echo "./gradlew runServer" >> /entrypoint.sh +RUN chmod +x /entrypoint.sh + +# Gateway entry point +ENTRYPOINT ["sh", "/entrypoint.sh"] diff --git a/src/dlt/gateway/_legacy/README.md b/src/dlt/gateway/_legacy/README.md new file mode 100644 index 0000000000000000000000000000000000000000..2cf6cfeb1682ade5a77f53fe13c96daed6dc33fd --- /dev/null +++ b/src/dlt/gateway/_legacy/README.md @@ -0,0 +1,134 @@ +``` + NEC Laboratories Europe GmbH + + PROPRIETARY INFORMATION + + The software and its source code contain valuable trade secrets and + shall be maintained in confidence and treated as confidential + information. The software may only be used for evaluation and/or + testing purposes, unless otherwise explicitly stated in a written + agreement with NEC Laboratories Europe GmbH. + + Any unauthorized publication, transfer to third parties or + duplication of the object or source code - either totally or in + part - is strictly prohibited. + + Copyright (c) 2022 NEC Laboratories Europe GmbH + All Rights Reserved. + + Authors: Konstantin Munichev <konstantin.munichev@neclab.eu> + + + NEC Laboratories Europe GmbH DISCLAIMS ALL WARRANTIES, EITHER + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND THE + WARRANTY AGAINST LATENT DEFECTS, WITH RESPECT TO THE PROGRAM AND + THE ACCOMPANYING DOCUMENTATION. + + NO LIABILITIES FOR CONSEQUENTIAL DAMAGES: IN NO EVENT SHALL NEC + Laboratories Europe GmbH or ANY OF ITS SUBSIDIARIES BE LIABLE FOR + ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR + LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF + INFORMATION, OR OTHER PECUNIARY LOSS AND INDIRECT, CONSEQUENTIAL, + INCIDENTAL, ECONOMIC OR PUNITIVE DAMAGES) ARISING OUT OF THE USE OF + OR INABILITY TO USE THIS PROGRAM, EVEN IF NEC Laboratories Europe + GmbH HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + + THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY. + ``` + +# DLT module guide + +## General information +The DLT module is used to provide access to the underlying Fabric deployment. It allows clients +to add, retrieve, modify and delete blockchain-backed data, essentially working as a key-value +database. External clients should use gRPC API to communicate with this service, its detailed +description available below. + +## Code structure +The whole DLT module consists of several packages: +- fabric package +- http package +- proto package +- client example + +### Fabric package +The most important class in this package is `FabricConnector`. First, it establishes connection +with the underlying Fabric network using Java Gateway SDK. After that, it could be used as a +CRUD interface. +Other files contain auxiliary code for `FabricConnector` which allows it to register/enroll +users and to obtain smart contract instances. + +### Grpc package +Contains server side gRPC handler. It accepts requests from the outside and performs the +requested operation. For the more detailed description see Proto package description right below. + +### Proto package +The proto package contains `dlt.proto` file which defines gRPC service `DltService` API and messages +it uses. There are 3 main functions: `RecordToDlt` which allows to create/modify/delete data, +`GetFromDlt` which returns already written data and `SubscribeToDlt` which allows clients subscribe +for future create/modify/delete events with provided filters. +Other proto files don't play any significant role and could be safely ignored by end users. + +### Client example +This code is not necessary to the service, but it could be used to test the service. It contains +a sample gRPC client which connects the service and perform all the CRUD operations. + +# Fabric deployment notes + +## General notes +Current Fabric deployment uses Fabric test network with some additional helping scripts on top of it. +To start the network just run the `raft.sh` from `blockchain/scripts` directory. Use `stop.sh` +when you need to stop the network. + +## Server start preparations +To run the server it's necessary to copy certificate file +`fabric-samples/test-network/organizations/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem` +to the config folder (replacing the existing one). Also, it's necessary to copy `scripts/connection-org1.json` +file (again, replacing the old one). After copying, it must be edited. First, all `localhost` entrances +should be replaced with `teraflow.nlehd.de`. Second, `channel` section at the end of the file should be removed. +This should be done after every restart of the Fabric network. + +## Fabric configuration +Even though a test network is easy to deploy and use it's better to perform a custom configuration +for a production deployment. In practice every participating organization will likely prefer to have +its own Peer/Orderer/CA instances to prevent possible dependency on any other participants. This leads +not only to a better privacy/availability/security in general but also to the more complicated +deployment process as a side effect. Here we provide a very brief description of the most important points. + +### Organizations +Organization represents a network participant, which can be an individual, a large corporation or any other +entity. Each organization has its own CAs, orderers and peers. The recommendation here is to create an +organization entity for every independent participant and then decide how many CAs/peers/orderers does +every organization need and which channels should it has access to based on the exact project's goals. + +### Channels +Each channel represents an independent ledger with its own genesis block. Each transaction is executed +on a specific channel, and it's possible to define which organization has access to a given channel. +As a result channels are a pretty powerful privacy mechanism which allows to limit access to the private +data between organization. + +### Certificate authorities, peers and orderers +Certificate authorities (CA) are used to generate crypto materials for each organization. Two types of CA +exist: one is used to generate the certificates of the admin, the MSP and certificates of non-admin users. +Another type of CA is used to generate TLS certificates. As a result it's preferable to have at least two +CAs for every organization. + +Peers are entities which host ledgers and smart contracts. They communicate with applications and orderers, +receiving chaincode invocations (proposals), invoking chaincode, updating ledger when necessary and +returning result of execution. Peers can handle one or many ledgers, depending on the configuration. It's +very use case specific how many peers are necessary to the exact deployment. + +Orderers are used to execute a consensus in a distributing network making sure that every channel participant +has the same blocks with the same data. The default consensus algorithm is Raft which provides only a crash +fault tolerance. + +### Conclusion +As you can see, configuration procedure for Fabric is pretty tricky and includes quite a lot of entities. +In real world it will very likely involve participants from multiple organizations each of them performing +its own part of configuration. + +As a further reading it's recommended to start with the +[official deployment guide](https://hyperledger-fabric.readthedocs.io/en/release-2.2/deployment_guide_overview.html). +It contains a high level overview of a deployment process as well as links to the detailed descriptions to +CA/Peer/Orderer configuration descriptions. \ No newline at end of file diff --git a/src/dlt/gateway/build.gradle.kts b/src/dlt/gateway/_legacy/build.gradle.kts similarity index 100% rename from src/dlt/gateway/build.gradle.kts rename to src/dlt/gateway/_legacy/build.gradle.kts diff --git a/src/dlt/gateway/config/ca.org1.example.com-cert.pem b/src/dlt/gateway/_legacy/config/ca.org1.example.com-cert.pem similarity index 100% rename from src/dlt/gateway/config/ca.org1.example.com-cert.pem rename to src/dlt/gateway/_legacy/config/ca.org1.example.com-cert.pem diff --git a/src/dlt/gateway/config/connection-org1.json b/src/dlt/gateway/_legacy/config/connection-org1.json similarity index 100% rename from src/dlt/gateway/config/connection-org1.json rename to src/dlt/gateway/_legacy/config/connection-org1.json diff --git a/src/dlt/gateway/gradle.properties b/src/dlt/gateway/_legacy/gradle.properties similarity index 100% rename from src/dlt/gateway/gradle.properties rename to src/dlt/gateway/_legacy/gradle.properties diff --git a/src/dlt/gateway/gradle/wrapper/gradle-wrapper.jar b/src/dlt/gateway/_legacy/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from src/dlt/gateway/gradle/wrapper/gradle-wrapper.jar rename to src/dlt/gateway/_legacy/gradle/wrapper/gradle-wrapper.jar diff --git a/src/dlt/gateway/gradle/wrapper/gradle-wrapper.properties b/src/dlt/gateway/_legacy/gradle/wrapper/gradle-wrapper.properties similarity index 100% rename from src/dlt/gateway/gradle/wrapper/gradle-wrapper.properties rename to src/dlt/gateway/_legacy/gradle/wrapper/gradle-wrapper.properties diff --git a/src/dlt/gateway/gradlew b/src/dlt/gateway/_legacy/gradlew similarity index 100% rename from src/dlt/gateway/gradlew rename to src/dlt/gateway/_legacy/gradlew diff --git a/src/dlt/gateway/gradlew.bat b/src/dlt/gateway/_legacy/gradlew.bat similarity index 100% rename from src/dlt/gateway/gradlew.bat rename to src/dlt/gateway/_legacy/gradlew.bat diff --git a/src/dlt/gateway/settings.gradle.kts b/src/dlt/gateway/_legacy/settings.gradle.kts similarity index 100% rename from src/dlt/gateway/settings.gradle.kts rename to src/dlt/gateway/_legacy/settings.gradle.kts diff --git a/src/dlt/gateway/src/main/kotlin/Main.kt b/src/dlt/gateway/_legacy/src/main/kotlin/Main.kt similarity index 100% rename from src/dlt/gateway/src/main/kotlin/Main.kt rename to src/dlt/gateway/_legacy/src/main/kotlin/Main.kt diff --git a/src/dlt/gateway/src/main/kotlin/fabric/ConnectGateway.kt b/src/dlt/gateway/_legacy/src/main/kotlin/fabric/ConnectGateway.kt similarity index 100% rename from src/dlt/gateway/src/main/kotlin/fabric/ConnectGateway.kt rename to src/dlt/gateway/_legacy/src/main/kotlin/fabric/ConnectGateway.kt diff --git a/src/dlt/gateway/src/main/kotlin/fabric/EnrollAdmin.kt b/src/dlt/gateway/_legacy/src/main/kotlin/fabric/EnrollAdmin.kt similarity index 100% rename from src/dlt/gateway/src/main/kotlin/fabric/EnrollAdmin.kt rename to src/dlt/gateway/_legacy/src/main/kotlin/fabric/EnrollAdmin.kt diff --git a/src/dlt/gateway/src/main/kotlin/fabric/FabricConnector.kt b/src/dlt/gateway/_legacy/src/main/kotlin/fabric/FabricConnector.kt similarity index 100% rename from src/dlt/gateway/src/main/kotlin/fabric/FabricConnector.kt rename to src/dlt/gateway/_legacy/src/main/kotlin/fabric/FabricConnector.kt diff --git a/src/dlt/gateway/src/main/kotlin/fabric/RegisterUser.kt b/src/dlt/gateway/_legacy/src/main/kotlin/fabric/RegisterUser.kt similarity index 100% rename from src/dlt/gateway/src/main/kotlin/fabric/RegisterUser.kt rename to src/dlt/gateway/_legacy/src/main/kotlin/fabric/RegisterUser.kt diff --git a/src/dlt/gateway/src/main/kotlin/grpc/FabricServer.kt b/src/dlt/gateway/_legacy/src/main/kotlin/grpc/FabricServer.kt similarity index 100% rename from src/dlt/gateway/src/main/kotlin/grpc/FabricServer.kt rename to src/dlt/gateway/_legacy/src/main/kotlin/grpc/FabricServer.kt diff --git a/src/dlt/gateway/src/main/kotlin/grpc/GrpcHandler.kt b/src/dlt/gateway/_legacy/src/main/kotlin/grpc/GrpcHandler.kt similarity index 100% rename from src/dlt/gateway/src/main/kotlin/grpc/GrpcHandler.kt rename to src/dlt/gateway/_legacy/src/main/kotlin/grpc/GrpcHandler.kt diff --git a/src/dlt/gateway/src/main/kotlin/proto/Config.proto b/src/dlt/gateway/_legacy/src/main/kotlin/proto/Config.proto similarity index 100% rename from src/dlt/gateway/src/main/kotlin/proto/Config.proto rename to src/dlt/gateway/_legacy/src/main/kotlin/proto/Config.proto diff --git a/src/dlt/gateway/chaincode/chaincode.go b/src/dlt/gateway/chaincode/chaincode.go new file mode 100644 index 0000000000000000000000000000000000000000..878cbe9423a7d2cac31e1857343dcdc61034180d --- /dev/null +++ b/src/dlt/gateway/chaincode/chaincode.go @@ -0,0 +1,200 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 + +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package main + +import ( + "crypto/sha256" + "encoding/hex" + "encoding/json" + "fmt" + "log" + + "github.com/hyperledger/fabric-contract-api-go/contractapi" +) + +// Protobuf definitions +type Uuid struct { + Uuid string `json:"uuid"` +} + +type DltRecordId struct { + DomainUuid Uuid `json:"domain_uuid"` + Type string `json:"type"` + RecordUuid Uuid `json:"record_uuid"` +} + +type DltRecord struct { + RecordId DltRecordId `json:"record_id"` + DataJson string `json:"data_json"` +} + +type SmartContract struct { + contractapi.Contract +} + +// InitLedger activates the chaincode +func (s *SmartContract) InitLedger(ctx contractapi.TransactionContextInterface) error { + return nil +} + +func (s *SmartContract) StoreRecord(ctx contractapi.TransactionContextInterface, recordId DltRecordId, dataJson string) error { + + key, err := createHashKey(recordId) + if err != nil { + return fmt.Errorf("failed to create hash key: %v", err) + } + + // Check if the same record does not exist before adding it to the ledger + exists, err := s.RecordExists(ctx, key) + if err == nil && exists != nil { + return fmt.Errorf("the record %s already exists", key) + } + + // Trigger an event if the transaction is successful + storedRecord := DltRecord{ + RecordId: recordId, + DataJson: dataJson, + } + eventJson, err := json.Marshal(storedRecord) + if err != nil { + return fmt.Errorf("failed to marshal stored record: %v", err) + } + ctx.GetStub().SetEvent("StoreRecord", eventJson) + + // Store the record in the ledger + return ctx.GetStub().PutState(key, []byte(dataJson)) +} + +func (s *SmartContract) RetrieveRecord(ctx contractapi.TransactionContextInterface, recordId DltRecordId) (string, error) { + key, err := createHashKey(recordId) + if err != nil { + return "", fmt.Errorf("failed to create hash key: %v", err) + } + + // Get the record from the ledger + dataBytes, err := ctx.GetStub().GetState(key) + if err != nil || dataBytes == nil { + return "", fmt.Errorf("data not found for key %s", key) + } + return string(dataBytes), nil +} + +func (s *SmartContract) UpdateRecord(ctx contractapi.TransactionContextInterface, recordId DltRecordId, dataJson string) error { + key, err := createHashKey(recordId) + if err != nil { + return fmt.Errorf("failed to create hash key: %v", err) + } + + // Check if the record exists before updating it + _, err = s.RecordExists(ctx, key) + if err != nil { + return err + } + + // Trigger an event if the transaction is successful + eventData := DltRecord{RecordId: recordId, DataJson: dataJson} + eventJson, err := json.Marshal(eventData) + if err != nil { + return fmt.Errorf("failed to marshal event data: %v", err) + } + ctx.GetStub().SetEvent("UpdateRecord", eventJson) + + // Update the record in the ledger + return ctx.GetStub().PutState(key, []byte(dataJson)) +} + +func (s *SmartContract) DeleteRecord(ctx contractapi.TransactionContextInterface, recordId DltRecordId) error { + key, err := createHashKey(recordId) + if err != nil { + return fmt.Errorf("failed to create hash key: %v", err) + } + + // Check if the record exists before deleting it + exists, err := s.RecordExists(ctx, key) + if err != nil { + return err + } + + // Trigger an event if the transaction is successful + eventData := DltRecord{RecordId: recordId, DataJson: string(exists)} + eventJson, err := json.Marshal(eventData) + if err != nil { + return fmt.Errorf("failed to marshal event data: %v", err) + } + ctx.GetStub().SetEvent("DeleteRecord", eventJson) + + // Delete the record from the ledger + return ctx.GetStub().DelState(key) +} + +func (s *SmartContract) RecordExists(ctx contractapi.TransactionContextInterface, key string) ([]byte, error) { + jsonData, err := ctx.GetStub().GetState(key) + if err != nil { + return nil, fmt.Errorf("failed to read from world state: %v", err) + } + if jsonData == nil { + return nil, fmt.Errorf("the record %s does not exist", key) + } + return jsonData, nil +} + +func (s *SmartContract) GetAllRecords(ctx contractapi.TransactionContextInterface) ([]map[string]interface{}, error) { + // Range query with empty string for startKey and endKey does an + // open-ended query of all records in the chaincode namespace. + resultsIterator, err := ctx.GetStub().GetStateByRange("", "") + if err != nil { + return nil, err + } + defer resultsIterator.Close() + + var records []map[string]interface{} + for resultsIterator.HasNext() { + queryResponse, err := resultsIterator.Next() + if err != nil { + return nil, err + } + + var generic map[string]interface{} + if err := json.Unmarshal(queryResponse.Value, &generic); err != nil { + return nil, fmt.Errorf("invalid JSON data: %v", err) + } + + records = append(records, generic) + } + + return records, nil +} + +func createHashKey(recordId DltRecordId) (string, error) { + recordIdJson, err := json.Marshal(recordId) + if err != nil { + return "", fmt.Errorf("failed to marshal record ID: %v", err) + } + + hash := sha256.New() + hash.Write(recordIdJson) + return hex.EncodeToString(hash.Sum(nil)), nil +} + +func main() { + recordChaincode, err := contractapi.NewChaincode(&SmartContract{}) + if err != nil { + log.Panicf("Error creating chaincode: %v", err) + } + + if err := recordChaincode.Start(); err != nil { + log.Panicf("Error starting chaincode: %v", err) + } +} diff --git a/src/dlt/gateway/chaincode/go.mod b/src/dlt/gateway/chaincode/go.mod new file mode 100644 index 0000000000000000000000000000000000000000..27f86fbabd3d9b169f485ab22ccc42125421afa6 --- /dev/null +++ b/src/dlt/gateway/chaincode/go.mod @@ -0,0 +1,46 @@ +<!-- Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. --> + +module chaincode + +go 1.17 + +require github.com/hyperledger/fabric-contract-api-go v1.2.1 + +require ( + github.com/go-openapi/jsonpointer v0.19.5 // indirect + github.com/go-openapi/jsonreference v0.20.0 // indirect + github.com/go-openapi/spec v0.20.8 // indirect + github.com/go-openapi/swag v0.21.1 // indirect + github.com/gobuffalo/envy v1.10.1 // indirect + github.com/gobuffalo/packd v1.0.1 // indirect + github.com/gobuffalo/packr v1.30.1 // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/hyperledger/fabric-chaincode-go v0.0.0-20230228194215-b84622ba6a7a // indirect + github.com/hyperledger/fabric-protos-go v0.3.0 // indirect + github.com/joho/godotenv v1.4.0 // indirect + github.com/josharian/intern v1.0.0 // indirect + github.com/mailru/easyjson v0.7.7 // indirect + github.com/rogpeppe/go-internal v1.8.1 // indirect + github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect + github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect + github.com/xeipuuv/gojsonschema v1.2.0 // indirect + golang.org/x/net v0.7.0 // indirect + golang.org/x/sys v0.5.0 // indirect + golang.org/x/text v0.7.0 // indirect + google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect + google.golang.org/grpc v1.53.0 // indirect + google.golang.org/protobuf v1.28.1 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect +) diff --git a/src/dlt/gateway/chaincode/go.sum b/src/dlt/gateway/chaincode/go.sum new file mode 100644 index 0000000000000000000000000000000000000000..8bb9581b596c7f9dd4528d14f5051aa03132421f --- /dev/null +++ b/src/dlt/gateway/chaincode/go.sum @@ -0,0 +1,1240 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.100.1/go.mod h1:fs4QogzfH5n2pBXBP9vRiU+eCny7lD2vmFZy79Iuw1U= +cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= +cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= +cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= +cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= +cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM= +cloud.google.com/go v0.107.0/go.mod h1:wpc2eNrD7hXUTy8EKS10jkxpZBjASrORK7goS+3YX2I= +cloud.google.com/go/accessapproval v1.4.0/go.mod h1:zybIuC3KpDOvotz59lFe5qxRZx6C75OtwbisN56xYB4= +cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw= +cloud.google.com/go/accesscontextmanager v1.3.0/go.mod h1:TgCBehyr5gNMz7ZaH9xubp+CE8dkrszb4oK9CWyvD4o= +cloud.google.com/go/accesscontextmanager v1.4.0/go.mod h1:/Kjh7BBu/Gh83sv+K60vN9QE5NJcd80sU33vIe2IFPE= +cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= +cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= +cloud.google.com/go/aiplatform v1.27.0/go.mod h1:Bvxqtl40l0WImSb04d0hXFU7gDOiq9jQmorivIiWcKg= +cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= +cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4= +cloud.google.com/go/apigateway v1.3.0/go.mod h1:89Z8Bhpmxu6AmUxuVRg/ECRGReEdiP3vQtk4Z1J9rJk= +cloud.google.com/go/apigateway v1.4.0/go.mod h1:pHVY9MKGaH9PQ3pJ4YLzoj6U5FUDeDFBllIz7WmzJoc= +cloud.google.com/go/apigeeconnect v1.3.0/go.mod h1:G/AwXFAKo0gIXkPTVfZDd2qA1TxBXJ3MgMRBQkIi9jc= +cloud.google.com/go/apigeeconnect v1.4.0/go.mod h1:kV4NwOKqjvt2JYR0AoIWo2QGfoRtn/pkS3QlHp0Ni04= +cloud.google.com/go/appengine v1.4.0/go.mod h1:CS2NhuBuDXM9f+qscZ6V86m1MIIqPj3WC/UoEuR1Sno= +cloud.google.com/go/appengine v1.5.0/go.mod h1:TfasSozdkFI0zeoxW3PTBLiNqRmzraodCWatWI9Dmak= +cloud.google.com/go/area120 v0.5.0/go.mod h1:DE/n4mp+iqVyvxHN41Vf1CR602GiHQjFPusMFW6bGR4= +cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0= +cloud.google.com/go/artifactregistry v1.6.0/go.mod h1:IYt0oBPSAGYj/kprzsBjZ/4LnG/zOcHyFHjWPCi6SAQ= +cloud.google.com/go/artifactregistry v1.7.0/go.mod h1:mqTOFOnGZx8EtSqK/ZWcsm/4U8B77rbcLP6ruDU2Ixk= +cloud.google.com/go/artifactregistry v1.8.0/go.mod h1:w3GQXkJX8hiKN0v+at4b0qotwijQbYUqF2GWkZzAhC0= +cloud.google.com/go/artifactregistry v1.9.0/go.mod h1:2K2RqvA2CYvAeARHRkLDhMDJ3OXy26h3XW+3/Jh2uYc= +cloud.google.com/go/asset v1.5.0/go.mod h1:5mfs8UvcM5wHhqtSv8J1CtxxaQq3AdBxxQi2jGW/K4o= +cloud.google.com/go/asset v1.7.0/go.mod h1:YbENsRK4+xTiL+Ofoj5Ckf+O17kJtgp3Y3nn4uzZz5s= +cloud.google.com/go/asset v1.8.0/go.mod h1:mUNGKhiqIdbr8X7KNayoYvyc4HbbFO9URsjbytpUaW0= +cloud.google.com/go/asset v1.9.0/go.mod h1:83MOE6jEJBMqFKadM9NLRcs80Gdw76qGuHn8m3h8oHQ= +cloud.google.com/go/asset v1.10.0/go.mod h1:pLz7uokL80qKhzKr4xXGvBQXnzHn5evJAEAtZiIb0wY= +cloud.google.com/go/assuredworkloads v1.5.0/go.mod h1:n8HOZ6pff6re5KYfBXcFvSViQjDwxFkAkmUFffJRbbY= +cloud.google.com/go/assuredworkloads v1.6.0/go.mod h1:yo2YOk37Yc89Rsd5QMVECvjaMKymF9OP+QXWlKXUkXw= +cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVoYoxeLBoj4XkKYscNI= +cloud.google.com/go/assuredworkloads v1.8.0/go.mod h1:AsX2cqyNCOvEQC8RMPnoc0yEarXQk6WEKkxYfL6kGIo= +cloud.google.com/go/assuredworkloads v1.9.0/go.mod h1:kFuI1P78bplYtT77Tb1hi0FMxM0vVpRC7VVoJC3ZoT0= +cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= +cloud.google.com/go/automl v1.6.0/go.mod h1:ugf8a6Fx+zP0D59WLhqgTDsQI9w07o64uf/Is3Nh5p8= +cloud.google.com/go/automl v1.7.0/go.mod h1:RL9MYCCsJEOmt0Wf3z9uzG0a7adTT1fe+aObgSpkCt8= +cloud.google.com/go/automl v1.8.0/go.mod h1:xWx7G/aPEe/NP+qzYXktoBSDfjO+vnKMGgsApGJJquM= +cloud.google.com/go/baremetalsolution v0.3.0/go.mod h1:XOrocE+pvK1xFfleEnShBlNAXf+j5blPPxrhjKgnIFc= +cloud.google.com/go/baremetalsolution v0.4.0/go.mod h1:BymplhAadOO/eBa7KewQ0Ppg4A4Wplbn+PsFKRLo0uI= +cloud.google.com/go/batch v0.3.0/go.mod h1:TR18ZoAekj1GuirsUsR1ZTKN3FC/4UDnScjT8NXImFE= +cloud.google.com/go/batch v0.4.0/go.mod h1:WZkHnP43R/QCGQsZ+0JyG4i79ranE2u8xvjq/9+STPE= +cloud.google.com/go/beyondcorp v0.2.0/go.mod h1:TB7Bd+EEtcw9PCPQhCJtJGjk/7TC6ckmnSFS+xwTfm4= +cloud.google.com/go/beyondcorp v0.3.0/go.mod h1:E5U5lcrcXMsCuoDNyGrpyTm/hn7ne941Jz2vmksAxW8= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/bigquery v1.42.0/go.mod h1:8dRTJxhtG+vwBKzE5OseQn/hiydoQN3EedCaOdYmxRA= +cloud.google.com/go/bigquery v1.43.0/go.mod h1:ZMQcXHsl+xmU1z36G2jNGZmKp9zNY5BUua5wDgmNCfw= +cloud.google.com/go/bigquery v1.44.0/go.mod h1:0Y33VqXTEsbamHJvJHdFmtqHvMIY28aK1+dFsvaChGc= +cloud.google.com/go/billing v1.4.0/go.mod h1:g9IdKBEFlItS8bTtlrZdVLWSSdSyFUZKXNS02zKMOZY= +cloud.google.com/go/billing v1.5.0/go.mod h1:mztb1tBc3QekhjSgmpf/CV4LzWXLzCArwpLmP2Gm88s= +cloud.google.com/go/billing v1.6.0/go.mod h1:WoXzguj+BeHXPbKfNWkqVtDdzORazmCjraY+vrxcyvI= +cloud.google.com/go/billing v1.7.0/go.mod h1:q457N3Hbj9lYwwRbnlD7vUpyjq6u5U1RAOArInEiD5Y= +cloud.google.com/go/binaryauthorization v1.1.0/go.mod h1:xwnoWu3Y84jbuHa0zd526MJYmtnVXn0syOjaJgy4+dM= +cloud.google.com/go/binaryauthorization v1.2.0/go.mod h1:86WKkJHtRcv5ViNABtYMhhNWRrD1Vpi//uKEy7aYEfI= +cloud.google.com/go/binaryauthorization v1.3.0/go.mod h1:lRZbKgjDIIQvzYQS1p99A7/U1JqvqeZg0wiI5tp6tg0= +cloud.google.com/go/binaryauthorization v1.4.0/go.mod h1:tsSPQrBd77VLplV70GUhBf/Zm3FsKmgSqgm4UmiDItk= +cloud.google.com/go/certificatemanager v1.3.0/go.mod h1:n6twGDvcUBFu9uBgt4eYvvf3sQ6My8jADcOVwHmzadg= +cloud.google.com/go/certificatemanager v1.4.0/go.mod h1:vowpercVFyqs8ABSmrdV+GiFf2H/ch3KyudYQEMM590= +cloud.google.com/go/channel v1.8.0/go.mod h1:W5SwCXDJsq/rg3tn3oG0LOxpAo6IMxNa09ngphpSlnk= +cloud.google.com/go/channel v1.9.0/go.mod h1:jcu05W0my9Vx4mt3/rEHpfxc9eKi9XwsdDL8yBMbKUk= +cloud.google.com/go/cloudbuild v1.3.0/go.mod h1:WequR4ULxlqvMsjDEEEFnOG5ZSRSgWOywXYDb1vPE6U= +cloud.google.com/go/cloudbuild v1.4.0/go.mod h1:5Qwa40LHiOXmz3386FrjrYM93rM/hdRr7b53sySrTqA= +cloud.google.com/go/clouddms v1.3.0/go.mod h1:oK6XsCDdW4Ib3jCCBugx+gVjevp2TMXFtgxvPSee3OM= +cloud.google.com/go/clouddms v1.4.0/go.mod h1:Eh7sUGCC+aKry14O1NRljhjyrr0NFC0G2cjwX0cByRk= +cloud.google.com/go/cloudtasks v1.5.0/go.mod h1:fD92REy1x5woxkKEkLdvavGnPJGEn8Uic9nWuLzqCpY= +cloud.google.com/go/cloudtasks v1.6.0/go.mod h1:C6Io+sxuke9/KNRkbQpihnW93SWDU3uXt92nu85HkYI= +cloud.google.com/go/cloudtasks v1.7.0/go.mod h1:ImsfdYWwlWNJbdgPIIGJWC+gemEGTBK/SunNQQNCAb4= +cloud.google.com/go/cloudtasks v1.8.0/go.mod h1:gQXUIwCSOI4yPVK7DgTVFiiP0ZW/eQkydWzwVMdHxrI= +cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= +cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= +cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= +cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= +cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= +cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= +cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= +cloud.google.com/go/compute v1.12.0/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= +cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= +cloud.google.com/go/compute v1.13.0/go.mod h1:5aPTS0cUNMIc1CE546K+Th6weJUNQErARyZtRXDJ8GE= +cloud.google.com/go/compute v1.14.0/go.mod h1:YfLtxrj9sU4Yxv+sXzZkyPjEyPBZfXHUvjxega5vAdo= +cloud.google.com/go/compute v1.15.1/go.mod h1:bjjoF/NtFUrkD/urWfdHaKuOPDR5nWIs63rR+SXhcpA= +cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZEXYonfTBHHFPO/4UU= +cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= +cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= +cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/contactcenterinsights v1.3.0/go.mod h1:Eu2oemoePuEFc/xKFPjbTuPSj0fYJcPls9TFlPNnHHY= +cloud.google.com/go/contactcenterinsights v1.4.0/go.mod h1:L2YzkGbPsv+vMQMCADxJoT9YiTTnSEd6fEvCeHTYVck= +cloud.google.com/go/container v1.6.0/go.mod h1:Xazp7GjJSeUYo688S+6J5V+n/t+G5sKBTFkKNudGRxg= +cloud.google.com/go/container v1.7.0/go.mod h1:Dp5AHtmothHGX3DwwIHPgq45Y8KmNsgN3amoYfxVkLo= +cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= +cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= +cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= +cloud.google.com/go/datacatalog v1.5.0/go.mod h1:M7GPLNQeLfWqeIm3iuiruhPzkt65+Bx8dAKvScX8jvs= +cloud.google.com/go/datacatalog v1.6.0/go.mod h1:+aEyF8JKg+uXcIdAmmaMUmZ3q1b/lKLtXCmXdnc0lbc= +cloud.google.com/go/datacatalog v1.7.0/go.mod h1:9mEl4AuDYWw81UGc41HonIHH7/sn52H0/tc8f8ZbZIE= +cloud.google.com/go/datacatalog v1.8.0/go.mod h1:KYuoVOv9BM8EYz/4eMFxrr4DUKhGIOXxZoKYF5wdISM= +cloud.google.com/go/dataflow v0.6.0/go.mod h1:9QwV89cGoxjjSR9/r7eFDqqjtvbKxAK2BaYU6PVk9UM= +cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ= +cloud.google.com/go/dataform v0.3.0/go.mod h1:cj8uNliRlHpa6L3yVhDOBrUXH+BPAO1+KFMQQNSThKo= +cloud.google.com/go/dataform v0.4.0/go.mod h1:fwV6Y4Ty2yIFL89huYlEkwUPtS7YZinZbzzj5S9FzCE= +cloud.google.com/go/dataform v0.5.0/go.mod h1:GFUYRe8IBa2hcomWplodVmUx/iTL0FrsauObOM3Ipr0= +cloud.google.com/go/datafusion v1.4.0/go.mod h1:1Zb6VN+W6ALo85cXnM1IKiPw+yQMKMhB9TsTSRDo/38= +cloud.google.com/go/datafusion v1.5.0/go.mod h1:Kz+l1FGHB0J+4XF2fud96WMmRiq/wj8N9u007vyXZ2w= +cloud.google.com/go/datalabeling v0.5.0/go.mod h1:TGcJ0G2NzcsXSE/97yWjIZO0bXj0KbVlINXMG9ud42I= +cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ= +cloud.google.com/go/dataplex v1.3.0/go.mod h1:hQuRtDg+fCiFgC8j0zV222HvzFQdRd+SVX8gdmFcZzA= +cloud.google.com/go/dataplex v1.4.0/go.mod h1:X51GfLXEMVJ6UN47ESVqvlsRplbLhcsAt0kZCCKsU0A= +cloud.google.com/go/dataproc v1.7.0/go.mod h1:CKAlMjII9H90RXaMpSxQ8EU6dQx6iAYNPcYPOkSbi8s= +cloud.google.com/go/dataproc v1.8.0/go.mod h1:5OW+zNAH0pMpw14JVrPONsxMQYMBqJuzORhIBfBn9uI= +cloud.google.com/go/dataqna v0.5.0/go.mod h1:90Hyk596ft3zUQ8NkFfvICSIfHFh1Bc7C4cK3vbhkeo= +cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/datastore v1.10.0/go.mod h1:PC5UzAmDEkAmkfaknstTYbNpgE49HAgW2J1gcgUfmdM= +cloud.google.com/go/datastream v1.2.0/go.mod h1:i/uTP8/fZwgATHS/XFu0TcNUhuA0twZxxQ3EyCUQMwo= +cloud.google.com/go/datastream v1.3.0/go.mod h1:cqlOX8xlyYF/uxhiKn6Hbv6WjwPPuI9W2M9SAXwaLLQ= +cloud.google.com/go/datastream v1.4.0/go.mod h1:h9dpzScPhDTs5noEMQVWP8Wx8AFBRyS0s8KWPx/9r0g= +cloud.google.com/go/datastream v1.5.0/go.mod h1:6TZMMNPwjUqZHBKPQ1wwXpb0d5VDVPl2/XoS5yi88q4= +cloud.google.com/go/deploy v1.4.0/go.mod h1:5Xghikd4VrmMLNaF6FiRFDlHb59VM59YoDQnOUdsH/c= +cloud.google.com/go/deploy v1.5.0/go.mod h1:ffgdD0B89tToyW/U/D2eL0jN2+IEV/3EMuXHA0l4r+s= +cloud.google.com/go/dialogflow v1.15.0/go.mod h1:HbHDWs33WOGJgn6rfzBW1Kv807BE3O1+xGbn59zZWI4= +cloud.google.com/go/dialogflow v1.16.1/go.mod h1:po6LlzGfK+smoSmTBnbkIZY2w8ffjz/RcGSS+sh1el0= +cloud.google.com/go/dialogflow v1.17.0/go.mod h1:YNP09C/kXA1aZdBgC/VtXX74G/TKn7XVCcVumTflA+8= +cloud.google.com/go/dialogflow v1.18.0/go.mod h1:trO7Zu5YdyEuR+BhSNOqJezyFQ3aUzz0njv7sMx/iek= +cloud.google.com/go/dialogflow v1.19.0/go.mod h1:JVmlG1TwykZDtxtTXujec4tQ+D8SBFMoosgy+6Gn0s0= +cloud.google.com/go/dlp v1.6.0/go.mod h1:9eyB2xIhpU0sVwUixfBubDoRwP+GjeUoxxeueZmqvmM= +cloud.google.com/go/dlp v1.7.0/go.mod h1:68ak9vCiMBjbasxeVD17hVPxDEck+ExiHavX8kiHG+Q= +cloud.google.com/go/documentai v1.7.0/go.mod h1:lJvftZB5NRiFSX4moiye1SMxHx0Bc3x1+p9e/RfXYiU= +cloud.google.com/go/documentai v1.8.0/go.mod h1:xGHNEB7CtsnySCNrCFdCyyMz44RhFEEX2Q7UD0c5IhU= +cloud.google.com/go/documentai v1.9.0/go.mod h1:FS5485S8R00U10GhgBC0aNGrJxBP8ZVpEeJ7PQDZd6k= +cloud.google.com/go/documentai v1.10.0/go.mod h1:vod47hKQIPeCfN2QS/jULIvQTugbmdc0ZvxxfQY1bg4= +cloud.google.com/go/domains v0.6.0/go.mod h1:T9Rz3GasrpYk6mEGHh4rymIhjlnIuB4ofT1wTxDeT4Y= +cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg= +cloud.google.com/go/edgecontainer v0.1.0/go.mod h1:WgkZ9tp10bFxqO8BLPqv2LlfmQF1X8lZqwW4r1BTajk= +cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w= +cloud.google.com/go/errorreporting v0.3.0/go.mod h1:xsP2yaAp+OAW4OIm60An2bbLpqIhKXdWR/tawvl7QzU= +cloud.google.com/go/essentialcontacts v1.3.0/go.mod h1:r+OnHa5jfj90qIfZDO/VztSFqbQan7HV75p8sA+mdGI= +cloud.google.com/go/essentialcontacts v1.4.0/go.mod h1:8tRldvHYsmnBCHdFpvU+GL75oWiBKl80BiqlFh9tp+8= +cloud.google.com/go/eventarc v1.7.0/go.mod h1:6ctpF3zTnaQCxUjHUdcfgcA1A2T309+omHZth7gDfmc= +cloud.google.com/go/eventarc v1.8.0/go.mod h1:imbzxkyAU4ubfsaKYdQg04WS1NvncblHEup4kvF+4gw= +cloud.google.com/go/filestore v1.3.0/go.mod h1:+qbvHGvXU1HaKX2nD0WEPo92TP/8AQuCVEBXNY9z0+w= +cloud.google.com/go/filestore v1.4.0/go.mod h1:PaG5oDfo9r224f8OYXURtAsY+Fbyq/bLYoINEK8XQAI= +cloud.google.com/go/firestore v1.9.0/go.mod h1:HMkjKHNTtRyZNiMzu7YAsLr9K3X2udY2AMwDaMEQiiE= +cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk= +cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg= +cloud.google.com/go/functions v1.8.0/go.mod h1:RTZ4/HsQjIqIYP9a9YPbU+QFoQsAlYgrwOXJWHn1POY= +cloud.google.com/go/functions v1.9.0/go.mod h1:Y+Dz8yGguzO3PpIjhLTbnqV1CWmgQ5UwtlpzoyquQ08= +cloud.google.com/go/gaming v1.5.0/go.mod h1:ol7rGcxP/qHTRQE/RO4bxkXq+Fix0j6D4LFPzYTIrDM= +cloud.google.com/go/gaming v1.6.0/go.mod h1:YMU1GEvA39Qt3zWGyAVA9bpYz/yAhTvaQ1t2sK4KPUA= +cloud.google.com/go/gaming v1.7.0/go.mod h1:LrB8U7MHdGgFG851iHAfqUdLcKBdQ55hzXy9xBJz0+w= +cloud.google.com/go/gaming v1.8.0/go.mod h1:xAqjS8b7jAVW0KFYeRUxngo9My3f33kFmua++Pi+ggM= +cloud.google.com/go/gkebackup v0.2.0/go.mod h1:XKvv/4LfG829/B8B7xRkk8zRrOEbKtEam6yNfuQNH60= +cloud.google.com/go/gkebackup v0.3.0/go.mod h1:n/E671i1aOQvUxT541aTkCwExO/bTer2HDlj4TsBRAo= +cloud.google.com/go/gkeconnect v0.5.0/go.mod h1:c5lsNAg5EwAy7fkqX/+goqFsU1Da/jQFqArp+wGNr/o= +cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A= +cloud.google.com/go/gkehub v0.9.0/go.mod h1:WYHN6WG8w9bXU0hqNxt8rm5uxnk8IH+lPY9J2TV7BK0= +cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0= +cloud.google.com/go/gkemulticloud v0.3.0/go.mod h1:7orzy7O0S+5kq95e4Hpn7RysVA7dPs8W/GgfUtsPbrA= +cloud.google.com/go/gkemulticloud v0.4.0/go.mod h1:E9gxVBnseLWCk24ch+P9+B2CoDFJZTyIgLKSalC7tuI= +cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= +cloud.google.com/go/gsuiteaddons v1.3.0/go.mod h1:EUNK/J1lZEZO8yPtykKxLXI6JSVN2rg9bN8SXOa0bgM= +cloud.google.com/go/gsuiteaddons v1.4.0/go.mod h1:rZK5I8hht7u7HxFQcFei0+AtfS9uSushomRlg+3ua1o= +cloud.google.com/go/iam v0.1.0/go.mod h1:vcUNEa0pEm0qRVpmWepWaFMIAI8/hjB9mO8rNCJtF6c= +cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= +cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= +cloud.google.com/go/iam v0.6.0/go.mod h1:+1AH33ueBne5MzYccyMHtEKqLE4/kJOibtffMHDMFMc= +cloud.google.com/go/iam v0.7.0/go.mod h1:H5Br8wRaDGNc8XP3keLc4unfUUZeyH3Sfl9XpQEYOeg= +cloud.google.com/go/iam v0.8.0/go.mod h1:lga0/y3iH6CX7sYqypWJ33hf7kkfXJag67naqGESjkE= +cloud.google.com/go/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc= +cloud.google.com/go/iap v1.5.0/go.mod h1:UH/CGgKd4KyohZL5Pt0jSKE4m3FR51qg6FKQ/z/Ix9A= +cloud.google.com/go/ids v1.1.0/go.mod h1:WIuwCaYVOzHIj2OhN9HAwvW+DBdmUAdcWlFxRl+KubM= +cloud.google.com/go/ids v1.2.0/go.mod h1:5WXvp4n25S0rA/mQWAg1YEEBBq6/s+7ml1RDCW1IrcY= +cloud.google.com/go/iot v1.3.0/go.mod h1:r7RGh2B61+B8oz0AGE+J72AhA0G7tdXItODWsaA2oLs= +cloud.google.com/go/iot v1.4.0/go.mod h1:dIDxPOn0UvNDUMD8Ger7FIaTuvMkj+aGk94RPP0iV+g= +cloud.google.com/go/kms v1.4.0/go.mod h1:fajBHndQ+6ubNw6Ss2sSd+SWvjL26RNo/dr7uxsnnOA= +cloud.google.com/go/kms v1.5.0/go.mod h1:QJS2YY0eJGBg3mnDfuaCyLauWwBJiHRboYxJ++1xJNg= +cloud.google.com/go/kms v1.6.0/go.mod h1:Jjy850yySiasBUDi6KFUwUv2n1+o7QZFyuUJg6OgjA0= +cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= +cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= +cloud.google.com/go/language v1.7.0/go.mod h1:DJ6dYN/W+SQOjF8e1hLQXMF21AkH2w9wiPzPCJa2MIE= +cloud.google.com/go/language v1.8.0/go.mod h1:qYPVHf7SPoNNiCL2Dr0FfEFNil1qi3pQEyygwpgVKB8= +cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= +cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= +cloud.google.com/go/logging v1.6.1/go.mod h1:5ZO0mHHbvm8gEmeEUHrmDlTDSu5imF6MUP9OfilNXBw= +cloud.google.com/go/longrunning v0.1.1/go.mod h1:UUFxuDWkv22EuY93jjmDMFT5GPQKeFVJBIF6QlTqdsE= +cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc= +cloud.google.com/go/managedidentities v1.3.0/go.mod h1:UzlW3cBOiPrzucO5qWkNkh0w33KFtBJU281hacNvsdE= +cloud.google.com/go/managedidentities v1.4.0/go.mod h1:NWSBYbEMgqmbZsLIyKvxrYbtqOsxY1ZrGM+9RgDqInM= +cloud.google.com/go/maps v0.1.0/go.mod h1:BQM97WGyfw9FWEmQMpZ5T6cpovXXSd1cGmFma94eubI= +cloud.google.com/go/mediatranslation v0.5.0/go.mod h1:jGPUhGTybqsPQn91pNXw0xVHfuJ3leR1wj37oU3y1f4= +cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= +cloud.google.com/go/memcache v1.4.0/go.mod h1:rTOfiGZtJX1AaFUrOgsMHX5kAzaTQ8azHiuDoTPzNsE= +cloud.google.com/go/memcache v1.5.0/go.mod h1:dk3fCK7dVo0cUU2c36jKb4VqKPS22BTkf81Xq617aWM= +cloud.google.com/go/memcache v1.6.0/go.mod h1:XS5xB0eQZdHtTuTF9Hf8eJkKtR3pVRCcvJwtm68T3rA= +cloud.google.com/go/memcache v1.7.0/go.mod h1:ywMKfjWhNtkQTxrWxCkCFkoPjLHPW6A7WOTVI8xy3LY= +cloud.google.com/go/metastore v1.5.0/go.mod h1:2ZNrDcQwghfdtCwJ33nM0+GrBGlVuh8rakL3vdPY3XY= +cloud.google.com/go/metastore v1.6.0/go.mod h1:6cyQTls8CWXzk45G55x57DVQ9gWg7RiH65+YgPsNh9s= +cloud.google.com/go/metastore v1.7.0/go.mod h1:s45D0B4IlsINu87/AsWiEVYbLaIMeUSoxlKKDqBGFS8= +cloud.google.com/go/metastore v1.8.0/go.mod h1:zHiMc4ZUpBiM7twCIFQmJ9JMEkDSyZS9U12uf7wHqSI= +cloud.google.com/go/monitoring v1.7.0/go.mod h1:HpYse6kkGo//7p6sT0wsIC6IBDET0RhIsnmlA53dvEk= +cloud.google.com/go/monitoring v1.8.0/go.mod h1:E7PtoMJ1kQXWxPjB6mv2fhC5/15jInuulFdYYtlcvT4= +cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= +cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= +cloud.google.com/go/networkconnectivity v1.6.0/go.mod h1:OJOoEXW+0LAxHh89nXd64uGG+FbQoeH8DtxCHVOMlaM= +cloud.google.com/go/networkconnectivity v1.7.0/go.mod h1:RMuSbkdbPwNMQjB5HBWD5MpTBnNm39iAVpC3TmsExt8= +cloud.google.com/go/networkmanagement v1.4.0/go.mod h1:Q9mdLLRn60AsOrPc8rs8iNV6OHXaGcDdsIQe1ohekq8= +cloud.google.com/go/networkmanagement v1.5.0/go.mod h1:ZnOeZ/evzUdUsnvRt792H0uYEnHQEMaz+REhhzJRcf4= +cloud.google.com/go/networksecurity v0.5.0/go.mod h1:xS6fOCoqpVC5zx15Z/MqkfDwH4+m/61A3ODiDV1xmiQ= +cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU= +cloud.google.com/go/notebooks v1.2.0/go.mod h1:9+wtppMfVPUeJ8fIWPOq1UnATHISkGXGqTkxeieQ6UY= +cloud.google.com/go/notebooks v1.3.0/go.mod h1:bFR5lj07DtCPC7YAAJ//vHskFBxA5JzYlH68kXVdk34= +cloud.google.com/go/notebooks v1.4.0/go.mod h1:4QPMngcwmgb6uw7Po99B2xv5ufVoIQ7nOGDyL4P8AgA= +cloud.google.com/go/notebooks v1.5.0/go.mod h1:q8mwhnP9aR8Hpfnrc5iN5IBhrXUy8S2vuYs+kBJ/gu0= +cloud.google.com/go/optimization v1.1.0/go.mod h1:5po+wfvX5AQlPznyVEZjGJTMr4+CAkJf2XSTQOOl9l4= +cloud.google.com/go/optimization v1.2.0/go.mod h1:Lr7SOHdRDENsh+WXVmQhQTrzdu9ybg0NecjHidBq6xs= +cloud.google.com/go/orchestration v1.3.0/go.mod h1:Sj5tq/JpWiB//X/q3Ngwdl5K7B7Y0KZ7bfv0wL6fqVA= +cloud.google.com/go/orchestration v1.4.0/go.mod h1:6W5NLFWs2TlniBphAViZEVhrXRSMgUGDfW7vrWKvsBk= +cloud.google.com/go/orgpolicy v1.4.0/go.mod h1:xrSLIV4RePWmP9P3tBl8S93lTmlAxjm06NSm2UTmKvE= +cloud.google.com/go/orgpolicy v1.5.0/go.mod h1:hZEc5q3wzwXJaKrsx5+Ewg0u1LxJ51nNFlext7Tanwc= +cloud.google.com/go/osconfig v1.7.0/go.mod h1:oVHeCeZELfJP7XLxcBGTMBvRO+1nQ5tFG9VQTmYS2Fs= +cloud.google.com/go/osconfig v1.8.0/go.mod h1:EQqZLu5w5XA7eKizepumcvWx+m8mJUhEwiPqWiZeEdg= +cloud.google.com/go/osconfig v1.9.0/go.mod h1:Yx+IeIZJ3bdWmzbQU4fxNl8xsZ4amB+dygAwFPlvnNo= +cloud.google.com/go/osconfig v1.10.0/go.mod h1:uMhCzqC5I8zfD9zDEAfvgVhDS8oIjySWh+l4WK6GnWw= +cloud.google.com/go/oslogin v1.4.0/go.mod h1:YdgMXWRaElXz/lDk1Na6Fh5orF7gvmJ0FGLIs9LId4E= +cloud.google.com/go/oslogin v1.5.0/go.mod h1:D260Qj11W2qx/HVF29zBg+0fd6YCSjSqLUkY/qEenQU= +cloud.google.com/go/oslogin v1.6.0/go.mod h1:zOJ1O3+dTU8WPlGEkFSh7qeHPPSoxrcMbbK1Nm2iX70= +cloud.google.com/go/oslogin v1.7.0/go.mod h1:e04SN0xO1UNJ1M5GP0vzVBFicIe4O53FOfcixIqTyXo= +cloud.google.com/go/phishingprotection v0.5.0/go.mod h1:Y3HZknsK9bc9dMi+oE8Bim0lczMU6hrX0UpADuMefr0= +cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA= +cloud.google.com/go/policytroubleshooter v1.3.0/go.mod h1:qy0+VwANja+kKrjlQuOzmlvscn4RNsAc0e15GGqfMxg= +cloud.google.com/go/policytroubleshooter v1.4.0/go.mod h1:DZT4BcRw3QoO8ota9xw/LKtPa8lKeCByYeKTIf/vxdE= +cloud.google.com/go/privatecatalog v0.5.0/go.mod h1:XgosMUvvPyxDjAVNDYxJ7wBW8//hLDDYmnsNcMGq1K0= +cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/pubsub v1.26.0/go.mod h1:QgBH3U/jdJy/ftjPhTkyXNj543Tin1pRYcdcPRnFIRI= +cloud.google.com/go/pubsub v1.27.1/go.mod h1:hQN39ymbV9geqBnfQq6Xf63yNhUAhv9CZhzp5O6qsW0= +cloud.google.com/go/pubsublite v1.5.0/go.mod h1:xapqNQ1CuLfGi23Yda/9l4bBCKz/wC3KIJ5gKcxveZg= +cloud.google.com/go/recaptchaenterprise v1.3.1/go.mod h1:OdD+q+y4XGeAlxRaMn1Y7/GveP6zmq76byL6tjPE7d4= +cloud.google.com/go/recaptchaenterprise/v2 v2.1.0/go.mod h1:w9yVqajwroDNTfGuhmOjPDN//rZGySaf6PtFVcSCa7o= +cloud.google.com/go/recaptchaenterprise/v2 v2.2.0/go.mod h1:/Zu5jisWGeERrd5HnlS3EUGb/D335f9k51B/FVil0jk= +cloud.google.com/go/recaptchaenterprise/v2 v2.3.0/go.mod h1:O9LwGCjrhGHBQET5CA7dd5NwwNQUErSgEDit1DLNTdo= +cloud.google.com/go/recaptchaenterprise/v2 v2.4.0/go.mod h1:Am3LHfOuBstrLrNCBrlI5sbwx9LBg3te2N6hGvHn2mE= +cloud.google.com/go/recaptchaenterprise/v2 v2.5.0/go.mod h1:O8LzcHXN3rz0j+LBC91jrwI3R+1ZSZEWrfL7XHgNo9U= +cloud.google.com/go/recommendationengine v0.5.0/go.mod h1:E5756pJcVFeVgaQv3WNpImkFP8a+RptV6dDLGPILjvg= +cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4= +cloud.google.com/go/recommender v1.5.0/go.mod h1:jdoeiBIVrJe9gQjwd759ecLJbxCDED4A6p+mqoqDvTg= +cloud.google.com/go/recommender v1.6.0/go.mod h1:+yETpm25mcoiECKh9DEScGzIRyDKpZ0cEhWGo+8bo+c= +cloud.google.com/go/recommender v1.7.0/go.mod h1:XLHs/W+T8olwlGOgfQenXBTbIseGclClff6lhFVe9Bs= +cloud.google.com/go/recommender v1.8.0/go.mod h1:PkjXrTT05BFKwxaUxQmtIlrtj0kph108r02ZZQ5FE70= +cloud.google.com/go/redis v1.7.0/go.mod h1:V3x5Jq1jzUcg+UNsRvdmsfuFnit1cfe3Z/PGyq/lm4Y= +cloud.google.com/go/redis v1.8.0/go.mod h1:Fm2szCDavWzBk2cDKxrkmWBqoCiL1+Ctwq7EyqBCA/A= +cloud.google.com/go/redis v1.9.0/go.mod h1:HMYQuajvb2D0LvMgZmLDZW8V5aOC/WxstZHiy4g8OiA= +cloud.google.com/go/redis v1.10.0/go.mod h1:ThJf3mMBQtW18JzGgh41/Wld6vnDDc/F/F35UolRZPM= +cloud.google.com/go/resourcemanager v1.3.0/go.mod h1:bAtrTjZQFJkiWTPDb1WBjzvc6/kifjj4QBYuKCCoqKA= +cloud.google.com/go/resourcemanager v1.4.0/go.mod h1:MwxuzkumyTX7/a3n37gmsT3py7LIXwrShilPh3P1tR0= +cloud.google.com/go/resourcesettings v1.3.0/go.mod h1:lzew8VfESA5DQ8gdlHwMrqZs1S9V87v3oCnKCWoOuQU= +cloud.google.com/go/resourcesettings v1.4.0/go.mod h1:ldiH9IJpcrlC3VSuCGvjR5of/ezRrOxFtpJoJo5SmXg= +cloud.google.com/go/retail v1.8.0/go.mod h1:QblKS8waDmNUhghY2TI9O3JLlFk8jybHeV4BF19FrE4= +cloud.google.com/go/retail v1.9.0/go.mod h1:g6jb6mKuCS1QKnH/dpu7isX253absFl6iE92nHwlBUY= +cloud.google.com/go/retail v1.10.0/go.mod h1:2gDk9HsL4HMS4oZwz6daui2/jmKvqShXKQuB2RZ+cCc= +cloud.google.com/go/retail v1.11.0/go.mod h1:MBLk1NaWPmh6iVFSz9MeKG/Psyd7TAgm6y/9L2B4x9Y= +cloud.google.com/go/run v0.2.0/go.mod h1:CNtKsTA1sDcnqqIFR3Pb5Tq0usWxJJvsWOCPldRU3Do= +cloud.google.com/go/run v0.3.0/go.mod h1:TuyY1+taHxTjrD0ZFk2iAR+xyOXEA0ztb7U3UNA0zBo= +cloud.google.com/go/scheduler v1.4.0/go.mod h1:drcJBmxF3aqZJRhmkHQ9b3uSSpQoltBPGPxGAWROx6s= +cloud.google.com/go/scheduler v1.5.0/go.mod h1:ri073ym49NW3AfT6DZi21vLZrG07GXr5p3H1KxN5QlI= +cloud.google.com/go/scheduler v1.6.0/go.mod h1:SgeKVM7MIwPn3BqtcBntpLyrIJftQISRrYB5ZtT+KOk= +cloud.google.com/go/scheduler v1.7.0/go.mod h1:jyCiBqWW956uBjjPMMuX09n3x37mtyPJegEWKxRsn44= +cloud.google.com/go/secretmanager v1.6.0/go.mod h1:awVa/OXF6IiyaU1wQ34inzQNc4ISIDIrId8qE5QGgKA= +cloud.google.com/go/secretmanager v1.8.0/go.mod h1:hnVgi/bN5MYHd3Gt0SPuTPPp5ENina1/LxM+2W9U9J4= +cloud.google.com/go/secretmanager v1.9.0/go.mod h1:b71qH2l1yHmWQHt9LC80akm86mX8AL6X1MA01dW8ht4= +cloud.google.com/go/security v1.5.0/go.mod h1:lgxGdyOKKjHL4YG3/YwIL2zLqMFCKs0UbQwgyZmfJl4= +cloud.google.com/go/security v1.7.0/go.mod h1:mZklORHl6Bg7CNnnjLH//0UlAlaXqiG7Lb9PsPXLfD0= +cloud.google.com/go/security v1.8.0/go.mod h1:hAQOwgmaHhztFhiQ41CjDODdWP0+AE1B3sX4OFlq+GU= +cloud.google.com/go/security v1.9.0/go.mod h1:6Ta1bO8LXI89nZnmnsZGp9lVoVWXqsVbIq/t9dzI+2Q= +cloud.google.com/go/security v1.10.0/go.mod h1:QtOMZByJVlibUT2h9afNDWRZ1G96gVywH8T5GUSb9IA= +cloud.google.com/go/securitycenter v1.13.0/go.mod h1:cv5qNAqjY84FCN6Y9z28WlkKXyWsgLO832YiWwkCWcU= +cloud.google.com/go/securitycenter v1.14.0/go.mod h1:gZLAhtyKv85n52XYWt6RmeBdydyxfPeTrpToDPw4Auc= +cloud.google.com/go/securitycenter v1.15.0/go.mod h1:PeKJ0t8MoFmmXLXWm41JidyzI3PJjd8sXWaVqg43WWk= +cloud.google.com/go/securitycenter v1.16.0/go.mod h1:Q9GMaLQFUD+5ZTabrbujNWLtSLZIZF7SAR0wWECrjdk= +cloud.google.com/go/servicecontrol v1.4.0/go.mod h1:o0hUSJ1TXJAmi/7fLJAedOovnujSEvjKCAFNXPQ1RaU= +cloud.google.com/go/servicecontrol v1.5.0/go.mod h1:qM0CnXHhyqKVuiZnGKrIurvVImCs8gmqWsDoqe9sU1s= +cloud.google.com/go/servicedirectory v1.4.0/go.mod h1:gH1MUaZCgtP7qQiI+F+A+OpeKF/HQWgtAddhTbhL2bs= +cloud.google.com/go/servicedirectory v1.5.0/go.mod h1:QMKFL0NUySbpZJ1UZs3oFAmdvVxhhxB6eJ/Vlp73dfg= +cloud.google.com/go/servicedirectory v1.6.0/go.mod h1:pUlbnWsLH9c13yGkxCmfumWEPjsRs1RlmJ4pqiNjVL4= +cloud.google.com/go/servicedirectory v1.7.0/go.mod h1:5p/U5oyvgYGYejufvxhgwjL8UVXjkuw7q5XcG10wx1U= +cloud.google.com/go/servicemanagement v1.4.0/go.mod h1:d8t8MDbezI7Z2R1O/wu8oTggo3BI2GKYbdG4y/SJTco= +cloud.google.com/go/servicemanagement v1.5.0/go.mod h1:XGaCRe57kfqu4+lRxaFEAuqmjzF0r+gWHjWqKqBvKFo= +cloud.google.com/go/serviceusage v1.3.0/go.mod h1:Hya1cozXM4SeSKTAgGXgj97GlqUvF5JaoXacR1JTP/E= +cloud.google.com/go/serviceusage v1.4.0/go.mod h1:SB4yxXSaYVuUBYUml6qklyONXNLt83U0Rb+CXyhjEeU= +cloud.google.com/go/shell v1.3.0/go.mod h1:VZ9HmRjZBsjLGXusm7K5Q5lzzByZmJHf1d0IWHEN5X4= +cloud.google.com/go/shell v1.4.0/go.mod h1:HDxPzZf3GkDdhExzD/gs8Grqk+dmYcEjGShZgYa9URw= +cloud.google.com/go/spanner v1.41.0/go.mod h1:MLYDBJR/dY4Wt7ZaMIQ7rXOTLjYrmxLE/5ve9vFfWos= +cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= +cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= +cloud.google.com/go/speech v1.8.0/go.mod h1:9bYIl1/tjsAnMgKGHKmBZzXKEkGgtU+MpdDPTE9f7y0= +cloud.google.com/go/speech v1.9.0/go.mod h1:xQ0jTcmnRFFM2RfX/U+rk6FQNUF6DQlydUSyoooSpco= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= +cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= +cloud.google.com/go/storage v1.23.0/go.mod h1:vOEEDNFnciUMhBeT6hsJIn3ieU5cFRmzeLgDvXzfIXc= +cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= +cloud.google.com/go/storagetransfer v1.5.0/go.mod h1:dxNzUopWy7RQevYFHewchb29POFv3/AaBgnhqzqiK0w= +cloud.google.com/go/storagetransfer v1.6.0/go.mod h1:y77xm4CQV/ZhFZH75PLEXY0ROiS7Gh6pSKrM8dJyg6I= +cloud.google.com/go/talent v1.1.0/go.mod h1:Vl4pt9jiHKvOgF9KoZo6Kob9oV4lwd/ZD5Cto54zDRw= +cloud.google.com/go/talent v1.2.0/go.mod h1:MoNF9bhFQbiJ6eFD3uSsg0uBALw4n4gaCaEjBw9zo8g= +cloud.google.com/go/talent v1.3.0/go.mod h1:CmcxwJ/PKfRgd1pBjQgU6W3YBwiewmUzQYH5HHmSCmM= +cloud.google.com/go/talent v1.4.0/go.mod h1:ezFtAgVuRf8jRsvyE6EwmbTK5LKciD4KVnHuDEFmOOA= +cloud.google.com/go/texttospeech v1.4.0/go.mod h1:FX8HQHA6sEpJ7rCMSfXuzBcysDAuWusNNNvN9FELDd8= +cloud.google.com/go/texttospeech v1.5.0/go.mod h1:oKPLhR4n4ZdQqWKURdwxMy0uiTS1xU161C8W57Wkea4= +cloud.google.com/go/tpu v1.3.0/go.mod h1:aJIManG0o20tfDQlRIej44FcwGGl/cD0oiRyMKG19IQ= +cloud.google.com/go/tpu v1.4.0/go.mod h1:mjZaX8p0VBgllCzF6wcU2ovUXN9TONFLd7iz227X2Xg= +cloud.google.com/go/trace v1.3.0/go.mod h1:FFUE83d9Ca57C+K8rDl/Ih8LwOzWIV1krKgxg6N0G28= +cloud.google.com/go/trace v1.4.0/go.mod h1:UG0v8UBqzusp+z63o7FK74SdFE+AXpCLdFb1rshXG+Y= +cloud.google.com/go/translate v1.3.0/go.mod h1:gzMUwRjvOqj5i69y/LYLd8RrNQk+hOmIXTi9+nb3Djs= +cloud.google.com/go/translate v1.4.0/go.mod h1:06Dn/ppvLD6WvA5Rhdp029IX2Mi3Mn7fpMRLPvXT5Wg= +cloud.google.com/go/video v1.8.0/go.mod h1:sTzKFc0bUSByE8Yoh8X0mn8bMymItVGPfTuUBUyRgxk= +cloud.google.com/go/video v1.9.0/go.mod h1:0RhNKFRF5v92f8dQt0yhaHrEuH95m068JYOvLZYnJSw= +cloud.google.com/go/videointelligence v1.6.0/go.mod h1:w0DIDlVRKtwPCn/C4iwZIJdvC69yInhW0cfi+p546uU= +cloud.google.com/go/videointelligence v1.7.0/go.mod h1:k8pI/1wAhjznARtVT9U1llUaFNPh7muw8QyOUpavru4= +cloud.google.com/go/videointelligence v1.8.0/go.mod h1:dIcCn4gVDdS7yte/w+koiXn5dWVplOZkE+xwG9FgK+M= +cloud.google.com/go/videointelligence v1.9.0/go.mod h1:29lVRMPDYHikk3v8EdPSaL8Ku+eMzDljjuvRs105XoU= +cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= +cloud.google.com/go/vision/v2 v2.2.0/go.mod h1:uCdV4PpN1S0jyCyq8sIM42v2Y6zOLkZs+4R9LrGYwFo= +cloud.google.com/go/vision/v2 v2.3.0/go.mod h1:UO61abBx9QRMFkNBbf1D8B1LXdS2cGiiCRx0vSpZoUo= +cloud.google.com/go/vision/v2 v2.4.0/go.mod h1:VtI579ll9RpVTrdKdkMzckdnwMyX2JILb+MhPqRbPsY= +cloud.google.com/go/vision/v2 v2.5.0/go.mod h1:MmaezXOOE+IWa+cS7OhRRLK2cNv1ZL98zhqFFZaaH2E= +cloud.google.com/go/vmmigration v1.2.0/go.mod h1:IRf0o7myyWFSmVR1ItrBSFLFD/rJkfDCUTO4vLlJvsE= +cloud.google.com/go/vmmigration v1.3.0/go.mod h1:oGJ6ZgGPQOFdjHuocGcLqX4lc98YQ7Ygq8YQwHh9A7g= +cloud.google.com/go/vmwareengine v0.1.0/go.mod h1:RsdNEf/8UDvKllXhMz5J40XxDrNJNN4sagiox+OI208= +cloud.google.com/go/vpcaccess v1.4.0/go.mod h1:aQHVbTWDYUR1EbTApSVvMq1EnT57ppDmQzZ3imqIk4w= +cloud.google.com/go/vpcaccess v1.5.0/go.mod h1:drmg4HLk9NkZpGfCmZ3Tz0Bwnm2+DKqViEpeEpOq0m8= +cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xXZmFiHmGE= +cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= +cloud.google.com/go/webrisk v1.6.0/go.mod h1:65sW9V9rOosnc9ZY7A7jsy1zoHS5W9IAXv6dGqhMQMc= +cloud.google.com/go/webrisk v1.7.0/go.mod h1:mVMHgEYH0r337nmt1JyLthzMr6YxwN1aAIEc2fTcq7A= +cloud.google.com/go/websecurityscanner v1.3.0/go.mod h1:uImdKm2wyeXQevQJXeh8Uun/Ym1VqworNDlBXQevGMo= +cloud.google.com/go/websecurityscanner v1.4.0/go.mod h1:ebit/Fp0a+FWu5j4JOmJEV8S8CzdTkAS77oDsiSqYWQ= +cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= +cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= +cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vfKf5Af+to4M= +cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cucumber/gherkin-go/v19 v19.0.3/go.mod h1:jY/NP6jUtRSArQQJ5h1FXOUgk5fZK24qtE7vKi776Vw= +github.com/cucumber/godog v0.12.6/go.mod h1:Y02TTpimPXDb70PnG6M3zpODXm1+bjCsuZzcW76xAww= +github.com/cucumber/messages-go/v16 v16.0.0/go.mod h1:EJcyR5Mm5ZuDsKJnT2N9KRnBK30BGjtYotDKpwQ0v6g= +github.com/cucumber/messages-go/v16 v16.0.1/go.mod h1:EJcyR5Mm5ZuDsKJnT2N9KRnBK30BGjtYotDKpwQ0v6g= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/go-control-plane v0.10.3/go.mod h1:fJJn/j26vwOu972OllsvAgJJM//w9BV6Fxbg2LuVd34= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo= +github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA= +github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= +github.com/go-openapi/spec v0.20.8 h1:ubHmXNY3FCIOinT8RNrrPfGc9t7I1qhPtdOGoG2AxRU= +github.com/go-openapi/spec v0.20.8/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.21.1 h1:wm0rhTb5z7qpJRHBdPOMuY4QjVUMbF6/kwoYeRAOrKU= +github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/envy v1.10.1 h1:ppDLoXv2feQ5nus4IcgtyMdHQkKng2lhJCIm33cblM0= +github.com/gobuffalo/envy v1.10.1/go.mod h1:AWx4++KnNOW3JOeEvhSaq+mvgAvnMYOY1XSIin4Mago= +github.com/gobuffalo/logger v1.0.0/go.mod h1:2zbswyIUa45I+c+FLXuWl9zSWEiVuthsk8ze5s8JvPs= +github.com/gobuffalo/packd v0.3.0/go.mod h1:zC7QkmNkYVGKPw4tHpBQ+ml7W/3tIebgeo1b36chA3Q= +github.com/gobuffalo/packd v1.0.1 h1:U2wXfRr4E9DH8IdsDLlRFwTZTK7hLfq9qT/QHXGVe/0= +github.com/gobuffalo/packd v1.0.1/go.mod h1:PP2POP3p3RXGz7Jh6eYEf93S7vA2za6xM7QT85L4+VY= +github.com/gobuffalo/packr v1.30.1 h1:hu1fuVR3fXEZR7rXNW3h8rqSML8EVAf6KNm0NKO/wKg= +github.com/gobuffalo/packr v1.30.1/go.mod h1:ljMyFO2EcrnzsHsN99cvbq055Y9OhRrIaviy289eRuk= +github.com/gobuffalo/packr/v2 v2.5.1/go.mod h1:8f9c96ITobJlPzI44jj+4tHnEKNt0xXWSVlXRN9X1Iw= +github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= +github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= +github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= +github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= +github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= +github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= +github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= +github.com/hashicorp/go-immutable-radix v1.3.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-memdb v1.3.2/go.mod h1:Mluclgwib3R93Hk5fxEfiRhB+6Dar64wWh71LpNSe3g= +github.com/hashicorp/go-memdb v1.3.3/go.mod h1:uBTr1oQbtuMgd1SSGoR8YV27eT3sBHbYiNm53bMpgSg= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hyperledger/fabric-chaincode-go v0.0.0-20230228194215-b84622ba6a7a h1:HwSCxEeiBthwcazcAykGATQ36oG9M+HEQvGLvB7aLvA= +github.com/hyperledger/fabric-chaincode-go v0.0.0-20230228194215-b84622ba6a7a/go.mod h1:TDSu9gxURldEnaGSFbH1eMlfSQBWQcMQfnDBcpQv5lU= +github.com/hyperledger/fabric-contract-api-go v1.2.1 h1:Ww9cKH/qHl5s6WqF+Ts5ju5eaBxC/awB/BJE+rOsEkM= +github.com/hyperledger/fabric-contract-api-go v1.2.1/go.mod h1:BhWve0gz1iH+Xc+cO3rmeIZI7YaTWOQodka9CgeUOgo= +github.com/hyperledger/fabric-protos-go v0.3.0 h1:MXxy44WTMENOh5TI8+PCK2x6pMj47Go2vFRKDHB2PZs= +github.com/hyperledger/fabric-protos-go v0.3.0/go.mod h1:WWnyWP40P2roPmmvxsUXSvVI/CF6vwY1K1UFidnKBys= +github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/joho/godotenv v1.4.0 h1:3l4+N6zfMWnkbPEXKng2o2/MR5mSwTrBih4ZEkkz1lg= +github.com/joho/godotenv v1.4.0/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/karrick/godirwalk v1.10.12/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= +github.com/lyft/protoc-gen-star v0.6.1/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= +github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg= +github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= +github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/cobra v1.4.0/go.mod h1:Wo4iy3BUC+X2Fybo0PDqwJIv3dNRiZLHQymsfxlB84g= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= +github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= +github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190621222207-cc06ce4a13d4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20221012135044-0b7e1fb9d458/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= +golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= +golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20221006150949-b44042a4b9c1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190515120540-06a5c4944438/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220624220833-87e55d714810/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624180213-70d37148ca0c/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.3.0/go.mod h1:/rWhSS2+zyEVwoJf8YAX6L2f0ntZ7Kn/mGgAWcipA5k= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= +google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= +google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= +google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= +google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= +google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.77.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= +google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= +google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= +google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= +google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= +google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.93.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= +google.golang.org/api v0.95.0/go.mod h1:eADj+UBuxkh5zlrSntJghuNeg8HwQ1w5lTKkuqaETEI= +google.golang.org/api v0.96.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.98.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.99.0/go.mod h1:1YOf74vkVndF7pG6hIHuINsM7eWwpVTAfNMNiL91A08= +google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= +google.golang.org/api v0.102.0/go.mod h1:3VFl6/fzoA+qNuS1N1/VfXY4LjoXN/wzeIp7TweWwGo= +google.golang.org/api v0.103.0/go.mod h1:hGtW6nK1AC+d9si/UBhw8Xli+QMOf6xyNAyJw4qU9w0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220329172620-7be39ac1afc7/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= +google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= +google.golang.org/genproto v0.0.0-20220722212130-b98a9ff5e252/go.mod h1:GkXuJDJ6aQ7lnJcRF+SJVgFdQhypqgl3LB1C9vabdRE= +google.golang.org/genproto v0.0.0-20220801145646-83ce21fca29f/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= +google.golang.org/genproto v0.0.0-20220815135757-37a418bb8959/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220817144833-d7fd3f11b9b1/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220822174746-9e6da59bd2fc/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220829144015-23454907ede3/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220829175752-36a9c930ecbf/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= +google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220914142337-ca0e39ece12f/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220915135415-7fd63a7952de/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220916172020-2692e8806bfa/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220919141832-68c03719ef51/go.mod h1:0Nb8Qy+Sk5eDzHnzlStwW3itdNaWoZA5XeSG+R3JHSo= +google.golang.org/genproto v0.0.0-20220920201722-2b89144ce006/go.mod h1:ht8XFiar2npT/g4vkk7O0WYS1sHOHbdujxbEp7CJWbw= +google.golang.org/genproto v0.0.0-20220926165614-551eb538f295/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= +google.golang.org/genproto v0.0.0-20220926220553-6981cbe3cfce/go.mod h1:woMGP53BroOrRY3xTxlbr8Y3eB/nzAvvFM83q7kG2OI= +google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqwhZAwq4wsRUaVG555sVgsNmIjRtO7t/JH29U= +google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= +google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= +google.golang.org/genproto v0.0.0-20221024153911-1573dae28c9c/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= +google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= +google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c/go.mod h1:CGI5F/G+E5bKwmfYo09AXuVN4dD894kIKUFmVbP2/Fo= +google.golang.org/genproto v0.0.0-20221114212237-e4508ebdbee1/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221117204609-8f9c96812029/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= +google.golang.org/genproto v0.0.0-20221202195650-67e5cbc046fd/go.mod h1:cTsE614GARnxrLsqKREzmNYJACSWWpAWdNMwnD7c2BE= +google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f h1:BWUVssLB0HVOSY78gIdvk1dTVYtT1y8SBWtPYuTJ/6w= +google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= +google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= +google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc= +google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/src/dlt/gateway/dltApp/package-lock.json b/src/dlt/gateway/dltApp/package-lock.json new file mode 100644 index 0000000000000000000000000000000000000000..6fb245621a1e38f84d6806aae2f94fc83394b05a --- /dev/null +++ b/src/dlt/gateway/dltApp/package-lock.json @@ -0,0 +1,2420 @@ +{ + "name": "dlt_gateway", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "dlt_gateway", + "version": "1.0.0", + "license": "Apache-2.0", + "dependencies": { + "@grpc/grpc-js": "^1.10.8", + "@grpc/proto-loader": "^0.7.13", + "@hyperledger/fabric-gateway": "~1.4.0", + "dotenv": "^16.4.5", + "grpc-tools": "^1.12.4", + "protobufjs": "^7.3.0", + "uuid": "^9.0.1" + }, + "devDependencies": { + "@tsconfig/node18": "^18.2.2", + "@types/node": "^18.18.6", + "@typescript-eslint/eslint-plugin": "^6.9.0", + "@typescript-eslint/parser": "^6.9.0", + "eslint": "^8.52.0", + "typescript": "~5.2.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/js": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@grpc/grpc-js": { + "version": "1.10.8", + "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.10.8.tgz", + "integrity": "sha512-vYVqYzHicDqyKB+NQhAc54I1QWCBLCrYG6unqOIcBTHx+7x8C9lcoLj3KVJXs2VB4lUbpWY+Kk9NipcbXYWmvg==", + "dependencies": { + "@grpc/proto-loader": "^0.7.13", + "@js-sdsl/ordered-map": "^4.4.2" + }, + "engines": { + "node": ">=12.10.0" + } + }, + "node_modules/@grpc/proto-loader": { + "version": "0.7.13", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.13.tgz", + "integrity": "sha512-AiXO/bfe9bmxBjxxtYxFAXGZvMaN5s8kO+jBHAJCON8rJoB5YS/D6X7ZNc6XQkuHNmyl4CYaMI1fJ/Gn27RGGw==", + "dependencies": { + "lodash.camelcase": "^4.3.0", + "long": "^5.0.0", + "protobufjs": "^7.2.5", + "yargs": "^17.7.2" + }, + "bin": { + "proto-loader-gen-types": "build/bin/proto-loader-gen-types.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@humanwhocodes/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "dev": true + }, + "node_modules/@hyperledger/fabric-gateway": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@hyperledger/fabric-gateway/-/fabric-gateway-1.4.0.tgz", + "integrity": "sha512-dJ0eJdGBo8wtZ/oR5mADHnllp+pSuVOI7uq5fRFf0NTVk1SzlX42Q3kt4j53bJQaxd21TMvofgXNO+BCgJcB/A==", + "dependencies": { + "@grpc/grpc-js": "^1.9.0", + "@hyperledger/fabric-protos": "^0.2.0", + "asn1.js": "^5.4.1", + "bn.js": "^5.2.1", + "elliptic": "^6.5.4", + "google-protobuf": "^3.21.0" + }, + "engines": { + "node": ">=18.12.0" + }, + "optionalDependencies": { + "pkcs11js": "^1.3.0" + } + }, + "node_modules/@hyperledger/fabric-protos": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/@hyperledger/fabric-protos/-/fabric-protos-0.2.1.tgz", + "integrity": "sha512-qjm0vIQIfCall804tWDeA8p/mUfu14sl5Sj+PbOn2yDKJq+7ThoIhNsLAqf+BCxUfqsoqQq6AojhqQeTFyOOqg==", + "dependencies": { + "@grpc/grpc-js": "^1.9.0", + "google-protobuf": "^3.21.0" + }, + "engines": { + "node": ">=14.15.0" + } + }, + "node_modules/@js-sdsl/ordered-map": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/@js-sdsl/ordered-map/-/ordered-map-4.4.2.tgz", + "integrity": "sha512-iUKgm52T8HOE/makSxjqoWhe95ZJA1/G1sYsGev2JDKUSS14KAgg1LHb+Ba+IPow0xflbnSkOsZcO08C7w1gYw==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/js-sdsl" + } + }, + "node_modules/@mapbox/node-pre-gyp": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz", + "integrity": "sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==", + "dependencies": { + "detect-libc": "^2.0.0", + "https-proxy-agent": "^5.0.0", + "make-dir": "^3.1.0", + "node-fetch": "^2.6.7", + "nopt": "^5.0.0", + "npmlog": "^5.0.1", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.11" + }, + "bin": { + "node-pre-gyp": "bin/node-pre-gyp" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", + "integrity": "sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==" + }, + "node_modules/@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/base64/-/base64-1.1.2.tgz", + "integrity": "sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==" + }, + "node_modules/@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@protobufjs/codegen/-/codegen-2.0.4.tgz", + "integrity": "sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==" + }, + "node_modules/@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/eventemitter/-/eventemitter-1.1.0.tgz", + "integrity": "sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==" + }, + "node_modules/@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/fetch/-/fetch-1.1.0.tgz", + "integrity": "sha512-lljVXpqXebpsijW71PZaCYeIcE5on1w5DlQy5WH6GLbFryLUrBD4932W/E2BSpfRJWseIL4v/KPgBFxDOIdKpQ==", + "dependencies": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "node_modules/@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@protobufjs/float/-/float-1.0.2.tgz", + "integrity": "sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==" + }, + "node_modules/@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/inquire/-/inquire-1.1.0.tgz", + "integrity": "sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==" + }, + "node_modules/@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@protobufjs/path/-/path-1.1.2.tgz", + "integrity": "sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==" + }, + "node_modules/@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/pool/-/pool-1.1.0.tgz", + "integrity": "sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==" + }, + "node_modules/@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", + "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" + }, + "node_modules/@tsconfig/node18": { + "version": "18.2.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node18/-/node18-18.2.4.tgz", + "integrity": "sha512-5xxU8vVs9/FNcvm3gE07fPbn9tl6tqGGWA9tSlwsUEkBxtRnTsNmwrV8gasZ9F/EobaSv9+nu8AxUKccw77JpQ==", + "dev": true + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true + }, + "node_modules/@types/node": { + "version": "18.19.33", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.33.tgz", + "integrity": "sha512-NR9+KrpSajr2qBVp/Yt5TU/rp+b5Mayi3+OlMlcg2cVCfRmcG5PWZ7S4+MG9PZ5gWBoc9Pd0BKSRViuBCRPu0A==", + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@types/semver": { + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", + "dev": true + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz", + "integrity": "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/type-utils": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz", + "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", + "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz", + "integrity": "sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==", + "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", + "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", + "dev": true, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", + "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz", + "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "semver": "^7.5.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", + "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" + }, + "node_modules/acorn": { + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/aproba": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", + "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==" + }, + "node_modules/are-we-there-yet": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", + "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", + "deprecated": "This package is no longer supported.", + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/asn1.js": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", + "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "dependencies": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/asn1.js/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==" + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==" + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "engines": { + "node": ">=10" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "bin": { + "color-support": "bin.js" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "node_modules/console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==" + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true + }, + "node_modules/delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==" + }, + "node_modules/detect-libc": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", + "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/dotenv": { + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/elliptic": { + "version": "6.5.5", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.5.tgz", + "integrity": "sha512-7EjbcmUm17NQFu4Pmgmq2olYMj8nwMnpcddByChSUjArp8F5DQWcIcpriwO4ZToLNAJig0yiyjswfyGNje/ixw==", + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/elliptic/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==" + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/escalade": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "node_modules/fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", + "dev": true + }, + "node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "node_modules/gauge": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz", + "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", + "deprecated": "This package is no longer supported.", + "dependencies": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.2", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.1", + "object-assign": "^4.1.1", + "signal-exit": "^3.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/google-protobuf": { + "version": "3.21.2", + "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.21.2.tgz", + "integrity": "sha512-3MSOYFO5U9mPGikIYCzK0SaThypfGgS6bHqrUGXG3DPHCrb+txNqeEcns1W0lkGfk0rCyNXm7xB9rMxnCiZOoA==" + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, + "node_modules/grpc-tools": { + "version": "1.12.4", + "resolved": "https://registry.npmjs.org/grpc-tools/-/grpc-tools-1.12.4.tgz", + "integrity": "sha512-5+mLAJJma3BjnW/KQp6JBjUMgvu7Mu3dBvBPd1dcbNIb+qiR0817zDpgPjS7gRb+l/8EVNIa3cB02xI9JLToKg==", + "hasInstallScript": true, + "dependencies": { + "@mapbox/node-pre-gyp": "^1.0.5" + }, + "bin": { + "grpc_tools_node_protoc": "bin/protoc.js", + "grpc_tools_node_protoc_plugin": "bin/protoc_plugin.js" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==" + }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/ignore": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==" + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/long": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/long/-/long-5.2.3.tgz", + "integrity": "sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==" + }, + "node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "dev": true, + "dependencies": { + "braces": "^3.0.2", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==" + }, + "node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/nan": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.19.0.tgz", + "integrity": "sha512-nO1xXxfh/RWNxfd/XPfbIfFk5vgLsAxUR9y5O0cHMJu/AW9U95JLXqthYHjEp+8gQ5p96K9jUp8nbVOxCdRbtw==", + "optional": true + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/nopt": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", + "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/npmlog": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", + "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", + "deprecated": "This package is no longer supported.", + "dependencies": { + "are-we-there-yet": "^2.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^3.0.0", + "set-blocking": "^2.0.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pkcs11js": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/pkcs11js/-/pkcs11js-1.3.1.tgz", + "integrity": "sha512-eo7fTeQwYGzX1pFmRaf4ji/WcDW2XKpwqylOwzutsjNWECv6G9PzDHj3Yj5dX9EW/fydMnJG8xvWj/btnQT9TA==", + "hasInstallScript": true, + "optional": true, + "dependencies": { + "nan": "^2.15.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/PeculiarVentures" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/protobufjs": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.3.0.tgz", + "integrity": "sha512-YWD03n3shzV9ImZRX3ccbjqLxj7NokGN0V/ESiBV5xWqrommYHYiihuIyavq03pWSGqlyvYUFmfoMKd+1rPA/g==", + "hasInstallScript": true, + "dependencies": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/node": ">=13.7.0", + "long": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/semver": { + "version": "7.6.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.1.tgz", + "integrity": "sha512-f/vbBsu+fOiYt+lmwZV0rVwJScl46HppnOA1ZvIuBWKOTlllpyJ3bfVax76/OrhCH38dyxoDIA8K7uB963IYgA==", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tar": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "node_modules/ts-api-utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", + "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", + "dev": true, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "dependencies": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "engines": { + "node": ">=12" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/src/dlt/gateway/dltApp/package.json b/src/dlt/gateway/dltApp/package.json new file mode 100644 index 0000000000000000000000000000000000000000..9d29b5287e1d3085c1cede9ab73b23189f3228d3 --- /dev/null +++ b/src/dlt/gateway/dltApp/package.json @@ -0,0 +1,38 @@ +{ + "name": "dlt_gateway", + "version": "1.0.0", + "description": "A DLT application that record and manages network related data as JSON, implemented in typeScript using HLF fabric-gateway", + "main": "dist/index.js", + "typings": "dist/index.d.ts", + "engines": { + "node": ">=18" + }, + "scripts": { + "build": "tsc", + "build:watch": "tsc -w", + "lint": "eslint . --ext .ts", + "prepare": "npm run build", + "pretest": "npm run lint", + "start": "node dist/dlt_gateway.js" + }, + "engineStrict": true, + "author": "Javier Jose Diaz (CTTC)", + "license": "Apache-2.0", + "dependencies": { + "@grpc/grpc-js": "^1.10.8", + "@grpc/proto-loader": "^0.7.13", + "@hyperledger/fabric-gateway": "~1.4.0", + "dotenv": "^16.4.5", + "grpc-tools": "^1.12.4", + "protobufjs": "^7.3.0", + "uuid": "^9.0.1" + }, + "devDependencies": { + "@tsconfig/node18": "^18.2.2", + "@types/node": "^18.18.6", + "@typescript-eslint/eslint-plugin": "^6.9.0", + "@typescript-eslint/parser": "^6.9.0", + "eslint": "^8.52.0", + "typescript": "~5.2.2" + } +} diff --git a/src/dlt/gateway/dltApp/src/dltGateway.js b/src/dlt/gateway/dltApp/src/dltGateway.js new file mode 100644 index 0000000000000000000000000000000000000000..656397dc88bfd8289b53e72a8d1dbde9eab32594 --- /dev/null +++ b/src/dlt/gateway/dltApp/src/dltGateway.js @@ -0,0 +1,262 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +const grpc = require('@grpc/grpc-js'); +const protoLoader = require('@grpc/proto-loader'); +const path = require('path'); +const { connectToNetwork } = require('../dist/fabricConnect'); +const utf8Decoder = new TextDecoder(); + +// Load the protocol buffer definitions +const PROTO_PATH = path.resolve(__dirname, '../proto/dlt_gateway.proto'); +const packageDefinition = protoLoader.loadSync(PROTO_PATH, { + keepCase: true, + longs: String, + enums: String, + defaults: true, + oneofs: true, +}); +const dltProto = grpc.loadPackageDefinition(packageDefinition).dlt; + +// Create a gRPC server instance +const server = new grpc.Server(); +let contractInstance = null; +let closeConnection = null; +let events = null; // To store the events iterable + +const clients = new Set(); // Set to keep track of active client streams + + + +// Initialize connection to the chaincode + +async function initChaincodeConnection() { + try { + const networkResources = await connectToNetwork(); + contractInstance = networkResources.contract; + events = networkResources.events; // Initiate event listening + closeConnection = networkResources.close; + + //console.log("DEBUG", events) + console.log("Chaincode connection established successfully."); + } catch (error) { + console.error('Failed to establish chaincode connection:', error); + process.exit(1); // Exit if the connection cannot be established + } +} + +// gRPC method to handle recording data to the DLT +async function recordToDlt(call, callback) { + if (!contractInstance) { + callback({ + code: grpc.status.UNAVAILABLE, + details: "Chaincode connection is not established." + }); + return; + } + const { record_id, operation, data_json } = call.request; + try { + + + console.log(`Operation requested: ${operation}`); + + switch (operation) { + case 'DLTRECORDOPERATION_ADD': + await contractInstance.submitTransaction('StoreRecord', JSON.stringify(record_id), data_json); + break; + case 'DLTRECORDOPERATION_UPDATE': + await contractInstance.submitTransaction('UpdateRecord', JSON.stringify(record_id), data_json); + break; + case 'DLTRECORDOPERATION_DELETE': + await contractInstance.submitTransaction('DeleteRecord', JSON.stringify(record_id)); + break; + default: + throw new Error('Invalid operation'); + } + // Send success response + callback(null, { record_id, status: 'DLTRECORDSTATUS_SUCCEEDED' }); + } catch (error) { + // Send failure response with error message + console.log("ERRROR", error) + callback(null, { record_id, status: 'DLTRECORDSTATUS_FAILED', error_message: error.message }); + } +} + +// gRPC method to fetch data from the DLT +async function getFromDlt(call, callback) { + + if (!contractInstance) { + callback({ + code: grpc.status.UNAVAILABLE, + details: "Chaincode connection is not established." + }); + return; + } + + try { + + console.log("RECEIVED CALL REQUEST:", call.request); + //const { record_id, operation, data_json } = call.request; + const resultBytes = await contractInstance.evaluateTransaction('RetrieveRecord', JSON.stringify(call.request)); + // Decode and parse the result + const resultJson = utf8Decoder.decode(resultBytes); + const result = JSON.parse(resultJson); + + // Send the response with the formatted JSON data + callback(null, { record_id: call.request, operation: result.operation, data_json: result.data_json }); + } catch (error) { + if (error.message.includes("data not found for key")) { + // Return an empty response when no record is found + console.log("REQUEST ERROR:", error); + const emptyRecordId = { + domain_uuid: { uuid: "" }, + type: 'DLTRECORDTYPE_UNDEFINED', + record_uuid: { uuid: "" } + }; + callback(null, { record_id: emptyRecordId, data_json: "" }); + } else { + // Send failure response with error message + callback({ + code: grpc.status.UNKNOWN, + details: error.message + }); + } + } +} + +// Implement subscription to DLT events + +const eventNameToEventTypeEnum = { + 'StoreRecord': 'EVENTTYPE_CREATE', + 'UpdateRecord': 'EVENTTYPE_UPDATE', + 'DeleteRecord': 'EVENTTYPE_REMOVE' +}; + +function subscribeToDlt(call) { + if (!events) { + call.emit('error', { + code: grpc.status.UNAVAILABLE, + details: "Event listener is not established." + }); + return; + } + + // Add the client to the set of active clients + clients.add(call); + console.log(`Client connected. Total clients: ${clients.size}`); + + // Clean up when the client disconnects + call.on('cancelled', () => { + clients.delete(call); + console.log(`Client disconnected (cancelled). Total clients: ${clients.size}`); + + }); + call.on('error', (err) => { + clients.delete(call); + console.log(`Client disconnected (error: ${err.message}). Total clients: ${clients.size}`); + + }); + call.on('end', () => { + clients.delete(call); + console.log(`Client disconnected (end). Total clients: ${clients.size}`); + + }); + + (async () => { + try { + for await (const event of events) { + const eventPayload = event.payload; + //console.log("Raw event payload:", eventPayload); + const resultJson = utf8Decoder.decode(eventPayload); + const eventJson = JSON.parse(resultJson); + + console.log("Writing event to stream:", eventJson.record_id); + + const eventType = eventNameToEventTypeEnum[event.eventName] || 'EVENTTYPE_UNDEFINED'; + + for (const client of clients) { + const writeSuccessful = client.write({ + event: { + timestamp: { timestamp: Math.floor(Date.now() / 1000) }, + event_type: eventType // Set appropriate event type + }, + record_id: { + domain_uuid: { uuid: eventJson.record_id.domain_uuid.uuid }, + type: eventJson.record_id.type || 'DLTRECORDTYPE_UNDEFINED', + record_uuid: { uuid: eventJson.record_id.record_uuid.uuid } + } + }); + + // Check if the internal buffer is full + if (!writeSuccessful) { + // Wait for the 'drain' event before continuing + await new Promise((resolve) => client.once('drain', resolve)); + } + } + } + + //call.end(); + + } catch (error) { + for (const client of clients) { + client.emit('error', { + code: grpc.status.UNKNOWN, + details: `Error processing event: ${error.message}` + }); + + } + } + })(); +} + +// Placeholder +function getDltStatus(call, callback) { + // Implement status fetching logic here + // Not implemented for simplicity +} + +// Placeholder +function getDltPeers(call, callback) { + // Implement peers fetching logic here + // Not implemented for simplicity +} + +// Add the service to the server +server.addService(dltProto.DltGatewayService.service, { + RecordToDlt: recordToDlt, + GetFromDlt: getFromDlt, + SubscribeToDlt: subscribeToDlt, + GetDltStatus: getDltStatus, + GetDltPeers: getDltPeers, +}); + +// Start the server +const PORT = process.env.GRPC_PORT || '50051'; +server.bindAsync(`0.0.0.0:${PORT}`, grpc.ServerCredentials.createInsecure(), async (error) => { + if (error) { + console.error('Failed to bind server:', error); + return; + } + console.log(`gRPC server running at http://0.0.0.0:${PORT}`); + await initChaincodeConnection(); //Connects to the chaincode and + server; +}); + +// Handle shutdown gracefully +process.on('SIGINT', async () => { + console.log('Shutting down...'); + await closeConnection(); + server.forceShutdown(); +}); \ No newline at end of file diff --git a/src/dlt/gateway/dltApp/src/fabricConnect.ts b/src/dlt/gateway/dltApp/src/fabricConnect.ts new file mode 100644 index 0000000000000000000000000000000000000000..973fd6077cd3e4ee7d397f8625f4a399935183f9 --- /dev/null +++ b/src/dlt/gateway/dltApp/src/fabricConnect.ts @@ -0,0 +1,209 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import * as grpc from '@grpc/grpc-js'; +import { connect, Contract, Identity, Signer, signers, Network, CloseableAsyncIterable, ChaincodeEvent, GatewayError } from '@hyperledger/fabric-gateway'; +import * as crypto from 'crypto'; +import { promises as fs } from 'fs'; +import * as path from 'path'; +import { TextDecoder } from 'util'; +import * as dotenv from 'dotenv'; + +dotenv.config({ path: path.resolve(__dirname, '..', '.env') }); +const channelName = getEnvVar('CHANNEL_NAME'); +const chaincodeName = getEnvVar('CHAINCODE_NAME'); +const mspId = getEnvVar('MSP_ID'); + + +// Path to user private key directory. +const keyDirectoryPath = getEnvVar('KEY_DIRECTORY_PATH'); + +// Path to user certificate directory. +const certDirectoryPath = getEnvVar('CERT_DIRECTORY_PATH'); + +// Path to peer tls certificate. +const tlsCertPath = getEnvVar('TLS_CERT_PATH'); + +// Gateway peer endpoint. +const peerEndpoint = getEnvVar('PEER_ENDPOINT'); + +// Gateway peer SSL host name override. +const peerHostAlias = getEnvVar('PEER_HOST_ALIAS'); + +const utf8Decoder = new TextDecoder(); +const assetId = `asset${Date.now()}`; + +export async function connectToNetwork(): Promise<{ contract: Contract, events: CloseableAsyncIterable<ChaincodeEvent>, close: () => Promise<void> }> { + + await displayInputParameters(); + + // The gRPC client connection should be shared by all Gateway connections to this endpoint. + + const client = await newGrpcConnection(); + + const gateway = connect({ + client, + identity: await newIdentity(), + signer: await newSigner(), + // Default timeouts for different gRPC calls + evaluateOptions: () => { + return { deadline: Date.now() + 5000 }; // 5 seconds + }, + endorseOptions: () => { + return { deadline: Date.now() + 15000 }; // 15 seconds + }, + submitOptions: () => { + return { deadline: Date.now() + 5000 }; // 5 seconds + }, + commitStatusOptions: () => { + return { deadline: Date.now() + 60000 }; // 1 minute + }, + }); + + let events: CloseableAsyncIterable<ChaincodeEvent> | undefined; + + + // Get a network instance representing the channel where the smart contract is deployed. + const network = gateway.getNetwork(channelName); + + // Get the smart contract from the network. + const contract = network.getContract(chaincodeName); + + //Listen for events emitted by transactions + //events = await startEventListening(network); + events = await network.getChaincodeEvents(chaincodeName); + + // Initialize the ledger. + await initLedger(contract); + + console.log(Date.now()) + + return { + contract: contract, + events: events, + close: async function () { + if (events) events.close(); + gateway.close(); + client.close(); + } + }; + + +} + +async function newGrpcConnection(): Promise<grpc.Client> { + const tlsRootCert = await fs.readFile(tlsCertPath); + const tlsCredentials = grpc.credentials.createSsl(tlsRootCert); + return new grpc.Client(peerEndpoint, tlsCredentials, { + 'grpc.ssl_target_name_override': peerHostAlias, + }); +} + +async function newIdentity(): Promise<Identity> { + //const certPath = await getFirstDirFileName(certDirectoryPath); + //console.log("DEBUG", certDirectoryPath); + const credentials = await fs.readFile(certDirectoryPath); + return { mspId, credentials }; +} + + +async function newSigner(): Promise<Signer> { + //const keyPath = await getFirstDirFileName(keyDirectoryPath); + //console.log("DEBUG2", keyDirectoryPath); + const privateKeyPem = await fs.readFile(keyDirectoryPath); + const privateKey = crypto.createPrivateKey(privateKeyPem); + return signers.newPrivateKeySigner(privateKey); +} + +/** + * This type of transaction would typically only be run once by an application the first time it was started after its + * initial deployment. A new version of the chaincode deployed later would likely not need to run an "init" function. + */ +async function initLedger(contract: Contract): Promise<void> { + try { + console.log('\n--> Submit Transaction: InitLedger, function activates the chaincode'); + + await contract.submitTransaction('InitLedger'); + + console.log('*** Transaction committed successfully'); + } catch (error) { + console.error('Failed to submit InitLedger transaction:', error); + throw error; + } +} + + + +/** + * getEnvVar() will return the value of an environment variable. + */ +function getEnvVar(varName: string): string { + const value = process.env[varName]; + if (!value) { + throw new Error(`Environment variable ${varName} is not set`); + } + return value; +} + +/** + * displayInputParameters() will print the global scope parameters used by the main driver routine. + */ +async function displayInputParameters(): Promise<void> { + console.log(`channelName: ${channelName}`); + console.log(`chaincodeName: ${chaincodeName}`); + console.log(`mspId: ${mspId}`); + console.log(`keyDirectoryPath: ${keyDirectoryPath}`); + console.log(`certDirectoryPath: ${certDirectoryPath}`); + console.log(`tlsCertPath: ${tlsCertPath}`); + console.log(`peerEndpoint: ${peerEndpoint}`); + console.log(`peerHostAlias: ${peerHostAlias}`); +} + +/** + * startEventListening() will initiate the event listener for chaincode events. + */ +async function startEventListening(network: Network): Promise<CloseableAsyncIterable<ChaincodeEvent>> { + console.log('\n*** Start chaincode event listening'); + + const events = await network.getChaincodeEvents(chaincodeName); + + void readEvents(events); // Don't await - run asynchronously + return events; +} + +/** + * readEvents() format and display the events as a JSON. + */ +async function readEvents(events: CloseableAsyncIterable<ChaincodeEvent>): Promise<void> { + try { + for await (const event of events) { + const payload = parseJson(event.payload); + console.log(`\n<-- Chaincode event received: ${event.eventName} -`, payload); + } + } catch (error: unknown) { + // Ignore the read error when events.close() is called explicitly + if (!(error instanceof GatewayError) || error.code !== grpc.status.CANCELLED.valueOf()) { + throw error; + } + } +} + +/** + * parseJson() formats a JSON. + */ +function parseJson(jsonBytes: Uint8Array): unknown { + const json = utf8Decoder.decode(jsonBytes); + return JSON.parse(json); +} + diff --git a/src/dlt/gateway/dltApp/tsconfig.json b/src/dlt/gateway/dltApp/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..34eddef69221adeca4861399d574047a8c9ae6f1 --- /dev/null +++ b/src/dlt/gateway/dltApp/tsconfig.json @@ -0,0 +1,17 @@ +{ + "extends":"@tsconfig/node18/tsconfig.json", + "compilerOptions": { + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "outDir": "dist", + "declaration": true, + "sourceMap": true, + "noImplicitAny": true + }, + "include": [ + "./src/**/*" ], + "exclude": [ + "./src/**/*.spec.ts" + ] + } + \ No newline at end of file diff --git a/src/dlt/gateway/keys/.gitignore b/src/dlt/gateway/keys/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..b54a37fc5e1fa51616f1de2ef20651cb28504040 --- /dev/null +++ b/src/dlt/gateway/keys/.gitignore @@ -0,0 +1,3 @@ +ca.crt +cert.pem +priv_sk diff --git a/src/dlt/gateway/keys/place_hls_keys_in_this_folder b/src/dlt/gateway/keys/place_hls_keys_in_this_folder new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/dlt/gateway/samples/sampleTopo.json b/src/dlt/gateway/samples/sampleTopo.json new file mode 100644 index 0000000000000000000000000000000000000000..67115d4be322ed8567688c51a68a95c2b0800138 --- /dev/null +++ b/src/dlt/gateway/samples/sampleTopo.json @@ -0,0 +1,30 @@ +{ + "name": "Network A", + "nodes": [ + { + "id": "node1", + "type": "switch", + "status": "active", + "connections": [ + "node2", + "node3" + ] + }, + { + "id": "node2", + "type": "router", + "status": "inactive", + "connections": [ + "node1" + ] + }, + { + "id": "node3", + "type": "server", + "status": "active", + "connections": [ + "node1" + ] + } + ] +} diff --git a/src/dlt/gateway/samples/topo1.json b/src/dlt/gateway/samples/topo1.json new file mode 100644 index 0000000000000000000000000000000000000000..e4a49981f99339d77538af814365703e463d3db5 --- /dev/null +++ b/src/dlt/gateway/samples/topo1.json @@ -0,0 +1,96 @@ +{ + "contexts": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}} + ], + "topologies": [ + {"topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}} + ], + "devices": [ + { + "device_id": {"device_uuid": {"uuid": "DC1"}}, "device_type": "emu-datacenter", "device_drivers": [0], + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "eth1", "type": "copper"}, {"uuid": "eth2", "type": "copper"}, {"uuid": "int", "type": "copper"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "DC2"}}, "device_type": "emu-datacenter", "device_drivers": [0], + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "eth1", "type": "copper"}, {"uuid": "eth2", "type": "copper"}, {"uuid": "int", "type": "copper"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "SRL1"}}, "device_type": "packet-router", "device_drivers": [8], + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.100.100.101"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "57400"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "NokiaSrl1!", "use_tls": true + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "SRL2"}}, "device_type": "packet-router", "device_drivers": [8], + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.100.100.102"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "57400"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "NokiaSrl1!", "use_tls": true + }}} + ]} + } + ], + "links": [ + { + "link_id": {"link_uuid": {"uuid": "DC1/eth1==SRL1/ethernet-1/2"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "DC1"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "SRL1"}}, "endpoint_uuid": {"uuid": "ethernet-1/2"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "SRL1/ethernet-1/2==DC1/eth1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "SRL1"}}, "endpoint_uuid": {"uuid": "ethernet-1/2"}}, + {"device_id": {"device_uuid": {"uuid": "DC1"}}, "endpoint_uuid": {"uuid": "eth1"}} + ] + }, + + { + "link_id": {"link_uuid": {"uuid": "SRL1/ethernet-1/1==SRL2/ethernet-1/1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "SRL1"}}, "endpoint_uuid": {"uuid": "ethernet-1/1"}}, + {"device_id": {"device_uuid": {"uuid": "SRL2"}}, "endpoint_uuid": {"uuid": "ethernet-1/1"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "SRL2/ethernet-1/1==SRL1/ethernet-1/1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "SRL2"}}, "endpoint_uuid": {"uuid": "ethernet-1/1"}}, + {"device_id": {"device_uuid": {"uuid": "SRL1"}}, "endpoint_uuid": {"uuid": "ethernet-1/1"}} + ] + }, + + { + "link_id": {"link_uuid": {"uuid": "DC2/eth1==SRL2/ethernet-1/2"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "DC2"}}, "endpoint_uuid": {"uuid": "eth1"}}, + {"device_id": {"device_uuid": {"uuid": "SRL2"}}, "endpoint_uuid": {"uuid": "ethernet-1/2"}} + ] + }, + { + "link_id": {"link_uuid": {"uuid": "SRL2/ethernet-1/2==DC2/eth1"}}, + "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "SRL2"}}, "endpoint_uuid": {"uuid": "ethernet-1/2"}}, + {"device_id": {"device_uuid": {"uuid": "DC2"}}, "endpoint_uuid": {"uuid": "eth1"}} + ] + } + ] +} diff --git a/src/dlt/gateway/samples/topo2.json b/src/dlt/gateway/samples/topo2.json new file mode 100644 index 0000000000000000000000000000000000000000..6885c7d9082bfcb17447252636ea4efb0f500283 --- /dev/null +++ b/src/dlt/gateway/samples/topo2.json @@ -0,0 +1,210 @@ +{ + "contexts": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}} + ], + "topologies": [ + {"topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}} + ], + "devices": [ + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/1"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/2"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/3"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/4"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/5"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/6"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/1"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/2"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/3"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/1"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/2"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/3"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/4"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/5"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/6"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/1"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/2"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/3"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R3"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/1"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/2"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/3"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/4"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/5"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/6"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/1"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/2"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/3"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R4"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/1"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/2"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/3"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/4"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/5"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/6"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/1"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/2"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/3"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R5"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/1"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/2"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/3"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/4"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/5"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/6"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/1"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/2"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/3"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R6"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/1"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/2"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/3"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/4"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/5"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/6"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/1"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/2"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/3"} + ]}}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R7"}}, "device_type": "emu-packet-router", "device_drivers": [0], + "device_endpoints": [], "device_operational_status": 1, "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/1"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/2"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "1/3"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/1"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/2"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/3"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/4"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/5"}, + {"sample_types": [101, 102, 201, 202], "type": "copper", "uuid": "2/6"} + ]}}} + ]} + } + ], + "links": [ + {"link_id": {"link_uuid": {"uuid": "R1==R2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R1==R6"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R1==R7"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R2==R1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R2==R3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R3==R2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R3==R4"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R3==R7"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/3"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R4==R3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R4==R5"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R5==R4"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R4"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R5==R6"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R5==R7"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/5"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R6==R1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/2"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R6==R5"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R6"}}, "endpoint_uuid": {"uuid": "2/2"}}, + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R7==R1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/1"}}, + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2/3"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R7==R3"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/3"}}, + {"device_id": {"device_uuid": {"uuid": "R3"}}, "endpoint_uuid": {"uuid": "2/3"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R7==R5"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R7"}}, "endpoint_uuid": {"uuid": "2/5"}}, + {"device_id": {"device_uuid": {"uuid": "R5"}}, "endpoint_uuid": {"uuid": "2/3"}} + ]} + ] +} diff --git a/src/dlt/gateway/samples/topo3.json b/src/dlt/gateway/samples/topo3.json new file mode 100644 index 0000000000000000000000000000000000000000..f36fbd7d03a93db61a7233e084f60e7680a54606 --- /dev/null +++ b/src/dlt/gateway/samples/topo3.json @@ -0,0 +1,200 @@ +{ + "contexts": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}, "name": "admin"} + ], + "topologies": [ + {"topology_id": {"topology_uuid": {"uuid": "admin"}, "context_id": {"context_uuid": {"uuid": "admin"}}}, "name": "admin"} + ], + "devices": [ + {"device_id": {"device_uuid": {"uuid": "fr1.fr"}}, "device_type": "emu-packet-router", "device_operational_status": 1, "device_drivers": [0], "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "client:1", "type": "copper"}, {"uuid": "client:2", "type": "copper"}, {"uuid": "client:3", "type": "copper"}, + {"uuid": "be1.be", "type": "copper"}, {"uuid": "pt1.pt", "type": "copper"}, {"uuid": "uk1.uk", "type": "copper"}, + {"uuid": "es1.es", "type": "copper"}, {"uuid": "it1.it", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "be1.be"}}, "device_type": "emu-packet-router", "device_operational_status": 1, "device_drivers": [0], "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "client:1", "type": "copper"}, {"uuid": "client:2", "type": "copper"}, {"uuid": "client:3", "type": "copper"}, + {"uuid": "de1.de", "type": "copper"}, {"uuid": "gr1.gr", "type": "copper"}, {"uuid": "uk1.uk", "type": "copper"}, + {"uuid": "fr1.fr", "type": "copper"}, {"uuid": "it1.it", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "uk1.uk"}}, "device_type": "emu-packet-router", "device_operational_status": 1, "device_drivers": [0], "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "client:1", "type": "copper"}, {"uuid": "client:2", "type": "copper"}, {"uuid": "client:3", "type": "copper"}, + {"uuid": "de1.de", "type": "copper"}, {"uuid": "fr1.fr", "type": "copper"}, {"uuid": "be1.be", "type": "copper"}, + {"uuid": "pt1.pt", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "de1.de"}}, "device_type": "emu-packet-router", "device_operational_status": 1, "device_drivers": [0], "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "client:1", "type": "copper"}, {"uuid": "client:2", "type": "copper"}, {"uuid": "client:3", "type": "copper"}, + {"uuid": "uk1.uk", "type": "copper"}, {"uuid": "be1.be", "type": "copper"}, {"uuid": "gr1.gr", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "pt1.pt"}}, "device_type": "emu-packet-router", "device_operational_status": 1, "device_drivers": [0], "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "client:1", "type": "copper"}, {"uuid": "client:2", "type": "copper"}, {"uuid": "client:3", "type": "copper"}, + {"uuid": "uk1.uk", "type": "copper"}, {"uuid": "fr1.fr", "type": "copper"}, {"uuid": "es1.es", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "es1.es"}}, "device_type": "emu-packet-router", "device_operational_status": 1, "device_drivers": [0], "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "client:1", "type": "copper"}, {"uuid": "client:2", "type": "copper"}, {"uuid": "client:3", "type": "copper"}, + {"uuid": "it1.it", "type": "copper"}, {"uuid": "fr1.fr", "type": "copper"}, {"uuid": "pt1.pt", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "it1.it"}}, "device_type": "emu-packet-router", "device_operational_status": 1, "device_drivers": [0], "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "client:1", "type": "copper"}, {"uuid": "client:2", "type": "copper"}, {"uuid": "client:3", "type": "copper"}, + {"uuid": "es1.es", "type": "copper"}, {"uuid": "fr1.fr", "type": "copper"}, {"uuid": "be1.be", "type": "copper"}, + {"uuid": "gr1.gr", "type": "copper"} + ]}}} + ]}}, + {"device_id": {"device_uuid": {"uuid": "gr1.gr"}}, "device_type": "emu-packet-router", "device_operational_status": 1, "device_drivers": [0], "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "127.0.0.1"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "0"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": {"endpoints": [ + {"uuid": "client:1", "type": "copper"}, {"uuid": "client:2", "type": "copper"}, {"uuid": "client:3", "type": "copper"}, + {"uuid": "it1.it", "type": "copper"}, {"uuid": "de1.de", "type": "copper"}, {"uuid": "be1.be", "type": "copper"} + ]}}} + ]}} + ], + "links": [ + {"link_id": {"link_uuid": {"uuid": "fr1.fr_be1.be"}}, "attributes": {"total_capacity_gbps": 100, "used_capacity_gbps": 4.804849}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "fr1.fr"}}, "endpoint_uuid": {"uuid": "be1.be"}}, + {"device_id": {"device_uuid": {"uuid": "be1.be"}}, "endpoint_uuid": {"uuid": "fr1.fr"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "uk1.uk_fr1.fr"}}, "attributes": {"total_capacity_gbps": 300, "used_capacity_gbps": 55.182499}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "uk1.uk"}}, "endpoint_uuid": {"uuid": "fr1.fr"}}, + {"device_id": {"device_uuid": {"uuid": "fr1.fr"}}, "endpoint_uuid": {"uuid": "uk1.uk"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "uk1.uk_de1.de"}}, "attributes": {"total_capacity_gbps": 600, "used_capacity_gbps": 199.272255}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "uk1.uk"}}, "endpoint_uuid": {"uuid": "de1.de"}}, + {"device_id": {"device_uuid": {"uuid": "de1.de"}}, "endpoint_uuid": {"uuid": "uk1.uk"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "uk1.uk_be1.be"}}, "attributes": {"total_capacity_gbps": 100, "used_capacity_gbps": 14.334868}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "uk1.uk"}}, "endpoint_uuid": {"uuid": "be1.be"}}, + {"device_id": {"device_uuid": {"uuid": "be1.be"}}, "endpoint_uuid": {"uuid": "uk1.uk"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "pt1.pt_uk1.uk"}}, "attributes": {"total_capacity_gbps": 400, "used_capacity_gbps": 51.415678}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "pt1.pt"}}, "endpoint_uuid": {"uuid": "uk1.uk"}}, + {"device_id": {"device_uuid": {"uuid": "uk1.uk"}}, "endpoint_uuid": {"uuid": "pt1.pt"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "pt1.pt_fr1.fr"}}, "attributes": {"total_capacity_gbps": 100, "used_capacity_gbps": 3.733925}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "pt1.pt"}}, "endpoint_uuid": {"uuid": "fr1.fr"}}, + {"device_id": {"device_uuid": {"uuid": "fr1.fr"}}, "endpoint_uuid": {"uuid": "pt1.pt"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "pt1.pt_es1.es"}}, "attributes": {"total_capacity_gbps": 100, "used_capacity_gbps": 13.32428}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "pt1.pt"}}, "endpoint_uuid": {"uuid": "es1.es"}}, + {"device_id": {"device_uuid": {"uuid": "es1.es"}}, "endpoint_uuid": {"uuid": "pt1.pt"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "it1.it_gr1.gr"}}, "attributes": {"total_capacity_gbps": 800, "used_capacity_gbps": 1.593313}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "it1.it"}}, "endpoint_uuid": {"uuid": "gr1.gr"}}, + {"device_id": {"device_uuid": {"uuid": "gr1.gr"}}, "endpoint_uuid": {"uuid": "it1.it"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "it1.it_fr1.fr"}}, "attributes": {"total_capacity_gbps": 200, "used_capacity_gbps": 98.574706}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "it1.it"}}, "endpoint_uuid": {"uuid": "fr1.fr"}}, + {"device_id": {"device_uuid": {"uuid": "fr1.fr"}}, "endpoint_uuid": {"uuid": "it1.it"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "it1.it_es1.es"}}, "attributes": {"total_capacity_gbps": 300, "used_capacity_gbps": 18.97108}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "it1.it"}}, "endpoint_uuid": {"uuid": "es1.es"}}, + {"device_id": {"device_uuid": {"uuid": "es1.es"}}, "endpoint_uuid": {"uuid": "it1.it"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "it1.it_be1.be"}}, "attributes": {"total_capacity_gbps": 100, "used_capacity_gbps": 10.327772}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "it1.it"}}, "endpoint_uuid": {"uuid": "be1.be"}}, + {"device_id": {"device_uuid": {"uuid": "be1.be"}}, "endpoint_uuid": {"uuid": "it1.it"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "gr1.gr_it1.it"}}, "attributes": {"total_capacity_gbps": 100, "used_capacity_gbps": 7.983659}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "gr1.gr"}}, "endpoint_uuid": {"uuid": "it1.it"}}, + {"device_id": {"device_uuid": {"uuid": "it1.it"}}, "endpoint_uuid": {"uuid": "gr1.gr"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "gr1.gr_de1.de"}}, "attributes": {"total_capacity_gbps": 5000, "used_capacity_gbps": 4930.897339}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "gr1.gr"}}, "endpoint_uuid": {"uuid": "de1.de"}}, + {"device_id": {"device_uuid": {"uuid": "de1.de"}}, "endpoint_uuid": {"uuid": "gr1.gr"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "gr1.gr_be1.be"}}, "attributes": {"total_capacity_gbps": 100, "used_capacity_gbps": 0.895539}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "gr1.gr"}}, "endpoint_uuid": {"uuid": "be1.be"}}, + {"device_id": {"device_uuid": {"uuid": "be1.be"}}, "endpoint_uuid": {"uuid": "gr1.gr"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "fr1.fr_uk1.uk"}}, "attributes": {"total_capacity_gbps": 200, "used_capacity_gbps": 28.144199}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "fr1.fr"}}, "endpoint_uuid": {"uuid": "uk1.uk"}}, + {"device_id": {"device_uuid": {"uuid": "uk1.uk"}}, "endpoint_uuid": {"uuid": "fr1.fr"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "fr1.fr_pt1.pt"}}, "attributes": {"total_capacity_gbps": 100, "used_capacity_gbps": 1.916587}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "fr1.fr"}}, "endpoint_uuid": {"uuid": "pt1.pt"}}, + {"device_id": {"device_uuid": {"uuid": "pt1.pt"}}, "endpoint_uuid": {"uuid": "fr1.fr"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "fr1.fr_it1.it"}}, "attributes": {"total_capacity_gbps": 100, "used_capacity_gbps": 3.330747}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "fr1.fr"}}, "endpoint_uuid": {"uuid": "it1.it"}}, + {"device_id": {"device_uuid": {"uuid": "it1.it"}}, "endpoint_uuid": {"uuid": "fr1.fr"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "fr1.fr_es1.es"}}, "attributes": {"total_capacity_gbps": 100, "used_capacity_gbps": 96.682749}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "fr1.fr"}}, "endpoint_uuid": {"uuid": "es1.es"}}, + {"device_id": {"device_uuid": {"uuid": "es1.es"}}, "endpoint_uuid": {"uuid": "fr1.fr"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "es1.es_pt1.pt"}}, "attributes": {"total_capacity_gbps": 100, "used_capacity_gbps": 5.643483}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "es1.es"}}, "endpoint_uuid": {"uuid": "pt1.pt"}}, + {"device_id": {"device_uuid": {"uuid": "pt1.pt"}}, "endpoint_uuid": {"uuid": "es1.es"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "es1.es_it1.it"}}, "attributes": {"total_capacity_gbps": 100, "used_capacity_gbps": 15.353667}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "es1.es"}}, "endpoint_uuid": {"uuid": "it1.it"}}, + {"device_id": {"device_uuid": {"uuid": "it1.it"}}, "endpoint_uuid": {"uuid": "es1.es"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "es1.es_fr1.fr"}}, "attributes": {"total_capacity_gbps": 100, "used_capacity_gbps": 20.517778}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "es1.es"}}, "endpoint_uuid": {"uuid": "fr1.fr"}}, + {"device_id": {"device_uuid": {"uuid": "fr1.fr"}}, "endpoint_uuid": {"uuid": "es1.es"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "de1.de_uk1.uk"}}, "attributes": {"total_capacity_gbps": 600, "used_capacity_gbps": 239.446965}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "de1.de"}}, "endpoint_uuid": {"uuid": "uk1.uk"}}, + {"device_id": {"device_uuid": {"uuid": "uk1.uk"}}, "endpoint_uuid": {"uuid": "de1.de"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "de1.de_gr1.gr"}}, "attributes": {"total_capacity_gbps": 2100, "used_capacity_gbps": 110.602237}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "de1.de"}}, "endpoint_uuid": {"uuid": "gr1.gr"}}, + {"device_id": {"device_uuid": {"uuid": "gr1.gr"}}, "endpoint_uuid": {"uuid": "de1.de"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "de1.de_be1.be"}}, "attributes": {"total_capacity_gbps": 100, "used_capacity_gbps": 57.709307}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "de1.de"}}, "endpoint_uuid": {"uuid": "be1.be"}}, + {"device_id": {"device_uuid": {"uuid": "be1.be"}}, "endpoint_uuid": {"uuid": "de1.de"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "uk1.uk_pt1.pt"}}, "attributes": {"total_capacity_gbps": 800, "used_capacity_gbps": 652.70225}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "uk1.uk"}}, "endpoint_uuid": {"uuid": "pt1.pt"}}, + {"device_id": {"device_uuid": {"uuid": "pt1.pt"}}, "endpoint_uuid": {"uuid": "uk1.uk"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "be1.be_uk1.uk"}}, "attributes": {"total_capacity_gbps": 200, "used_capacity_gbps": 8.252107}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "be1.be"}}, "endpoint_uuid": {"uuid": "uk1.uk"}}, + {"device_id": {"device_uuid": {"uuid": "uk1.uk"}}, "endpoint_uuid": {"uuid": "be1.be"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "be1.be_it1.it"}}, "attributes": {"total_capacity_gbps": 100, "used_capacity_gbps": 0.357069}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "be1.be"}}, "endpoint_uuid": {"uuid": "it1.it"}}, + {"device_id": {"device_uuid": {"uuid": "it1.it"}}, "endpoint_uuid": {"uuid": "be1.be"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "be1.be_de1.de"}}, "attributes": {"total_capacity_gbps": 100, "used_capacity_gbps": 20.400142}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "be1.be"}}, "endpoint_uuid": {"uuid": "de1.de"}}, + {"device_id": {"device_uuid": {"uuid": "de1.de"}}, "endpoint_uuid": {"uuid": "be1.be"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "be1.be_fr1.fr"}}, "attributes": {"total_capacity_gbps": 100, "used_capacity_gbps": 31.346514}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "be1.be"}}, "endpoint_uuid": {"uuid": "fr1.fr"}}, + {"device_id": {"device_uuid": {"uuid": "fr1.fr"}}, "endpoint_uuid": {"uuid": "be1.be"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "be1.be_gr1.gr"}}, "attributes": {"total_capacity_gbps": 100, "used_capacity_gbps": 0.026822}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "be1.be"}}, "endpoint_uuid": {"uuid": "gr1.gr"}}, + {"device_id": {"device_uuid": {"uuid": "gr1.gr"}}, "endpoint_uuid": {"uuid": "be1.be"}} + ]} + ] +} diff --git a/src/dlt/gateway/samples/topo4.json b/src/dlt/gateway/samples/topo4.json new file mode 100644 index 0000000000000000000000000000000000000000..85bbad55eb8608d2d2a7abad7fffab8fffdae682 --- /dev/null +++ b/src/dlt/gateway/samples/topo4.json @@ -0,0 +1,150 @@ +{ + "contexts": [ + {"context_id": {"context_uuid": {"uuid": "admin"}}} + ], + "topologies": [ + {"topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}}} + ], + "devices": [ + { + "device_id": {"device_uuid": {"uuid": "T1"}}, "device_type": "optical-transponder", "device_drivers": [11], + "device_operational_status": 1, + "device_endpoints": [ + {"endpoint_id": { + "device_id": {"device_uuid": {"uuid": "T1"}}, "endpoint_uuid": {"uuid": "1"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }} + ], + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.254.253.101"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "2022"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", "force_running": false, "hostkey_verify": false, + "look_for_keys": false, "allow_agent": false, "commit_per_rule": false, + "device_params": {"name": "default"}, "manager_params": {"timeout": 120}, + "endpoints": [{"uuid": "1", "type": "optical", "sample_types": [101, 102, 201, 202]}] + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "T2"}}, "device_type": "optical-transponder", "device_drivers": [11], + "device_operational_status": 1, + "device_endpoints": [ + {"endpoint_id": { + "device_id": {"device_uuid": {"uuid": "T2"}}, "endpoint_uuid": {"uuid": "6"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }} + ], + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.254.253.102"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "2022"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", "force_running": false, "hostkey_verify": false, + "look_for_keys": false, "allow_agent": false, "commit_per_rule": false, + "device_params": {"name": "default"}, "manager_params": {"timeout": 120}, + "endpoints": [{"uuid": "6", "type": "optical", "sample_types": [101, 102, 201, 202]}] + }}} + ]} + }, + { + "device_id": {"device_uuid": {"uuid": "R1"}}, "device_type": "optical-roadm", "device_drivers": [11], + "device_operational_status": 1, + "device_endpoints": [ + {"endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }}, + {"endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "3"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }}, + {"endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "12"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }}, + {"endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "13"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }} + ], + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.254.253.201"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "2022"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", "force_running": false, "hostkey_verify": false, + "look_for_keys": false, "allow_agent": false, "commit_per_rule": false, + "device_params": {"name": "default"}, "manager_params": {"timeout": 120}, + "endpoints": [ + {"sample_types": [101, 102, 201, 202], "type": "optical", "uuid": "2"}, + {"sample_types": [101, 102, 201, 202], "type": "optical", "uuid": "3"}, + {"sample_types": [101, 102, 201, 202], "type": "optical", "uuid": "12"}, + {"sample_types": [101, 102, 201, 202], "type": "optical", "uuid": "13"} + ]} + }}] + } + }, + { + "device_id": {"device_uuid": {"uuid": "R2"}}, "device_type": "optical-roadm", "device_drivers": [11], + "device_operational_status": 1, + "device_endpoints": [ + {"endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "4"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }}, + {"endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "5"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }}, + {"endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "14"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }}, + {"endpoint_id": { + "device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "15"}, + "topology_id": {"context_id": {"context_uuid": {"uuid": "admin"}}, "topology_uuid": {"uuid": "admin"}} + }} + ], + "device_config": {"config_rules": [ + {"action": 1, "custom": {"resource_key": "_connect/address", "resource_value": "172.254.253.202"}}, + {"action": 1, "custom": {"resource_key": "_connect/port", "resource_value": "2022"}}, + {"action": 1, "custom": {"resource_key": "_connect/settings", "resource_value": { + "username": "admin", "password": "admin", "force_running": false, "hostkey_verify": false, + "look_for_keys": false, "allow_agent": false, "commit_per_rule": false, + "device_params": {"name": "default"}, "manager_params": {"timeout": 120}, + "endpoints": [ + {"sample_types": [101, 102, 201, 202], "type": "optical", "uuid": "4"}, + {"sample_types": [101, 102, 201, 202], "type": "optical", "uuid": "5"}, + {"sample_types": [101, 102, 201, 202], "type": "optical", "uuid": "14"}, + {"sample_types": [101, 102, 201, 202], "type": "optical", "uuid": "15"} + ] + }}} + ]} + } + ], + "links": [ + {"link_id": {"link_uuid": {"uuid": "T1->R1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T1"}}, "endpoint_uuid": {"uuid": "1"}}, + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "12"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R1->T1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "2"}}, + {"device_id": {"device_uuid": {"uuid": "T1"}}, "endpoint_uuid": {"uuid": "1"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R1->R2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "3"}}, + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "14"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R2->R1"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "4"}}, + {"device_id": {"device_uuid": {"uuid": "R1"}}, "endpoint_uuid": {"uuid": "13"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "T2->R2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "T2"}}, "endpoint_uuid": {"uuid": "6"}}, + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "15"}} + ]}, + {"link_id": {"link_uuid": {"uuid": "R2->T2"}}, "link_endpoint_ids": [ + {"device_id": {"device_uuid": {"uuid": "R2"}}, "endpoint_uuid": {"uuid": "5"}}, + {"device_id": {"device_uuid": {"uuid": "T2"}}, "endpoint_uuid": {"uuid": "6"}} + ]} + ] +} diff --git a/src/dlt/gateway/samples/updatedTopo.json b/src/dlt/gateway/samples/updatedTopo.json new file mode 100644 index 0000000000000000000000000000000000000000..74b084b9d9c48de89ddf6122f46316a74c1a4fca --- /dev/null +++ b/src/dlt/gateway/samples/updatedTopo.json @@ -0,0 +1,17 @@ +{ + "name": "Updated Network", + "nodes": [ + { + "id": "node1", + "type": "switch", + "status": "active", + "connections": ["node2"] + }, + { + "id": "node2", + "type": "router", + "status": "inactive", + "connections": ["node1"] + } + ] +} diff --git a/src/dlt/gateway/tests/perfTest.js b/src/dlt/gateway/tests/perfTest.js new file mode 100644 index 0000000000000000000000000000000000000000..fd60bd9c4bba04a7c2a048d26389dd66381b5749 --- /dev/null +++ b/src/dlt/gateway/tests/perfTest.js @@ -0,0 +1,119 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +const { connectToNetwork } = require('../dltApp/dist/fabricConnect'); +const fsp = require('fs').promises; +const fs = require('fs'); +const util = require('util'); + +const utf8Decoder = new TextDecoder(); +const topoDirectory = '../samples/'; +const topologies = ['topo1.json', 'topo2.json', 'topo3.json', 'topo4.json']; +//const topologies = ['topo4.json']; + +const iterations = 1000; + +async function main() { + try { + const { contract, close } = await connectToNetwork(); + for (const topoFile of topologies) { + const logFilePath = `./operation_times_${topoFile.split('.')[0]}.txt`; // Creates a separate logfile for each topology + const appendFile = util.promisify(fs.appendFile.bind(fs, logFilePath)); + + console.log(`Starting tests for ${topoFile}`); + for (let i = 0; i < iterations; i++) { + console.log(`Iteration ${i + 1} for ${topoFile}`); + await runBlockchainOperations(contract, topoFile, appendFile); + } + } + await close(); // Clean up the connection + } catch (error) { + console.error('An error occurred:', error); + } +} + +async function runBlockchainOperations(contract, topoFile, appendFile) { + const assetId = `asset${Date.now()}`; + const jsonData = await readJsonData(`${topoDirectory}${topoFile}`); + + // Define operations + const operations = [ + { type: 'STORE', jsonData }, + { type: 'UPDATE', jsonData }, + { type: 'FETCH', jsonData: null }, + { type: 'DELETE', jsonData: null }, + { type: 'FETCH_ALL', jsonData: null } + ]; + + for (let op of operations) { + await executeOperation(contract, op.type, assetId, op.jsonData, appendFile); + } +} + +async function readJsonData(filePath) { + try { + return await fsp.readFile(filePath, 'utf8'); + } catch (error) { + console.error(`Failed to read file: ${filePath}`, error); + return '{}'; + } +} + +async function executeOperation(contract, operationType, assetId, jsonData, appendFile) { + const startTime = process.hrtime.bigint(); + try { + let result; + switch (operationType) { + case 'STORE': + result = await contract.submitTransaction('StoreTopoData', assetId, jsonData); + break; + case 'UPDATE': + result = await contract.submitTransaction('UpdateTopoData', assetId, jsonData); + break; + case 'FETCH': + result = await contract.evaluateTransaction('RetrieveTopoData', assetId); + break; + case 'DELETE': + result = await contract.submitTransaction('DeleteTopo', assetId); + break; + case 'FETCH_ALL': + result = await contract.evaluateTransaction('GetAllInfo'); + break; + } + result = utf8Decoder.decode(result); + const operationTime = recordOperationTime(startTime); + await logOperationTime(operationTime, operationType, appendFile); + console.log(`${operationType} Result:`, result); + } catch (error) { + console.error(`Error during ${operationType}:`, error); + } +} + +function recordOperationTime(startTime) { + const endTime = process.hrtime.bigint(); + const operationTime = Number(endTime - startTime) / 1e6; + return operationTime; +} + +async function logOperationTime(operationTime, operationType, appendFile) { + const timestamp = Date.now(); + const logEntry = `${timestamp} - ${operationType} - Execution time: ${operationTime.toFixed(3)} ms\n`; + try { + await appendFile(logEntry); + } catch (error) { + console, error('Error writing to log file:', error); + } +} + +main(); diff --git a/src/dlt/gateway/tests/rateTest.js b/src/dlt/gateway/tests/rateTest.js new file mode 100644 index 0000000000000000000000000000000000000000..f7c40884293220c0ab235322d74aee61074a281c --- /dev/null +++ b/src/dlt/gateway/tests/rateTest.js @@ -0,0 +1,85 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +const { connectToNetwork } = require('../dltApp/dist/fabricConnect'); +const fs = require('fs'); +const util = require('util'); +const appendFile = util.promisify(fs.appendFile); +const logFilePath = './transaction_times_TPS_TOPO3.txt'; +const utf8Decoder = new TextDecoder(); +const topoDirectory = '../samples/'; + +async function main() { + const { contract, close } = await connectToNetwork(); + try { + const rates = [10, 50, 250, 500]; // Transactions per second + for (let i = 0; i < 1000; i++) { + for (let rate of rates) { + console.log(`Testing at ${rate} TPS`); + await performLoadTest(contract, 1000, rate); + } + } + } finally { + await close(); // Ensure to close the network connection + } +} + +async function performLoadTest(contract, totalTransactions, rate) { + const interval = 1000 / rate; // Calculate interval in milliseconds + let promises = []; + const startTime = Date.now(); + + for (let i = 0; i < totalTransactions; i++) { + // Queue a transaction promise + promises.push(sendTransaction(contract, `asset${Date.now() + i}`)); + + // Process in batches according to the rate + if ((i + 1) % rate === 0 || i === totalTransactions - 1) { + await Promise.all(promises); // Send a batch of transactions + promises = []; // Reset for the next batch + if (i < totalTransactions - 1) { + await new Promise(resolve => setTimeout(resolve, interval)); // Throttle the transaction sending + } + } + } + + const endTime = Date.now(); + const totalTime = endTime - startTime; + const actualRate = totalTransactions / (totalTime / 1000); + console.log(`Total time for ${totalTransactions} transactions at target ${rate} TPS: ${totalTime} ms`); + console.log(`Actual rate achieved: ${actualRate.toFixed(2)} TPS`); + await appendFile(logFilePath, `Target Rate: ${rate} TPS, Total Time: ${totalTime} ms, Actual Rate: ${actualRate.toFixed(2)} TPS\n`); +} + +async function sendTransaction(contract, assetId) { + try { + const jsonData = await readJsonData(`${topoDirectory}topo3.json`); + const result = await contract.submitTransaction('StoreTopoData', assetId, jsonData); + return utf8Decoder.decode(result); + } catch (error) { + console.error('Transaction failed:', error); + return null; + } +} + +async function readJsonData(filePath) { + try { + return await fs.promises.readFile(filePath, 'utf8'); + } catch (error) { + console.error(`Failed to read file: ${filePath}`, error); + return '{}'; + } +} + +main().catch(console.error); diff --git a/src/dlt/gateway/tests/simpleTest.js b/src/dlt/gateway/tests/simpleTest.js new file mode 100644 index 0000000000000000000000000000000000000000..72da03dec16b91c7b6acc21e339f2844d74153be --- /dev/null +++ b/src/dlt/gateway/tests/simpleTest.js @@ -0,0 +1,74 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +const { connectToNetwork } = require('../dltApp/dist/fabricConnect'); +const fs = require('fs'); +const util = require('util'); +const appendFile = util.promisify(fs.appendFile); +const logFilePath = './transaction_times_TPS2.txt'; +const utf8Decoder = new TextDecoder(); +const topoDirectory = '../samples/'; + +async function main() { + const { contract, close } = await connectToNetwork(); + try { + console.log('Testing with 8 consecutive transactions'); + await performLoadTest(contract); + } finally { + await close(); // Ensure to close the network connection + } +} + +async function performLoadTest(contract) { + const totalTransactions = 500; + const promises = []; + const startTime = Date.now(); + + for (let i = 0; i < totalTransactions; i++) { + // Queue a transaction promise + promises.push(sendTransaction(contract, `asset${startTime}_${i}`)); + } + + await Promise.all(promises); // Send all transactions + + const endTime = Date.now(); + const totalTime = endTime - startTime; + const actualRate = totalTransactions / (totalTime / 1000); + console.log(`Total time for ${totalTransactions} transactions: ${totalTime} ms`); + console.log(`Actual rate achieved: ${actualRate.toFixed(2)} TPS`); + await appendFile(logFilePath, `Total Transactions: ${totalTransactions}, Total Time: ${totalTime} ms, Actual Rate: ${actualRate.toFixed(2)} TPS\n`); +} + +async function sendTransaction(contract, assetId) { + try { + const jsonData = await readJsonData(`${topoDirectory}topo4.json`); + //const jsonData = JSON.stringify({ data: `Data for ${assetId}`}); + const result = await contract.submitTransaction('StoreTopoData', assetId, jsonData); + return utf8Decoder.decode(result); + } catch (error) { + console.error('Transaction failed:', error); + return null; + } +} + +async function readJsonData(filePath) { + try { + return await fs.promises.readFile(filePath, 'utf8'); + } catch (error) { + console.error(`Failed to read file: ${filePath}`, error); + return '{}'; + } +} + +main().catch(console.error); diff --git a/src/dlt/gateway/tests/testEvents.js b/src/dlt/gateway/tests/testEvents.js new file mode 100644 index 0000000000000000000000000000000000000000..6e18e803202232a9613264dd49e6beee14546d14 --- /dev/null +++ b/src/dlt/gateway/tests/testEvents.js @@ -0,0 +1,66 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +const grpc = require('@grpc/grpc-js'); +const protoLoader = require('@grpc/proto-loader'); +const path = require('path'); + +const PROTO_PATH = path.resolve(__dirname, '../../../../proto/dlt_gateway.proto'); +const packageDefinition = protoLoader.loadSync(PROTO_PATH, { + keepCase: true, + longs: String, + enums: String, + defaults: true, + oneofs: true, +}); +const dltProto = grpc.loadPackageDefinition(packageDefinition).dlt; + +const client = new dltProto.DltGatewayService( + '127.0.0.1:32001', // Replace with TFS server IP_ADDRESS + grpc.credentials.createInsecure() +); + +function subscribeToDlt() { + const request = { + // Define any necessary subscription filters here if applicable + }; + + const call = client.SubscribeToDlt(request); + + call.on('data', (event) => { + console.log('Received event:', event); + }); + + call.on('error', (error) => { + console.error('Error:', error.message); + }); + + call.on('end', () => { + console.log('Stream ended.'); + }); + + // Optionally, you can cancel the subscription after a certain time or condition + setTimeout(() => { + console.log('Cancelling subscription...'); + call.cancel(); + }, 600000); // Cancel after 1 minute for demonstration purposes +} + +function runTests() { + console.log("Testing subscription to DLT events"); + subscribeToDlt(); +} + +runTests(); diff --git a/src/dlt/gateway/tests/testGateway.js b/src/dlt/gateway/tests/testGateway.js new file mode 100644 index 0000000000000000000000000000000000000000..b08f648daf6f257f44ec94cd13dabccce67cd803 --- /dev/null +++ b/src/dlt/gateway/tests/testGateway.js @@ -0,0 +1,126 @@ +// Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +const grpc = require('@grpc/grpc-js'); +const protoLoader = require('@grpc/proto-loader'); +const path = require('path'); +const fs = require('fs').promises; +const { v4: uuidv4 } = require('uuid'); // Import the UUID library + + +const PROTO_PATH = path.resolve(__dirname, '../../../../proto/dlt_gateway.proto'); +const packageDefinition = protoLoader.loadSync(PROTO_PATH, { + keepCase: true, + longs: String, + enums: String, + defaults: true, + oneofs: true, +}); +const dltProto = grpc.loadPackageDefinition(packageDefinition).dlt; + +const client = new dltProto.DltGatewayService( + '127.0.0.1:32001', // Replace with TFS server IP_ADDRESS + grpc.credentials.createInsecure() +); + +const assetId = `asset-${Date.now()}`; +const domainUuid = `domain-${uuidv4()}`; // Generate a pretty domain UUID + +async function getTopoData(filename) { + try { + const data = await fs.readFile(`../samples/${filename}`, 'utf8'); + return data; + } catch (error) { + console.error('Failed to read file:', filename, error); + return '{}'; // Empty JSON if error + } +} + +async function processTopoData(operation, assetId, jsonFilename) { + let jsonData = '{}'; + if (jsonFilename) { + jsonData = await getTopoData(jsonFilename); + } + + const request = { + record_id: { + domain_uuid: { uuid: domainUuid }, // Replace "domain-uuid" with actual domain UUID if needed + type: 'DLTRECORDTYPE_TOPOLOGY', // Use the appropriate type if needed + record_uuid: { uuid: assetId } + }, + operation, + data_json: jsonData + }; + + return new Promise((resolve, reject) => { + client.RecordToDlt(request, (error, response) => { + if (error) { + console.error('Error:', error.message); + reject(error); + } else { + console.log('Response:', response); + resolve(response); + } + }); + }); +} + +async function getDLTData(assetId) { + + const request = { + domain_uuid: { uuid: domainUuid }, // Replace "domain-uuid" with actual domain UUID if needed + type: 'DLTRECORDTYPE_TOPOLOGY', // Use the appropriate type if needed + record_uuid: { uuid: assetId } + }; + + return new Promise((resolve, reject) => { + client.GetFromDlt(request, (error, response) => { + if (error) { + console.error('Error:', error.message); + reject(error); + } else { + console.log('Response:', response); + resolve(response); + } + }); + }); +} + +async function runTests() { + console.log("Testing Store Operation"); + await processTopoData('DLTRECORDOPERATION_ADD', assetId, 'topo2.json'); + + console.log("Testing Update Operation"); + await processTopoData('DLTRECORDOPERATION_UPDATE', assetId, 'topo3.json'); + + console.log("Testing Fetch Operation"); + await getDLTData(assetId); + + + console.log("Testing Delete Operation"); + await processTopoData('DLTRECORDOPERATION_DELETE', assetId); + + console.log("Testing Fetch All Operation"); + // This part assumes you have a GetAllInfo method implemented in your chaincode and corresponding gRPC service. + // client.GetAllInfo({}, (error, response) => { + // if (error) { + // console.error('Error:', error.message); + // } else { + // console.log('All Data:', response); + // } + // }); +} + +runTests().catch(console.error); diff --git a/src/interdomain/Config.py b/src/interdomain/Config.py index 918f60d79d51ee8f9fe3875b630de2c373c01a5a..d9098447bb107a878acf297d66eaf1573d72691d 100644 --- a/src/interdomain/Config.py +++ b/src/interdomain/Config.py @@ -15,6 +15,7 @@ from common.Settings import get_setting SETTING_NAME_TOPOLOGY_ABSTRACTOR = 'TOPOLOGY_ABSTRACTOR' +SETTING_NAME_DLT_INTEGRATION = 'DLT_INTEGRATION' TRUE_VALUES = {'Y', 'YES', 'TRUE', 'T', 'E', 'ENABLE', 'ENABLED'} def is_topology_abstractor_enabled() -> bool: @@ -22,3 +23,9 @@ def is_topology_abstractor_enabled() -> bool: if is_enabled is None: return False str_is_enabled = str(is_enabled).upper() return str_is_enabled in TRUE_VALUES + +def is_dlt_enabled() -> bool: + is_enabled = get_setting(SETTING_NAME_DLT_INTEGRATION, default=None) + if is_enabled is None: return False + str_is_enabled = str(is_enabled).upper() + return str_is_enabled in TRUE_VALUES diff --git a/src/interdomain/service/InterdomainServiceServicerImpl.py b/src/interdomain/service/InterdomainServiceServicerImpl.py index 54878be2ed70fa834692b85ce27337d61160948b..bce5e69203417e9026ddabc336a260216d0fd991 100644 --- a/src/interdomain/service/InterdomainServiceServicerImpl.py +++ b/src/interdomain/service/InterdomainServiceServicerImpl.py @@ -34,7 +34,7 @@ from common.tools.object_factory.Device import json_device_id from common.tools.object_factory.EndPoint import json_endpoint_id from common.tools.object_factory.Topology import json_topology_id from context.client.ContextClient import ContextClient -from dlt.connector.client.DltConnectorClient import DltConnectorClient +from dlt.connector.client.DltConnectorClientAsync import DltConnectorClientAsync from pathcomp.frontend.client.PathCompClient import PathCompClient from service.client.ServiceClient import ServiceClient from slice.client.SliceClient import SliceClient @@ -88,7 +88,7 @@ class InterdomainServiceServicerImpl(InterdomainServiceServicer): ]) if len(env_vars) == 2: # DLT available - dlt_connector_client = DltConnectorClient() + dlt_connector_client = DltConnectorClientAsync() dlt_connector_client.connect() else: dlt_connector_client = None diff --git a/src/interdomain/service/__main__.py b/src/interdomain/service/__main__.py index c0497bd2902080f8b967ba50ce370a4c9b711689..7ab9682c2789ed11c4f066fa4b453e8c1212878b 100644 --- a/src/interdomain/service/__main__.py +++ b/src/interdomain/service/__main__.py @@ -18,8 +18,9 @@ from common.Constants import ServiceNameEnum from common.Settings import ( ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, get_env_var_name, get_log_level, get_metrics_port, wait_for_environment_variables) -from interdomain.Config import is_topology_abstractor_enabled +from interdomain.Config import is_dlt_enabled, is_topology_abstractor_enabled from .topology_abstractor.TopologyAbstractor import TopologyAbstractor +from .topology_abstractor.DltRecorder import DLTRecorder from .InterdomainService import InterdomainService from .RemoteDomainClients import RemoteDomainClients @@ -69,12 +70,21 @@ def main(): topology_abstractor = TopologyAbstractor() topology_abstractor.start() + # Subscribe to Context Events + dlt_enabled = is_dlt_enabled() + if dlt_enabled: + LOGGER.info('Starting DLT functionality...') + dlt_recorder = DLTRecorder() + dlt_recorder.start() + # Wait for Ctrl+C or termination signal while not terminate.wait(timeout=1.0): pass LOGGER.info('Terminating...') if topology_abstractor_enabled: topology_abstractor.stop() + if dlt_enabled: + dlt_recorder.stop() grpc_service.stop() remote_domain_clients.stop() diff --git a/src/interdomain/service/topology_abstractor/DltRecordSender.py b/src/interdomain/service/topology_abstractor/DltRecordSender.py index a504fe01b4e5755b880b76114c60d28f186f3f6f..5c53edc598ee57b856ebea3bd1eaf2e855b0cf6b 100644 --- a/src/interdomain/service/topology_abstractor/DltRecordSender.py +++ b/src/interdomain/service/topology_abstractor/DltRecordSender.py @@ -12,24 +12,28 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging -from typing import Dict, List, Optional, Tuple +import asyncio, logging +from typing import Dict, List, Tuple from common.proto.context_pb2 import Device, Link, Service, Slice, TopologyId from common.proto.dlt_connector_pb2 import DltDeviceId, DltLinkId, DltServiceId, DltSliceId from context.client.ContextClient import ContextClient -from dlt.connector.client.DltConnectorClient import DltConnectorClient -from .Types import DltRecordTypes +from dlt.connector.client.DltConnectorClientAsync import DltConnectorClientAsync LOGGER = logging.getLogger(__name__) class DltRecordSender: - def __init__(self, context_client : ContextClient, dlt_connector_client : Optional[DltConnectorClient]) -> None: + def __init__(self, context_client : ContextClient) -> None: self.context_client = context_client - self.dlt_connector_client = dlt_connector_client + LOGGER.debug('Creating Servicer...') + self.dlt_connector_client = DltConnectorClientAsync() + LOGGER.debug('Servicer Created') self.dlt_record_uuids : List[str] = list() - self.dlt_record_uuid_to_data : Dict[str, Tuple[TopologyId, DltRecordTypes]] = dict() + self.dlt_record_uuid_to_data : Dict[str, Tuple[TopologyId, object]] = dict() - def _add_record(self, record_uuid : str, data : Tuple[TopologyId, DltRecordTypes]) -> None: + async def initialize(self): + await self.dlt_connector_client.connect() + + def _add_record(self, record_uuid : str, data : Tuple[TopologyId, object]) -> None: if record_uuid in self.dlt_record_uuid_to_data: return self.dlt_record_uuid_to_data[record_uuid] = data self.dlt_record_uuids.append(record_uuid) @@ -60,36 +64,45 @@ class DltRecordSender: record_uuid = '{:s}:slice:{:s}/{:s}'.format(topology_uuid, context_uuid, slice_uuid) self._add_record(record_uuid, (topology_id, slice_)) - def commit(self) -> None: + async def commit(self) -> None: + if not self.dlt_connector_client: + LOGGER.error('DLT Connector Client is None, cannot commit records.') + return + + tasks = [] # List to hold all the async tasks + for dlt_record_uuid in self.dlt_record_uuids: - topology_id,dlt_record = self.dlt_record_uuid_to_data[dlt_record_uuid] + topology_id, dlt_record = self.dlt_record_uuid_to_data[dlt_record_uuid] if isinstance(dlt_record, Device): - device_id = self.context_client.SetDevice(dlt_record) + device_id = dlt_record.device_id if self.dlt_connector_client is None: continue dlt_device_id = DltDeviceId() dlt_device_id.topology_id.CopyFrom(topology_id) # pylint: disable=no-member dlt_device_id.device_id.CopyFrom(device_id) # pylint: disable=no-member - self.dlt_connector_client.RecordDevice(dlt_device_id) + tasks.append(self.dlt_connector_client.RecordDevice(dlt_device_id)) elif isinstance(dlt_record, Link): - link_id = self.context_client.SetLink(dlt_record) + link_id = dlt_record.link_id if self.dlt_connector_client is None: continue dlt_link_id = DltLinkId() dlt_link_id.topology_id.CopyFrom(topology_id) # pylint: disable=no-member dlt_link_id.link_id.CopyFrom(link_id) # pylint: disable=no-member - self.dlt_connector_client.RecordLink(dlt_link_id) + tasks.append(self.dlt_connector_client.RecordLink(dlt_link_id)) elif isinstance(dlt_record, Service): - service_id = self.context_client.SetService(dlt_record) + service_id = dlt_record.service_id if self.dlt_connector_client is None: continue dlt_service_id = DltServiceId() dlt_service_id.topology_id.CopyFrom(topology_id) # pylint: disable=no-member dlt_service_id.service_id.CopyFrom(service_id) # pylint: disable=no-member - self.dlt_connector_client.RecordService(dlt_service_id) + tasks.append(self.dlt_connector_client.RecordService(dlt_service_id)) elif isinstance(dlt_record, Slice): - slice_id = self.context_client.SetSlice(dlt_record) + slice_id = dlt_record.slice_id if self.dlt_connector_client is None: continue dlt_slice_id = DltSliceId() dlt_slice_id.topology_id.CopyFrom(topology_id) # pylint: disable=no-member dlt_slice_id.slice_id.CopyFrom(slice_id) # pylint: disable=no-member - self.dlt_connector_client.RecordSlice(dlt_slice_id) + tasks.append(self.dlt_connector_client.RecordSlice(dlt_slice_id)) else: - LOGGER.error('Unsupported Record({:s})'.format(str(dlt_record))) + LOGGER.error(f'Unsupported Record({str(dlt_record)})') + + if tasks: + await asyncio.gather(*tasks) # Run all the tasks concurrently diff --git a/src/interdomain/service/topology_abstractor/DltRecorder.py b/src/interdomain/service/topology_abstractor/DltRecorder.py new file mode 100644 index 0000000000000000000000000000000000000000..22c436363b009810815b1cf3fa011fd5cbbc6a13 --- /dev/null +++ b/src/interdomain/service/topology_abstractor/DltRecorder.py @@ -0,0 +1,206 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging, threading, asyncio, time +from typing import Dict, Optional +from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME, INTERDOMAIN_TOPOLOGY_NAME +from common.proto.context_pb2 import ( + ContextEvent, ContextId, DeviceEvent, DeviceId, LinkId, LinkEvent, TopologyId, TopologyEvent +) +from common.tools.context_queries.Context import create_context +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.tools.object_factory.Context import json_context_id +from common.tools.object_factory.Topology import json_topology_id +from context.client.ContextClient import ContextClient +from context.client.EventsCollector import EventsCollector +from .DltRecordSender import DltRecordSender +from .Types import EventTypes + +LOGGER = logging.getLogger(__name__) + +ADMIN_CONTEXT_ID = ContextId(**json_context_id(DEFAULT_CONTEXT_NAME)) +INTERDOMAIN_TOPOLOGY_ID = TopologyId(**json_topology_id(INTERDOMAIN_TOPOLOGY_NAME, context_id=ADMIN_CONTEXT_ID)) + + +class DLTRecorder(threading.Thread): + def __init__(self) -> None: + super().__init__(daemon=True) + self.terminate = threading.Event() + self.context_client = ContextClient() + self.context_event_collector = EventsCollector(self.context_client) + self.topology_cache: Dict[str, TopologyId] = {} + + # Queues for each event type + self.create_event_queue = asyncio.Queue() + self.update_event_queue = asyncio.Queue() + self.remove_event_queue = asyncio.Queue() + + def stop(self): + self.terminate.set() + + def run(self) -> None: + asyncio.run(self._run()) + + async def _run(self) -> None: + self.context_client.connect() + create_context(self.context_client, DEFAULT_CONTEXT_NAME) + #self.create_topologies() + self.context_event_collector.start() + + batch_timeout = 1 # Time in seconds to wait before processing whatever tasks are available + last_task_time = time.time() + + while not self.terminate.is_set(): + event = self.context_event_collector.get_event(timeout=0.1) + if event: + LOGGER.info('Received Event({:s})...'.format(grpc_message_to_json_string(event))) + + # Prioritize the event based on its type + if event.event.event_type == 1: # CREATE + await self.create_event_queue.put(event) + elif event.event.event_type == 2: # UPDATE + await self.update_event_queue.put(event) + elif event.event.event_type == 3: # REMOVE + await self.remove_event_queue.put(event) + + # Check if it's time to process the tasks or if we have enough tasks + current_time = time.time() + if current_time - last_task_time >= batch_timeout: + await self.process_events() + last_task_time = current_time # Reset the timer after processing + + self.context_event_collector.stop() + self.context_client.close() + + async def process_events(self): + # Process CREATE events first + await self.process_queue(self.create_event_queue) + # Then process UPDATE events + await self.process_queue(self.update_event_queue) + # Finally, process REMOVE events + await self.process_queue(self.remove_event_queue) + + async def process_queue(self, queue : asyncio.Queue): + tasks = [] + while not queue.empty(): + event = await queue.get() + LOGGER.info('Processing Event({:s}) from queue...'.format(grpc_message_to_json_string(event))) + task = asyncio.create_task(self.update_record(event)) + tasks.append(task) + + # Execute tasks concurrently + if tasks: + try: + await asyncio.gather(*tasks) + except Exception as e: + LOGGER.error(f"Error while processing tasks: {e}") + + async def update_record(self, event : EventTypes) -> None: + dlt_record_sender = DltRecordSender(self.context_client) + await dlt_record_sender.initialize() # Ensure DltRecordSender is initialized asynchronously + LOGGER.debug('STARTING processing event: {:s}'.format(grpc_message_to_json_string(event))) + + if isinstance(event, ContextEvent): + LOGGER.debug('Processing ContextEvent({:s})'.format(grpc_message_to_json_string(event))) + LOGGER.warning('Ignoring ContextEvent({:s})'.format(grpc_message_to_json_string(event))) + + elif isinstance(event, TopologyEvent): + LOGGER.debug('Processing TopologyEvent({:s})'.format(grpc_message_to_json_string(event))) + self.process_topology_event(event, dlt_record_sender) + + elif isinstance(event, DeviceEvent): + LOGGER.debug('Processing DeviceEvent ASYNC({:s})'.format(grpc_message_to_json_string(event))) + self.process_device_event(event, dlt_record_sender) + + elif isinstance(event, LinkEvent): + LOGGER.debug('Processing LinkEvent({:s})'.format(grpc_message_to_json_string(event))) + self.process_link_event(event, dlt_record_sender) + + else: + LOGGER.warning('Unsupported Event({:s})'.format(grpc_message_to_json_string(event))) + + await dlt_record_sender.commit() + #await asyncio.sleep(2) # Simulates processing time + LOGGER.debug('Finished processing event: {:s}'.format(grpc_message_to_json_string(event))) + + + def process_topology_event(self, event : TopologyEvent, dlt_record_sender : DltRecordSender) -> None: + topology_id = event.topology_id + topology_uuid = topology_id.topology_uuid.uuid + context_id = topology_id.context_id + context_uuid = context_id.context_uuid.uuid + topology_uuids = {DEFAULT_TOPOLOGY_NAME, INTERDOMAIN_TOPOLOGY_NAME} + + context = self.context_client.GetContext(context_id) + context_name = context.name + + topology_details = self.context_client.GetTopologyDetails(topology_id) + topology_name = topology_details.name + + self.topology_cache[topology_uuid] = topology_id + + LOGGER.debug('TOPOLOGY Details({:s})'.format(grpc_message_to_json_string(topology_details))) + + if ((context_uuid == DEFAULT_CONTEXT_NAME) or (context_name == DEFAULT_CONTEXT_NAME)) and \ + (topology_uuid not in topology_uuids) and (topology_name not in topology_uuids): + LOGGER.debug('DEVICES({:s})'.format(grpc_message_to_json_string(topology_details.devices))) + for device in topology_details.devices: + LOGGER.debug('DEVICE_INFO_TOPO({:s})'.format(grpc_message_to_json_string(device))) + dlt_record_sender.add_device(topology_id, device) + + for link in topology_details.links: + dlt_record_sender.add_link(topology_id, link) + + else: + MSG = 'Ignoring ({:s}/{:s})({:s}/{:s}) TopologyEvent({:s})' + args = context_uuid, context_name, topology_uuid, topology_name, grpc_message_to_json_string(event) + LOGGER.warning(MSG.format(*args)) + + def find_topology_for_device(self, device_id : DeviceId) -> Optional[TopologyId]: + for topology_uuid, topology_id in self.topology_cache.items(): + details = self.context_client.GetTopologyDetails(topology_id) + for device in details.devices: + if device.device_id == device_id: + return topology_id + return None + + def find_topology_for_link(self, link_id : LinkId) -> Optional[TopologyId]: + for topology_uuid, topology_id in self.topology_cache.items(): + details = self.context_client.GetTopologyDetails(topology_id) + for link in details.links: + if link.link_id == link_id: + return topology_id + return None + + def process_device_event(self, event : DeviceEvent, dlt_record_sender : DltRecordSender) -> None: + device_id = event.device_id + device = self.context_client.GetDevice(device_id) + topology_id = self.find_topology_for_device(device_id) + if topology_id: + LOGGER.debug('DEVICE_INFO({:s}), DEVICE_ID ({:s})'.format( + str(device.device_id.device_uuid.uuid), + grpc_message_to_json_string(device_id) + )) + dlt_record_sender.add_device(topology_id, device) + else: + LOGGER.warning("Topology not found for device {:s}".format(str(device_id.device_uuid.uuid))) + + def process_link_event(self, event: LinkEvent, dlt_record_sender: DltRecordSender) -> None: + link_id = event.link_id + link = self.context_client.GetLink(link_id) + topology_id = self.find_topology_for_link(link_id) + if topology_id: + dlt_record_sender.add_link(topology_id, link) + else: + LOGGER.warning("Topology not found for link {:s}".format(str(link_id.link_uuid.uuid))) diff --git a/src/kpi_manager/.gitlab-ci.yml b/src/kpi_manager/.gitlab-ci.yml index 498cfd89fb3da85fec1b2ad0c930408eab215dc5..47c866b4a963a4ce94e227bf24bdeb9263af04e1 100644 --- a/src/kpi_manager/.gitlab-ci.yml +++ b/src/kpi_manager/.gitlab-ci.yml @@ -83,6 +83,7 @@ unit_test kpi-manager: - docker exec -i $IMAGE_NAME bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing" coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' after_script: + - docker rm -f $IMAGE_NAME crdb - docker volume rm -f crdb - docker network rm teraflowbridge - docker volume prune --force diff --git a/src/kpi_manager/database/KpiDB.py b/src/kpi_manager/database/KpiDB.py new file mode 100644 index 0000000000000000000000000000000000000000..d503f06f4cdeb57efd4c02701803f81fd31d3eea --- /dev/null +++ b/src/kpi_manager/database/KpiDB.py @@ -0,0 +1,66 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging +from common.method_wrappers.Decorator import MetricsPool +from common.tools.database.GenericDatabase import Database +from common.method_wrappers.ServiceExceptions import OperationFailedException + +LOGGER = logging.getLogger(__name__) +METRICS_POOL = MetricsPool('KpiManager', 'Database') + +class KpiDB(Database): + def __init__(self, model) -> None: + LOGGER.info('Init KpiManagerService') + super().__init__(model) + + def select_with_filter(self, model, filter_object): + """ + Generic method to create filters dynamically based on filter_object attributes. + params: model: SQLAlchemy model class to query. + filter_object: Object that contains filtering criteria as attributes. + return: SQLAlchemy session, query and Model + """ + session = self.Session() + try: + query = session.query(model) + # Apply filters based on the filter_object + if filter_object.kpi_id: + query = query.filter(model.kpi_id.in_([k.kpi_id.uuid for k in filter_object.kpi_id])) + + if filter_object.kpi_sample_type: + query = query.filter(model.kpi_sample_type.in_(filter_object.kpi_sample_type)) + + if filter_object.device_id: + query = query.filter(model.device_id.in_([d.device_uuid.uuid for d in filter_object.device_id])) + + if filter_object.endpoint_id: + query = query.filter(model.endpoint_id.in_([e.endpoint_uuid.uuid for e in filter_object.endpoint_id])) + + if filter_object.service_id: + query = query.filter(model.service_id.in_([s.service_uuid.uuid for s in filter_object.service_id])) + + if filter_object.slice_id: + query = query.filter(model.slice_id.in_([s.slice_uuid.uuid for s in filter_object.slice_id])) + + if filter_object.connection_id: + query = query.filter(model.connection_id.in_([c.connection_uuid.uuid for c in filter_object.connection_id])) + + if filter_object.link_id: + query = query.filter(model.link_id.in_([l.link_uuid.uuid for l in filter_object.link_id])) + except Exception as e: + LOGGER.error(f"Error creating filter of {model.__name__} table. ERROR: {e}") + raise OperationFailedException ("CreateKpiDescriptorFilter", extra_details=["unable to create the filter {:}".format(e)]) + + return super().select_with_filter(query, session, model) diff --git a/src/kpi_manager/service/KpiManagerServiceServicerImpl.py b/src/kpi_manager/service/KpiManagerServiceServicerImpl.py index fd22474829ea0dfb6b1a25e70bbb4d5440c0216b..3f9ae8492380e5e11cd3cbc926a2fce07620d8a7 100644 --- a/src/kpi_manager/service/KpiManagerServiceServicerImpl.py +++ b/src/kpi_manager/service/KpiManagerServiceServicerImpl.py @@ -18,7 +18,8 @@ from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_m from common.proto.context_pb2 import Empty from common.proto.kpi_manager_pb2_grpc import KpiManagerServiceServicer from common.proto.kpi_manager_pb2 import KpiId, KpiDescriptor, KpiDescriptorFilter, KpiDescriptorList -from kpi_manager.database.Kpi_DB import KpiDB +# from kpi_manager.database.Kpi_DB import KpiDB +from kpi_manager.database.KpiDB import KpiDB from kpi_manager.database.KpiModel import Kpi as KpiModel LOGGER = logging.getLogger(__name__) @@ -27,7 +28,7 @@ METRICS_POOL = MetricsPool('KpiManager', 'NBIgRPC') class KpiManagerServiceServicerImpl(KpiManagerServiceServicer): def __init__(self): LOGGER.info('Init KpiManagerService') - self.kpi_db_obj = KpiDB() + self.kpi_db_obj = KpiDB(KpiModel) @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def SetKpiDescriptor(self, request: KpiDescriptor, grpc_context: grpc.ServicerContext # type: ignore diff --git a/src/kpi_manager/service/__main__.py b/src/kpi_manager/service/__main__.py index 244d5afa373a6462a0382a0ed26a588088a689a1..05e32bb58128975ea5d2a5f015d1e8b3977c9905 100644 --- a/src/kpi_manager/service/__main__.py +++ b/src/kpi_manager/service/__main__.py @@ -16,8 +16,11 @@ import logging, signal, sys, threading from common.Settings import get_log_level from .KpiManagerService import KpiManagerService +from kpi_manager.database.KpiModel import Kpi as Model +from common.tools.database.GenericDatabase import Database + terminate = threading.Event() -LOGGER = None +LOGGER = None def signal_handler(signal, frame): # pylint: disable=redefined-outer-name LOGGER.warning('Terminate signal received') @@ -35,6 +38,11 @@ def main(): LOGGER.debug('Starting...') + # To create DB + kpiDBobj = Database(Model) + kpiDBobj.create_database() + kpiDBobj.create_tables() + grpc_service = KpiManagerService() grpc_service.start() diff --git a/src/kpi_manager/tests/__init__.py b/src/kpi_manager/tests/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 --- /dev/null +++ b/src/kpi_manager/tests/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/src/kpi_manager/tests/test_kpi_db.py b/src/kpi_manager/tests/test_kpi_db.py index d4a57f83664f851504389b3bbe99d5c2a92542d9..b731ba385e54ed3ccb3c7a2e589977188ceb0e3c 100644 --- a/src/kpi_manager/tests/test_kpi_db.py +++ b/src/kpi_manager/tests/test_kpi_db.py @@ -14,13 +14,14 @@ import logging -from kpi_manager.database.Kpi_DB import KpiDB +from kpi_manager.database.KpiDB import KpiDB +from kpi_manager.database.KpiModel import Kpi as KpiModel LOGGER = logging.getLogger(__name__) def test_verify_databases_and_Tables(): LOGGER.info('>>> test_verify_Tables : START <<< ') - kpiDBobj = KpiDB() + kpiDBobj = KpiDB(KpiModel) # kpiDBobj.drop_database() # kpiDBobj.verify_tables() kpiDBobj.create_database() diff --git a/src/kpi_manager/tests/test_kpi_manager.py b/src/kpi_manager/tests/test_kpi_manager.py index 219fdadee9e2f4ca9ea9ac0be040043d4edfbdbe..3d046ea2ce99e655856470178bf7643f83324f17 100755 --- a/src/kpi_manager/tests/test_kpi_manager.py +++ b/src/kpi_manager/tests/test_kpi_manager.py @@ -138,10 +138,3 @@ def test_SelectKpiDescriptor(kpi_manager_client): response = kpi_manager_client.SelectKpiDescriptor(create_kpi_filter_request()) LOGGER.info("Response gRPC message object: {:}".format(response)) assert isinstance(response, KpiDescriptorList) - -def test_set_list_of_KPIs(kpi_manager_client): - LOGGER.debug(" >>> test_set_list_of_KPIs: START <<< ") - KPIs_TO_SEARCH = ["node_in_power_total", "node_in_current_total", "node_out_power_total"] - # adding KPI - for kpi in KPIs_TO_SEARCH: - kpi_manager_client.SetKpiDescriptor(create_kpi_descriptor_request_a(kpi)) diff --git a/src/kpi_manager/tests/test_messages.py b/src/kpi_manager/tests/test_messages.py index 7b5c45859b6c10056211f9f33df950d9668c11ea..08a2dbf7334c3e4e68c3cfa6c27ce08532521342 100644 --- a/src/kpi_manager/tests/test_messages.py +++ b/src/kpi_manager/tests/test_messages.py @@ -27,6 +27,8 @@ def create_kpi_id_request(): def create_kpi_descriptor_request(descriptor_name: str = "Test_name"): _create_kpi_request = kpi_manager_pb2.KpiDescriptor() _create_kpi_request.kpi_id.kpi_id.uuid = str(uuid.uuid4()) + # _create_kpi_request.kpi_id.kpi_id.uuid = "6e22f180-ba28-4641-b190-2287bf448888" + # _create_kpi_request.kpi_id.kpi_id.uuid = "1e22f180-ba28-4641-b190-2287bf446666" _create_kpi_request.kpi_description = descriptor_name _create_kpi_request.kpi_sample_type = KpiSampleType.KPISAMPLETYPE_PACKETS_RECEIVED _create_kpi_request.device_id.device_uuid.uuid = 'DEV2' diff --git a/src/kpi_value_api/.gitlab-ci.yml b/src/kpi_value_api/.gitlab-ci.yml index 1a6f821ba9e798bb4220d914109ab3a65f0f1792..14c8df299b1a4970ec0a4733bcd918bf1485b00d 100644 --- a/src/kpi_value_api/.gitlab-ci.yml +++ b/src/kpi_value_api/.gitlab-ci.yml @@ -59,9 +59,11 @@ unit_test kpi-value-api: - docker pull "bitnami/kafka:latest" - > docker run --name zookeeper -d --network=teraflowbridge -p 2181:2181 + --env ALLOW_ANONYMOUS_LOGIN=yes bitnami/zookeeper:latest - sleep 10 # Wait for Zookeeper to start - - docker run --name kafka -d --network=teraflowbridge -p 9092:9092 + - > + docker run --name kafka -d --network=teraflowbridge -p 9092:9092 --env KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181 --env ALLOW_PLAINTEXT_LISTENER=yes bitnami/kafka:latest @@ -84,6 +86,8 @@ unit_test kpi-value-api: coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' after_script: - docker rm -f $IMAGE_NAME + - docker rm -f kafka + - docker rm -f zookeeper - docker network rm teraflowbridge rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' diff --git a/src/kpi_value_api/client/KpiValueApiClient.py b/src/kpi_value_api/client/KpiValueApiClient.py index f432271cfb7c8136f72156330b25d0b82b934d99..dfc5f07254a30db34a20ee8d0eae931cfd0ce571 100644 --- a/src/kpi_value_api/client/KpiValueApiClient.py +++ b/src/kpi_value_api/client/KpiValueApiClient.py @@ -15,17 +15,18 @@ import grpc, logging from common.Constants import ServiceNameEnum -from common.Settings import get_service_host, get_service_port_grpc -from common.tools.client.RetryDecorator import retry, delay_exponential -from common.tools.grpc.Tools import grpc_message_to_json_string +from common.Settings import get_service_host, get_service_port_grpc -from common.proto.context_pb2 import Empty -from common.proto.kpi_value_api_pb2 import KpiValueList, KpiValueFilter +from common.tools.client.RetryDecorator import retry, delay_exponential +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.proto.context_pb2 import Empty +from common.proto.kpi_manager_pb2 import KpiId +from common.proto.kpi_value_api_pb2 import KpiValueList, KpiValueFilter, KpiAlarms from common.proto.kpi_value_api_pb2_grpc import KpiValueAPIServiceStub -LOGGER = logging.getLogger(__name__) -MAX_RETRIES = 10 -DELAY_FUNCTION = delay_exponential(initial=0.01, increment=2.0, maximum=5.0) +LOGGER = logging.getLogger(__name__) +MAX_RETRIES = 10 +DELAY_FUNCTION = delay_exponential(initial=0.01, increment=2.0, maximum=5.0) RETRY_DECORATOR = retry(max_retries=MAX_RETRIES, delay_function=DELAY_FUNCTION, prepare_method_name='connect') class KpiValueApiClient: @@ -34,8 +35,8 @@ class KpiValueApiClient: if not port: port = get_service_port_grpc(ServiceNameEnum.KPIVALUEAPI) self.endpoint = '{:s}:{:s}'.format(str(host), str(port)) LOGGER.debug('Creating channel to {:s}...'.format(str(self.endpoint))) - self.channel = None - self.stub = None + self.channel = None + self.stub = None self.connect() LOGGER.debug('Channel created') @@ -46,18 +47,25 @@ class KpiValueApiClient: def close(self): if self.channel is not None: self.channel.close() self.channel = None - self.stub = None + self.stub = None @RETRY_DECORATOR - def StoreKpiValues(self, request: KpiValueList) -> Empty: + def StoreKpiValues(self, request: KpiValueList) -> Empty: # type: ignore LOGGER.debug('StoreKpiValues: {:s}'.format(grpc_message_to_json_string(request))) response = self.stub.StoreKpiValues(request) LOGGER.debug('StoreKpiValues result: {:s}'.format(grpc_message_to_json_string(response))) return response @RETRY_DECORATOR - def SelectKpiValues(self, request: KpiValueFilter) -> KpiValueList: + def SelectKpiValues(self, request: KpiValueFilter) -> KpiValueList: # type: ignore LOGGER.debug('SelectKpiValues: {:s}'.format(grpc_message_to_json_string(request))) response = self.stub.SelectKpiValues(request) LOGGER.debug('SelectKpiValues result: {:s}'.format(grpc_message_to_json_string(response))) return response + + @RETRY_DECORATOR + def GetKpiAlarms(self, request: KpiId) -> KpiAlarms: # type: ignore + LOGGER.debug('GetKpiAlarms: {:s}'.format(grpc_message_to_json_string(request))) + response = self.stub.GetKpiAlarms(request) + LOGGER.debug('GetKpiAlarms result: {:s}'.format(grpc_message_to_json_string(response))) + return response diff --git a/src/kpi_value_api/requirements.in b/src/kpi_value_api/requirements.in index f5695906a8d02d55e15960a76986b8d03f02dba1..0615fa833f255bf91fd72fc484e40842face7a44 100644 --- a/src/kpi_value_api/requirements.in +++ b/src/kpi_value_api/requirements.in @@ -14,4 +14,5 @@ confluent-kafka==2.3.* requests==2.27.* -prometheus-api-client==0.5.3 \ No newline at end of file +prometheus-api-client==0.5.3 +apscheduler==3.10.1 diff --git a/src/kpi_value_api/service/KpiValueApiServiceServicerImpl.py b/src/kpi_value_api/service/KpiValueApiServiceServicerImpl.py index 4ea978fafc8d7454d41f64182d553d030215113a..706e180d5cf65107f5899315cdf75867beb81608 100644 --- a/src/kpi_value_api/service/KpiValueApiServiceServicerImpl.py +++ b/src/kpi_value_api/service/KpiValueApiServiceServicerImpl.py @@ -12,18 +12,22 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging, grpc, json +from datetime import datetime +import logging, grpc, json, queue from typing import Dict from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method from common.tools.kafka.Variables import KafkaConfig, KafkaTopic +from confluent_kafka import KafkaError from common.proto.context_pb2 import Empty from common.proto.kpi_sample_types_pb2 import KpiSampleType from common.proto.kpi_manager_pb2 import KpiDescriptor, KpiId from common.proto.kpi_value_api_pb2_grpc import KpiValueAPIServiceServicer -from common.proto.kpi_value_api_pb2 import KpiValueList, KpiValueFilter, KpiValue, KpiValueType - +from common.proto.kpi_value_api_pb2 import KpiAlarms, KpiValueList, KpiValueFilter, KpiValue, KpiValueType +from apscheduler.schedulers.background import BackgroundScheduler +from apscheduler.triggers.interval import IntervalTrigger from confluent_kafka import Producer as KafkaProducer +from confluent_kafka import Consumer as KafkaConsumer from prometheus_api_client import PrometheusConnect from prometheus_api_client.utils import parse_datetime @@ -37,8 +41,14 @@ PROM_URL = "http://prometheus-k8s.monitoring.svc.cluster.local:9090" # TO class KpiValueApiServiceServicerImpl(KpiValueAPIServiceServicer): def __init__(self): LOGGER.debug('Init KpiValueApiService') + self.listener_topic = KafkaTopic.ALARMS.value + self.result_queue = queue.Queue() + self.scheduler = BackgroundScheduler() self.kafka_producer = KafkaProducer({'bootstrap.servers' : KafkaConfig.get_kafka_address()}) - + self.kafka_consumer = KafkaConsumer({'bootstrap.servers' : KafkaConfig.get_kafka_address(), + 'group.id' : 'kpi-value-api-frontend', + 'auto.offset.reset' : 'latest'}) + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) def StoreKpiValues(self, request: KpiValueList, grpc_context: grpc.ServicerContext ) -> Empty: @@ -109,17 +119,14 @@ class KpiValueApiServiceServicerImpl(KpiValueAPIServiceServicer): kpi_value = KpiValue() kpi_value.kpi_id.kpi_id = record['metric']['__name__'], kpi_value.timestamp = value[0], - kpi_value.kpi_value_type = self.ConverValueToKpiValueType(value[1]) + kpi_value.kpi_value_type.CopyFrom(self.ConverValueToKpiValueType(value['kpi_value'])) response.kpi_value_list.append(kpi_value) return response def GetKpiSampleType(self, kpi_value: str, kpi_manager_client): - print("--- START -----") - kpi_id = KpiId() kpi_id.kpi_id.uuid = kpi_value.kpi_id.kpi_id.uuid # print("KpiId generated: {:}".format(kpi_id)) - try: kpi_descriptor_object = KpiDescriptor() kpi_descriptor_object = kpi_manager_client.GetKpiDescriptor(kpi_id) @@ -135,26 +142,90 @@ class KpiValueApiServiceServicerImpl(KpiValueAPIServiceServicer): LOGGER.info("Unable to get KpiDescriptor. Error: {:}".format(e)) print ("Unable to get KpiDescriptor. Error: {:}".format(e)) - def ConverValueToKpiValueType(self, value): - # Check if the value is an integer (int64) - try: - int_value = int(value) - return KpiValueType(int64Val=int_value) - except (ValueError, TypeError): - pass - # Check if the value is a float + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def GetKpiAlarms(self, request: KpiId, grpc_context: grpc.ServicerContext) -> KpiAlarms: # type: ignore + """ + Get Alarms from Kafka return Alrams periodically. + """ + LOGGER.debug('GetKpiAlarms: {:}'.format(request)) + response = KpiAlarms() + + for alarm_key, value in self.StartResponseListener(request.kpi_id.uuid): + response.start_timestamp.timestamp = datetime.strptime( + value["window_start"], "%Y-%m-%dT%H:%M:%S.%fZ").timestamp() + response.kpi_id.kpi_id.uuid = value['kpi_id'] + for key, threshold in value.items(): + if key not in ['kpi_id', 'window']: + response.alarms[key] = threshold + + yield response + + def StartResponseListener(self, filter_key=None): + """ + Start the Kafka response listener with APScheduler and return key-value pairs periodically. + """ + LOGGER.info("Starting StartResponseListener") + # Schedule the ResponseListener at fixed intervals + self.scheduler.add_job( + self.response_listener, + trigger=IntervalTrigger(seconds=5), + args=[filter_key], + id=f"response_listener_{self.listener_topic}", + replace_existing=True + ) + self.scheduler.start() + LOGGER.info(f"Started Kafka listener for topic {self.listener_topic}...") try: - float_value = float(value) - return KpiValueType(floatVal=float_value) - except (ValueError, TypeError): - pass - # Check if the value is a boolean - if value.lower() in ['true', 'false']: - bool_value = value.lower() == 'true' - return KpiValueType(boolVal=bool_value) - # If none of the above, treat it as a string - return KpiValueType(stringVal=value) + while True: + LOGGER.info("entering while...") + key, value = self.result_queue.get() # Wait until a result is available + LOGGER.info("In while true ...") + yield key, value # Yield the result to the calling function + except Exception as e: + LOGGER.warning("Listener stopped. Error: {:}".format(e)) + finally: + self.scheduler.shutdown() + + def response_listener(self, filter_key=None): + """ + Poll Kafka messages and put key-value pairs into the queue. + """ + LOGGER.info(f"Polling Kafka topic {self.listener_topic}...") + + consumer = self.kafka_consumer + consumer.subscribe([self.listener_topic]) + while True: + msg = consumer.poll(1.0) + if msg is None: + continue + elif msg.error(): + if msg.error().code() != KafkaError._PARTITION_EOF: + LOGGER.error(f"Kafka error: {msg.error()}") + break + try: + key = msg.key().decode('utf-8') if msg.key() else None + if filter_key is not None and key == filter_key: + value = json.loads(msg.value().decode('utf-8')) + LOGGER.info(f"Received key: {key}, value: {value}") + self.result_queue.put((key, value)) + else: + LOGGER.warning(f"Skipping message with unmatched key: {key} - {filter_key}") + except Exception as e: + LOGGER.error(f"Error processing Kafka message: {e}") def delivery_callback(self, err, msg): if err: LOGGER.debug('Message delivery failed: {:}'.format(err)) else: LOGGER.debug('Message delivered to topic {:}'.format(msg.topic())) + + def ConverValueToKpiValueType(self, value): + kpi_value_type = KpiValueType() + if isinstance(value, int): + kpi_value_type.int32Val = value + elif isinstance(value, float): + kpi_value_type.floatVal = value + elif isinstance(value, str): + kpi_value_type.stringVal = value + elif isinstance(value, bool): + kpi_value_type.boolVal = value + # Add other checks for different types as needed + return kpi_value_type diff --git a/src/kpi_value_api/tests/messages.py b/src/kpi_value_api/tests/messages.py index d8ad14bd44eebc1e9412cfd5ff2973e6018c95e9..50240c0154deff33dfdbb797cd5e0fca9a05c8ab 100644 --- a/src/kpi_value_api/tests/messages.py +++ b/src/kpi_value_api/tests/messages.py @@ -13,9 +13,16 @@ # limitations under the License. import uuid, time +from common.proto import kpi_manager_pb2 from common.proto.kpi_value_api_pb2 import KpiValue, KpiValueList +def create_kpi_id_request(): + _create_kpi_id = kpi_manager_pb2.KpiId() + _create_kpi_id.kpi_id.uuid = "6e22f180-ba28-4641-b190-2287bf448888" + # _create_kpi_id.kpi_id.uuid = str(uuid.uuid4()) + return _create_kpi_id + def create_kpi_value_list(): _create_kpi_value_list = KpiValueList() # To run this experiment sucessfully, add an existing UUID of a KPI Descriptor from the KPI DB. diff --git a/src/kpi_value_api/tests/test_kpi_value_api.py b/src/kpi_value_api/tests/test_kpi_value_api.py index 307b5cdad4e6503a774e308f669fc44762f84bf1..c245bb9ef64eaa29dc4d51955ff94adeeeeb8dda 100644 --- a/src/kpi_value_api/tests/test_kpi_value_api.py +++ b/src/kpi_value_api/tests/test_kpi_value_api.py @@ -21,8 +21,8 @@ from common.Settings import ( ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, get_env_var_name, get_service_port_grpc) from kpi_value_api.service.KpiValueApiService import KpiValueApiService from kpi_value_api.client.KpiValueApiClient import KpiValueApiClient -from kpi_value_api.tests.messages import create_kpi_value_list - +from kpi_value_api.tests.messages import create_kpi_value_list, create_kpi_id_request +from common.proto.kpi_value_api_pb2 import KpiAlarms LOCAL_HOST = '127.0.0.1' KPIVALUEAPI_SERVICE_PORT = get_service_port_grpc(ServiceNameEnum.KPIVALUEAPI) # type: ignore @@ -78,7 +78,14 @@ def test_validate_kafka_topics(): response = KafkaTopic.create_all_topics() assert isinstance(response, bool) -def test_store_kpi_values(kpi_value_api_client): - LOGGER.debug(" >>> test_set_list_of_KPIs: START <<< ") - response = kpi_value_api_client.StoreKpiValues(create_kpi_value_list()) - assert isinstance(response, Empty) +# def test_GetKpiAlarms(kpi_value_api_client): +# LOGGER.debug(" >>> test_GetKpiAlarms") +# stream = kpi_value_api_client.GetKpiAlarms(create_kpi_id_request()) +# for response in stream: +# LOGGER.debug(str(response)) +# assert isinstance(response, KpiAlarms) + +# def test_store_kpi_values(kpi_value_api_client): +# LOGGER.debug(" >>> test_set_list_of_KPIs: START <<< ") +# response = kpi_value_api_client.StoreKpiValues(create_kpi_value_list()) +# assert isinstance(response, Empty) diff --git a/src/kpi_value_writer/.gitlab-ci.yml b/src/kpi_value_writer/.gitlab-ci.yml index 9a2f9fd47e435b26e2e3a335bd9b95da58a0517f..3f376a6739ebf72964d889e0c43e04f8daed6069 100644 --- a/src/kpi_value_writer/.gitlab-ci.yml +++ b/src/kpi_value_writer/.gitlab-ci.yml @@ -59,9 +59,11 @@ unit_test kpi-value-writer: - docker pull "bitnami/kafka:latest" - > docker run --name zookeeper -d --network=teraflowbridge -p 2181:2181 + --env ALLOW_ANONYMOUS_LOGIN=yes bitnami/zookeeper:latest - sleep 10 # Wait for Zookeeper to start - - docker run --name kafka -d --network=teraflowbridge -p 9092:9092 + - > + docker run --name kafka -d --network=teraflowbridge -p 9092:9092 --env KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181 --env ALLOW_PLAINTEXT_LISTENER=yes bitnami/kafka:latest @@ -76,6 +78,8 @@ unit_test kpi-value-writer: $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG - sleep 5 - docker ps -a + - docker logs zookeeper + - docker logs kafka - docker logs $IMAGE_NAME - > docker exec -i $IMAGE_NAME bash -c @@ -84,8 +88,8 @@ unit_test kpi-value-writer: coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' after_script: - docker rm -f $IMAGE_NAME - - docker rm -f zookeeper - docker rm -f kafka + - docker rm -f zookeeper - docker network rm teraflowbridge rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' diff --git a/src/kpi_value_writer/service/MetricWriterToPrometheus.py b/src/kpi_value_writer/service/MetricWriterToPrometheus.py index 85e618a4b5b330cb83cf255652e7be8dff2dabd3..ad37d73bc2564851ee3659f3ddd756611c57bbfc 100644 --- a/src/kpi_value_writer/service/MetricWriterToPrometheus.py +++ b/src/kpi_value_writer/service/MetricWriterToPrometheus.py @@ -15,7 +15,6 @@ # read Kafka stream from Kafka topic import logging -from typing import Dict from prometheus_client import Gauge from common.proto.kpi_sample_types_pb2 import KpiSampleType @@ -45,13 +44,13 @@ class MetricWriterToPrometheus: 'slice_id' : kpi_descriptor.slice_id.slice_uuid.uuid, 'connection_id' : kpi_descriptor.connection_id.connection_uuid.uuid, 'link_id' : kpi_descriptor.link_id.link_uuid.uuid, - 'time_stamp' : kpi_value['timestamp'], - 'kpi_value' : kpi_value['kpi_value_type'] + 'time_stamp' : kpi_value.timestamp.timestamp, + 'kpi_value' : kpi_value.kpi_value_type.floatVal } - # LOGGER.debug("Cooked Kpi: {:}".format(cooked_kpi)) + LOGGER.debug("Cooked Kpi: {:}".format(cooked_kpi)) return cooked_kpi - def create_and_expose_cooked_kpi(self, kpi_descriptor: KpiDescriptor, kpi_value: Dict): + def create_and_expose_cooked_kpi(self, kpi_descriptor: KpiDescriptor, kpi_value: KpiValue): # merge both gRPC messages into single varible. cooked_kpi = self.merge_kpi_descriptor_and_kpi_value(kpi_descriptor, kpi_value) tags_to_exclude = {'kpi_description', 'kpi_sample_type', 'kpi_value'} @@ -74,7 +73,7 @@ class MetricWriterToPrometheus: connection_id = cooked_kpi['connection_id'], link_id = cooked_kpi['link_id'], time_stamp = cooked_kpi['time_stamp'], - ).set(cooked_kpi['kpi_value']) + ).set(float(cooked_kpi['kpi_value'])) LOGGER.debug("Metric pushed to the endpoints: {:}".format(PROM_METRICS[metric_name])) except ValueError as e: diff --git a/src/kpi_value_writer/tests/test_kpi_value_writer.py b/src/kpi_value_writer/tests/test_kpi_value_writer.py index b784fae5da713f9bd7cd7a1668f48b080f7a84fa..521dd676eb20d35f46a02d959a809eea685bd67a 100755 --- a/src/kpi_value_writer/tests/test_kpi_value_writer.py +++ b/src/kpi_value_writer/tests/test_kpi_value_writer.py @@ -29,5 +29,5 @@ def test_validate_kafka_topics(): def test_KafkaConsumer(): LOGGER.debug(" --->>> test_kafka_consumer: START <<<--- ") - kpi_value_writer = KpiValueWriter() - kpi_value_writer.RunKafkaConsumer() + # kpi_value_writer = KpiValueWriter() + # kpi_value_writer.RunKafkaConsumer() diff --git a/src/nbi/Dockerfile b/src/nbi/Dockerfile index 1435e9757226e290e92f208ef48a7182eb106c55..c5fc8d32491d7576e93534c75c264e79c37a36c6 100644 --- a/src/nbi/Dockerfile +++ b/src/nbi/Dockerfile @@ -89,6 +89,8 @@ COPY src/service/__init__.py service/__init__.py COPY src/service/client/. service/client/ COPY src/slice/__init__.py slice/__init__.py COPY src/slice/client/. slice/client/ +COPY src/qkd_app/__init__.py qkd_app/__init__.py +COPY src/qkd_app/client/. qkd_app/client/ RUN mkdir -p /var/teraflow/tests/tools COPY src/tests/tools/mock_osm/. tests/tools/mock_osm/ diff --git a/src/nbi/service/__main__.py b/src/nbi/service/__main__.py index 58fbb9625addc43c6b62d06d7a9caa3f648203d5..ddbf7bb8fdeb688cc03b40499e61c5a34f2b82e5 100644 --- a/src/nbi/service/__main__.py +++ b/src/nbi/service/__main__.py @@ -16,9 +16,10 @@ import logging, signal, sys, threading from prometheus_client import start_http_server from common.Constants import ServiceNameEnum from common.Settings import ( - ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, get_env_var_name, get_log_level, get_metrics_port, - wait_for_environment_variables) - + ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, + get_env_var_name, get_log_level, get_metrics_port, + wait_for_environment_variables +) from .NbiService import NbiService from .rest_server.RestServer import RestServer from .rest_server.nbi_plugins.etsi_bwm import register_etsi_bwm_api @@ -28,6 +29,7 @@ from .rest_server.nbi_plugins.ietf_l3vpn import register_ietf_l3vpn from .rest_server.nbi_plugins.ietf_network import register_ietf_network from .rest_server.nbi_plugins.ietf_network_slice import register_ietf_nss from .rest_server.nbi_plugins.ietf_acl import register_ietf_acl +from .rest_server.nbi_plugins.qkd_app import register_qkd_app from .rest_server.nbi_plugins.tfs_api import register_tfs_api terminate = threading.Event() @@ -47,8 +49,10 @@ def main(): wait_for_environment_variables([ get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_HOST ), get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_PORT_GRPC), - get_env_var_name(ServiceNameEnum.SLICE, ENVVAR_SUFIX_SERVICE_HOST ), - get_env_var_name(ServiceNameEnum.SLICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC), + get_env_var_name(ServiceNameEnum.DEVICE, ENVVAR_SUFIX_SERVICE_HOST ), + get_env_var_name(ServiceNameEnum.DEVICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC), + get_env_var_name(ServiceNameEnum.SERVICE, ENVVAR_SUFIX_SERVICE_HOST ), + get_env_var_name(ServiceNameEnum.SERVICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC), ]) signal.signal(signal.SIGINT, signal_handler) @@ -72,6 +76,7 @@ def main(): register_ietf_network(rest_server) register_ietf_nss(rest_server) # Registering NSS entrypoint register_ietf_acl(rest_server) + register_qkd_app(rest_server) register_tfs_api(rest_server) rest_server.start() diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/NameMapping.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/NameMapping.py index 0c10559115f4e4ba9e5b2468e36cf7f917c25f51..94e4723a5c7ca83fb382bb70cb241cb69b66ce0e 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network/NameMapping.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/NameMapping.py @@ -19,7 +19,7 @@ class NameMappings: def __init__(self) -> None: self._device_uuid_to_name : Dict[str, str] = dict() self._endpoint_uuid_to_name : Dict[Tuple[str, str], str] = dict() - + def store_device_name(self, device : Device) -> None: device_uuid = device.device_id.device_uuid.uuid device_name = device.name diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/Networks.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/Networks.py index 5d663b8b3071856bc9cd204ee911c61b368ebe97..0198d418f7e5f0058ce40fbcd7b6010a168e1c51 100644 --- a/src/nbi/service/rest_server/nbi_plugins/ietf_network/Networks.py +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/Networks.py @@ -12,19 +12,23 @@ # See the License for the specific language governing permissions and # limitations under the License. -import json, logging +import enum, json, logging import pyangbind.lib.pybindJSON as pybindJSON from flask import request from flask.json import jsonify from flask_restful import Resource from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME +from common.Settings import get_setting +from common.proto.context_pb2 import ContextId, Empty from common.tools.context_queries.Topology import get_topology_details +from common.tools.object_factory.Context import json_context_id from context.client.ContextClient import ContextClient from nbi.service.rest_server.nbi_plugins.tools.Authentication import HTTP_AUTH from nbi.service.rest_server.nbi_plugins.tools.HttpStatusCodes import HTTP_OK, HTTP_SERVERERROR from .bindings import ietf_network from .ComposeNetwork import compose_network from .ManualFixes import manual_fixes +from .YangHandler import YangHandler LOGGER = logging.getLogger(__name__) @@ -33,6 +37,14 @@ TE_TOPOLOGY_NAMES = [ 'providerId-10-clientId-0-topologyId-2' ] +class Renderer(enum.Enum): + LIBYANG = 'LIBYANG' + PYANGBIND = 'PYANGBIND' + +DEFAULT_RENDERER = Renderer.LIBYANG +USE_RENDERER = get_setting('IETF_NETWORK_RENDERER', default=DEFAULT_RENDERER.value) + + class Networks(Resource): @HTTP_AUTH.login_required def get(self): @@ -40,31 +52,59 @@ class Networks(Resource): topology_id = '' try: context_client = ContextClient() - #target = get_slice_by_uuid(context_client, vpn_id, rw_copy=True) - #if target is None: - # raise Exception('VPN({:s}) not found in database'.format(str(vpn_id))) - ietf_nets = ietf_network() + if USE_RENDERER == Renderer.PYANGBIND.value: + #target = get_slice_by_uuid(context_client, vpn_id, rw_copy=True) + #if target is None: + # raise Exception('VPN({:s}) not found in database'.format(str(vpn_id))) + + ietf_nets = ietf_network() + + topology_details = get_topology_details( + context_client, DEFAULT_TOPOLOGY_NAME, context_uuid=DEFAULT_CONTEXT_NAME, + #rw_copy=True + ) + if topology_details is None: + MSG = 'Topology({:s}/{:s}) not found' + raise Exception(MSG.format(DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME)) - topology_details = get_topology_details( - context_client, DEFAULT_TOPOLOGY_NAME, context_uuid=DEFAULT_CONTEXT_NAME, #rw_copy=True - ) - if topology_details is None: - MSG = 'Topology({:s}/{:s}) not found' - raise Exception(MSG.format(DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME)) + for te_topology_name in TE_TOPOLOGY_NAMES: + ietf_net = ietf_nets.networks.network.add(te_topology_name) + compose_network(ietf_net, te_topology_name, topology_details) - for te_topology_name in TE_TOPOLOGY_NAMES: - ietf_net = ietf_nets.networks.network.add(te_topology_name) - compose_network(ietf_net, te_topology_name, topology_details) + # TODO: improve these workarounds to enhance performance + json_response = json.loads(pybindJSON.dumps(ietf_nets, mode='ietf')) + + # Workaround; pyangbind does not allow to set otn_topology / eth-tran-topology + manual_fixes(json_response) + elif USE_RENDERER == Renderer.LIBYANG.value: + yang_handler = YangHandler() + json_response = [] - # TODO: improve these workarounds to enhance performance - json_response = json.loads(pybindJSON.dumps(ietf_nets, mode='ietf')) - - # Workaround; pyangbind does not allow to set otn_topology / eth-tran-topology - manual_fixes(json_response) + contexts = context_client.ListContexts(Empty()).contexts + context_names = [context.name for context in contexts] + LOGGER.info(f'Contexts detected: {context_names}') + + for context_name in context_names: + topologies = context_client.ListTopologies(ContextId(**json_context_id(context_name))).topologies + topology_names = [topology.name for topology in topologies] + LOGGER.info(f'Topologies detected for context {context_name}: {topology_names}') + + for topology_name in topology_names: + topology_details = get_topology_details(context_client, topology_name, context_name) + if topology_details is None: + raise Exception(f'Topology({context_name}/{topology_name}) not found') + + network_reply = yang_handler.compose_network(topology_name, topology_details) + json_response.append(network_reply) + + yang_handler.destroy() + else: + raise Exception('Unsupported Renderer: {:s}'.format(str(USE_RENDERER))) response = jsonify(json_response) response.status_code = HTTP_OK + except Exception as e: # pylint: disable=broad-except LOGGER.exception('Something went wrong Retrieving Topology({:s})'.format(str(topology_id))) response = jsonify({'error': str(e)}) diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/YangHandler.py b/src/nbi/service/rest_server/nbi_plugins/ietf_network/YangHandler.py new file mode 100644 index 0000000000000000000000000000000000000000..a5dda280c98c060c2f872df5ab17152880b522d5 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/YangHandler.py @@ -0,0 +1,117 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import json +import libyang, logging, os +from typing import Any +from common.proto.context_pb2 import TopologyDetails, Device, Link +from .NameMapping import NameMappings +from context.client.ContextClient import ContextClient +from common.tools.object_factory.Device import json_device_id +from common.proto.context_pb2 import DeviceId + +LOGGER = logging.getLogger(__name__) + +YANG_DIR = os.path.join(os.path.dirname(__file__), 'yang') +YANG_MODULES = ['ietf-network', 'ietf-network-topology', 'ietf-l3-unicast-topology'] + +class YangHandler: + def __init__(self) -> None: + self._yang_context = libyang.Context(YANG_DIR) + for yang_module_name in YANG_MODULES: + LOGGER.info('Loading module: {:s}'.format(str(yang_module_name))) + self._yang_context.load_module(yang_module_name).feature_enable_all() + + def compose_network(self, te_topology_name: str, topology_details: TopologyDetails) -> dict: + networks = self._yang_context.create_data_path('/ietf-network:networks') + network = networks.create_path(f'network[network-id="{te_topology_name}"]') + network.create_path('network-id', te_topology_name) + + network_types = network.create_path('network-types') + network_types.create_path('ietf-l3-unicast-topology:l3-unicast-topology') + + name_mappings = NameMappings() + + for device in topology_details.devices: + self.compose_node(device, name_mappings, network) + + for link in topology_details.links: + self.compose_link(link, name_mappings, network) + + return json.loads(networks.print_mem('json')) + + def compose_node(self, dev: Device, name_mappings: NameMappings, network: Any) -> None: + device_name = dev.name + name_mappings.store_device_name(dev) + + node = network.create_path(f'node[node-id="{device_name}"]') + node.create_path('node-id', device_name) + node_attributes = node.create_path('ietf-l3-unicast-topology:l3-node-attributes') + node_attributes.create_path('name', device_name) + + context_client = ContextClient() + device = context_client.GetDevice(DeviceId(**json_device_id(device_name))) + + for endpoint in device.device_endpoints: + name_mappings.store_endpoint_name(dev, endpoint) + + self._process_device_config(device, node) + + def _process_device_config(self, device: Device, node: Any) -> None: + for config in device.device_config.config_rules: + if config.WhichOneof('config_rule') != 'custom' or '/interface[' not in config.custom.resource_key: + continue + + for endpoint in device.device_endpoints: + endpoint_name = endpoint.name + if f'/interface[{endpoint_name}]' in config.custom.resource_key or f'/interface[{endpoint_name}.' in config.custom.resource_key: + interface_name = config.custom.resource_key.split('interface[')[1].split(']')[0] + self._create_termination_point(node, interface_name, endpoint_name, config.custom.resource_value) + + def _create_termination_point(self, node: Any, interface_name: str, endpoint_name: str, resource_value: str) -> None: + ip_addresses = self._extract_ip_addresses(json.loads(resource_value)) + if ip_addresses: + tp = node.create_path(f'ietf-network-topology:termination-point[tp-id="{interface_name}"]') + tp.create_path('tp-id', interface_name) + tp_attributes = tp.create_path('ietf-l3-unicast-topology:l3-termination-point-attributes') + + for ip in ip_addresses: + tp_attributes.create_path('ip-address', ip) + tp_attributes.create_path('interface-name', endpoint_name) + + @staticmethod + def _extract_ip_addresses(resource_value: dict) -> list: + ip_addresses = [] + if 'address_ip' in resource_value: + ip_addresses.append(resource_value['address_ip']) + if 'address_ipv6' in resource_value: + ip_addresses.append(resource_value['address_ipv6']) + return ip_addresses + + def compose_link(self, link_specs: Link, name_mappings: NameMappings, network: Any) -> None: + link_name = link_specs.name + links = network.create_path(f'ietf-network-topology:link[link-id="{link_name}"]') + links.create_path('link-id', link_name) + + self._create_link_endpoint(links, 'source', link_specs.link_endpoint_ids[0], name_mappings) + self._create_link_endpoint(links, 'destination', link_specs.link_endpoint_ids[-1], name_mappings) + + def _create_link_endpoint(self, links: Any, endpoint_type: str, endpoint_id: Any, name_mappings: NameMappings) -> None: + endpoint = links.create_path(endpoint_type) + if endpoint_type == 'destination': endpoint_type = 'dest' + endpoint.create_path(f'{endpoint_type}-node', name_mappings.get_device_name(endpoint_id.device_id)) + endpoint.create_path(f'{endpoint_type}-tp', name_mappings.get_endpoint_name(endpoint_id)) + + def destroy(self) -> None: + self._yang_context.destroy() diff --git a/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-l3-unicast-topology@2018-02-26.yang b/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-l3-unicast-topology@2018-02-26.yang new file mode 100644 index 0000000000000000000000000000000000000000..39fcebd767bf7ea687de523b0dd0ba731d3c80e7 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/ietf_network/yang/ietf-l3-unicast-topology@2018-02-26.yang @@ -0,0 +1,359 @@ +module ietf-l3-unicast-topology { + yang-version 1.1; + namespace + "urn:ietf:params:xml:ns:yang:ietf-l3-unicast-topology"; + prefix "l3t"; + import ietf-network { + prefix "nw"; + } + import ietf-network-topology { + prefix "nt"; + } + import ietf-inet-types { + prefix "inet"; + } + import ietf-routing-types { + prefix "rt-types"; + } + organization + "IETF I2RS (Interface to the Routing System) Working Group"; + contact + "WG Web: <https://datatracker.ietf.org/wg/i2rs/> + WG List: <mailto:i2rs@ietf.org> + Editor: Alexander Clemm + <mailto:ludwig@clemm.org> + Editor: Jan Medved + <mailto:jmedved@cisco.com> + Editor: Robert Varga + <mailto:robert.varga@pantheon.tech> + Editor: Xufeng Liu + <mailto:xufeng.liu.ietf@gmail.com> + Editor: Nitin Bahadur + <mailto:nitin_bahadur@yahoo.com> + Editor: Hariharan Ananthakrishnan + <mailto:hari@packetdesign.com>"; + description + "This module defines a model for Layer 3 Unicast + topologies. + + Copyright (c) 2018 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (https://trustee.ietf.org/license-info). + + This version of this YANG module is part of + RFC 8346; see the RFC itself for full legal notices."; + revision "2018-02-26" { + description + "Initial revision."; + reference + "RFC 8346: A YANG Data Model for Layer 3 Topologies"; + } + + identity flag-identity { + description "Base type for flags"; + } + + typedef l3-event-type { + type enumeration { + enum "add" { + description + "A Layer 3 node, link, prefix, or termination point has + been added"; + } + enum "remove" { + description + "A Layer 3 node, link, prefix, or termination point has + been removed"; + } + enum "update" { + description + "A Layer 3 node, link, prefix, or termination point has + been updated"; + } + } + description "Layer 3 event type for notifications"; + } + + typedef prefix-flag-type { + type identityref { + base "flag-identity"; + } + description "Prefix flag attributes"; + } + + typedef node-flag-type { + type identityref { + base "flag-identity"; + } + description "Node flag attributes"; + } + + typedef link-flag-type { + type identityref { + base "flag-identity"; + } + description "Link flag attributes"; + } + + typedef l3-flag-type { + type identityref { + base "flag-identity"; + } + description "L3 flag attributes"; + } + + grouping l3-prefix-attributes { + description + "L3 prefix attributes"; + leaf prefix { + type inet:ip-prefix; + description + "IP prefix value"; + } + leaf metric { + type uint32; + description + "Prefix metric"; + } + leaf-list flag { + type prefix-flag-type; + description + "Prefix flags"; + } + } + grouping l3-unicast-topology-type { + description "Identifies the topology type to be L3 Unicast."; + container l3-unicast-topology { + presence "indicates L3 Unicast topology"; + description + "The presence of the container node indicates L3 Unicast + topology"; + } + } + grouping l3-topology-attributes { + description "Topology scope attributes"; + container l3-topology-attributes { + description "Contains topology attributes"; + leaf name { + type string; + description + "Name of the topology"; + } + leaf-list flag { + type l3-flag-type; + description + "Topology flags"; + } + } + } + grouping l3-node-attributes { + description "L3 node scope attributes"; + container l3-node-attributes { + description + "Contains node attributes"; + leaf name { + type inet:domain-name; + description + "Node name"; + } + leaf-list flag { + type node-flag-type; + description + "Node flags"; + } + leaf-list router-id { + type rt-types:router-id; + description + "Router-id for the node"; + } + list prefix { + key "prefix"; + description + "A list of prefixes along with their attributes"; + uses l3-prefix-attributes; + } + } + } + grouping l3-link-attributes { + description + "L3 link scope attributes"; + container l3-link-attributes { + description + "Contains link attributes"; + leaf name { + type string; + description + "Link Name"; + } + leaf-list flag { + type link-flag-type; + description + "Link flags"; + } + leaf metric1 { + type uint64; + description + "Link Metric 1"; + } + leaf metric2 { + type uint64; + description + "Link Metric 2"; + } + } + } + grouping l3-termination-point-attributes { + description "L3 termination point scope attributes"; + container l3-termination-point-attributes { + description + "Contains termination point attributes"; + choice termination-point-type { + description + "Indicates the termination point type"; + case ip { + leaf-list ip-address { + type inet:ip-address; + description + "IPv4 or IPv6 address."; + } + } + case unnumbered { + leaf unnumbered-id { + type uint32; + description + "Unnumbered interface identifier. + The identifier will correspond to the ifIndex value + of the interface, i.e., the ifIndex value of the + ifEntry that represents the interface in + implementations where the Interfaces Group MIB + (RFC 2863) is supported."; + reference + "RFC 2863: The Interfaces Group MIB"; + } + } + case interface-name { + leaf interface-name { + type string; + description + "Name of the interface. The name can (but does not + have to) correspond to an interface reference of a + containing node's interface, i.e., the path name of a + corresponding interface data node on the containing + node reminiscent of data type interface-ref defined + in RFC 8343. It should be noted that data type + interface-ref of RFC 8343 cannot be used directly, + + as this data type is used to reference an interface + in a datastore of a single node in the network, not + to uniquely reference interfaces across a network."; + reference + "RFC 8343: A YANG Data Model for Interface Management"; + } + } + } + } + } + augment "/nw:networks/nw:network/nw:network-types" { + description + "Introduces new network type for L3 Unicast topology"; + uses l3-unicast-topology-type; + } + augment "/nw:networks/nw:network" { + when "nw:network-types/l3t:l3-unicast-topology" { + description + "Augmentation parameters apply only for networks with + L3 Unicast topology"; + } + description + "L3 Unicast for the network as a whole"; + uses l3-topology-attributes; + } + augment "/nw:networks/nw:network/nw:node" { + when "../nw:network-types/l3t:l3-unicast-topology" { + description + "Augmentation parameters apply only for networks with + L3 Unicast topology"; + } + description + "L3 Unicast node-level attributes "; + uses l3-node-attributes; + } + augment "/nw:networks/nw:network/nt:link" { + when "../nw:network-types/l3t:l3-unicast-topology" { + description + "Augmentation parameters apply only for networks with + L3 Unicast topology"; + } + description + "Augments topology link attributes"; + uses l3-link-attributes; + } + augment "/nw:networks/nw:network/nw:node/" + +"nt:termination-point" { + when "../../nw:network-types/l3t:l3-unicast-topology" { + description + "Augmentation parameters apply only for networks with + L3 Unicast topology"; + } + description "Augments topology termination point configuration"; + uses l3-termination-point-attributes; + } + notification l3-node-event { + description + "Notification event for L3 node"; + leaf l3-event-type { + type l3-event-type; + description + "Event type"; + } + uses nw:node-ref; + uses l3-unicast-topology-type; + uses l3-node-attributes; + } + notification l3-link-event { + description + "Notification event for L3 link"; + leaf l3-event-type { + type l3-event-type; + description + "Event type"; + } + uses nt:link-ref; + uses l3-unicast-topology-type; + uses l3-link-attributes; + } + notification l3-prefix-event { + description + "Notification event for L3 prefix"; + leaf l3-event-type { + type l3-event-type; + description + "Event type"; + } + uses nw:node-ref; + uses l3-unicast-topology-type; + container prefix { + description + "Contains L3 prefix attributes"; + uses l3-prefix-attributes; + } + } + notification termination-point-event { + description + "Notification event for L3 termination point"; + leaf l3-event-type { + type l3-event-type; + description + "Event type"; + } + uses nt:tp-ref; + uses l3-unicast-topology-type; + uses l3-termination-point-attributes; + } +} diff --git a/src/nbi/service/rest_server/nbi_plugins/qkd_app/Resources.py b/src/nbi/service/rest_server/nbi_plugins/qkd_app/Resources.py new file mode 100644 index 0000000000000000000000000000000000000000..d14fe9575b21319a0fa597a7746510a11e102903 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/qkd_app/Resources.py @@ -0,0 +1,111 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import uuid +import json +from flask import request +from flask_restful import Resource +from common.proto.context_pb2 import Empty +from common.proto.qkd_app_pb2 import App, QKDAppTypesEnum +from common.Constants import DEFAULT_CONTEXT_NAME +from context.client.ContextClient import ContextClient +from qkd_app.client.QKDAppClient import QKDAppClient + +class _Resource(Resource): + def __init__(self) -> None: + super().__init__() + self.context_client = ContextClient() + self.qkd_app_client = QKDAppClient() + +class Index(_Resource): + def get(self): + return {'hello': 'world'} + +class ListDevices(_Resource): + def get(self): + """ + List devices and associate the apps with them. + """ + devices = self.context_client.ListDevices(Empty()).devices + for device in devices: + # Fetch apps associated with this device + device.apps = self.get_apps_for_device(device.device_id.device_uuid.uuid) + return {'devices': [self.format_device(device) for device in devices]} + + def get_apps_for_device(self, device_uuid): + """ + Fetch the apps associated with a given device UUID. + """ + try: + # Call the AppService to get the list of apps + apps_list = self.qkd_app_client.ListApps(Empty()) + + # Filter apps for this specific device + device_apps = [] + for app in apps_list.apps: + if app.local_device_id.device_uuid.uuid == device_uuid or \ + app.remote_device_id.device_uuid.uuid == device_uuid: + device_apps.append(app) + return device_apps + + except Exception as e: + print(f"Error fetching apps for device {device_uuid}: {e}") + return [] + + def format_device(self, device): + """ + Formats a device object to include the associated apps in the response. + """ + return { + 'device_uuid': device.device_id.device_uuid.uuid, + 'name': device.name, + 'type': device.device_type, + 'status': device.device_operational_status, + 'apps': [{'app_id': app.app_id.app_uuid.uuid, 'app_status': app.app_status, 'app_type': app.app_type} for app in device.apps] + } + +class CreateQKDApp(_Resource): + def post(self): + app = request.get_json()['app'] + devices = self.context_client.ListDevices(Empty()).devices + local_device = None + + # This for-loop won't be necessary if Device ID is guaranteed to be the same as QKDN Id + for device in devices: + for config_rule in device.device_config.config_rules: + if config_rule.custom.resource_key == '__node__': + value = json.loads(config_rule.custom.resource_value) + qkdn_id = value['qkdn_id'] + if app['local_qkdn_id'] == qkdn_id: + local_device = device + break + + if local_device is None: + return {"status": "fail"} + + external_app_src_dst = { + 'app_id': {'context_id': {'context_uuid': {'uuid': DEFAULT_CONTEXT_NAME}}, 'app_uuid': {'uuid': ''}}, + 'app_status': 'QKDAPPSTATUS_' + app['app_status'], + 'app_type': QKDAppTypesEnum.QKDAPPTYPES_CLIENT, + 'server_app_id': app['server_app_id'], + 'client_app_id': app['client_app_id'], + 'backing_qkdl_id': [{'qkdl_uuid': {'uuid': qkdl_id}} for qkdl_id in app['backing_qkdl_id']], + 'local_device_id': local_device.device_id, + 'remote_device_id': {'device_uuid': {'uuid': ''}}, + } + + self.qkd_app_client.RegisterApp(App(**external_app_src_dst)) + + return {"status": "success"} + diff --git a/src/nbi/service/rest_server/nbi_plugins/qkd_app/__init__.py b/src/nbi/service/rest_server/nbi_plugins/qkd_app/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..30982f104e189eb4af5b3f49b1abe2b0e5fb2d85 --- /dev/null +++ b/src/nbi/service/rest_server/nbi_plugins/qkd_app/__init__.py @@ -0,0 +1,29 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from nbi.service.rest_server.RestServer import RestServer +from .Resources import CreateQKDApp, Index + +URL_PREFIX = '/qkd_app' + +# Use 'path' type since some identifiers might contain char '/' and Flask is unable to recognize them in 'string' type. +RESOURCES = [ + # (endpoint_name, resource_class, resource_url) + ('api.index', Index, '/'), + ('api.register_qkd_app', CreateQKDApp, '/create_qkd_app'), +] + +def register_qkd_app(rest_server : RestServer): + for endpoint_name, resource_class, resource_url in RESOURCES: + rest_server.add_resource(resource_class, URL_PREFIX + resource_url, endpoint=endpoint_name) diff --git a/src/nbi/tests/test_ietf_network.py b/src/nbi/tests/test_ietf_network.py index 9a25e1b3b5e0ee202a0af945e88794f8aa9b0ec4..ec03d3798ded3efd027a0b8237becc865441fc98 100644 --- a/src/nbi/tests/test_ietf_network.py +++ b/src/nbi/tests/test_ietf_network.py @@ -12,14 +12,20 @@ # See the License for the specific language governing permissions and # limitations under the License. -import deepdiff, json, logging, operator +import deepdiff, json, logging, operator, os from typing import Dict from common.Constants import DEFAULT_CONTEXT_NAME from common.proto.context_pb2 import ContextId -from common.tools.descriptor.Loader import DescriptorLoader, check_descriptor_load_results, validate_empty_scenario +from common.tools.descriptor.Loader import ( + DescriptorLoader, check_descriptor_load_results, validate_empty_scenario +) from common.tools.object_factory.Context import json_context_id from context.client.ContextClient import ContextClient from nbi.service.rest_server import RestServer + +# Explicitly state NBI to use PyangBind Renderer for this test +os.environ['IETF_NETWORK_RENDERER'] = 'PYANGBIND' + from .PrepareTestScenario import ( # pylint: disable=unused-import # be careful, order of symbols is important here! do_rest_get_request, mock_service, nbi_service_rest, osm_wim, context_client diff --git a/src/pathcomp/frontend/Config.py b/src/pathcomp/frontend/Config.py index 08de81b47dd05ce19ac8335b5b31df8ef4ee461e..ab431acb92ac3732ff98bf7228d825c92d279986 100644 --- a/src/pathcomp/frontend/Config.py +++ b/src/pathcomp/frontend/Config.py @@ -13,7 +13,7 @@ # limitations under the License. import os -from common.Settings import get_setting +from common.Settings import get_setting, is_deployed_forecaster DEFAULT_PATHCOMP_BACKEND_SCHEME = 'http' DEFAULT_PATHCOMP_BACKEND_HOST = '127.0.0.1' @@ -44,6 +44,7 @@ SETTING_NAME_ENABLE_FORECASTER = 'ENABLE_FORECASTER' TRUE_VALUES = {'Y', 'YES', 'TRUE', 'T', 'E', 'ENABLE', 'ENABLED'} def is_forecaster_enabled() -> bool: + if not is_deployed_forecaster(): return False is_enabled = get_setting(SETTING_NAME_ENABLE_FORECASTER, default=None) if is_enabled is None: return False str_is_enabled = str(is_enabled).upper() diff --git a/src/policy/pom.xml b/src/policy/pom.xml index 79294fba4020c091ee5234649c788d2ea7e88b56..b322110bf3944fe7df3d7f1c932177a1d28cc631 100644 --- a/src/policy/pom.xml +++ b/src/policy/pom.xml @@ -54,7 +54,7 @@ <maven-resources-plugin.version>3.2.0</maven-resources-plugin.version> <maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version> <sonarsource-scanner-plugin.version>3.8.0.2131</sonarsource-scanner-plugin.version> - <spotless-plugin.version>2.10.3</spotless-plugin.version> + <spotless-plugin.version>2.43.0</spotless-plugin.version> <versions-maven-plugin.version>2.8.1</versions-maven-plugin.version> <quarkus-maven-plugin.version>3.1.3.Final</quarkus-maven-plugin.version> <quarkus-bootstrap-maven-version>2.16.12.Final</quarkus-bootstrap-maven-version> @@ -136,6 +136,11 @@ <artifactId>quarkus-resteasy-reactive</artifactId> </dependency> + <dependency> + <groupId>io.quarkus</groupId> + <artifactId>quarkus-smallrye-reactive-messaging-kafka</artifactId> + </dependency> + <dependency> <groupId>io.quarkus</groupId> <artifactId>quarkus-arc</artifactId> @@ -425,7 +430,7 @@ </toggleOffOn> <googleJavaFormat> - <version>1.10.0</version> + <version>1.15.0</version> <style>GOOGLE</style> </googleJavaFormat> diff --git a/src/policy/src/main/docker/Dockerfile.multistage.jvm b/src/policy/src/main/docker/Dockerfile.multistage.jvm index 9f07d861c2d5b2563c078b9895b470b32984351f..4b240d657559bde36ee98f51ef92ce8984333701 100644 --- a/src/policy/src/main/docker/Dockerfile.multistage.jvm +++ b/src/policy/src/main/docker/Dockerfile.multistage.jvm @@ -37,6 +37,7 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal:8.4 AS release ARG JAVA_PACKAGE=java-11-openjdk-headless ARG RUN_JAVA_VERSION=1.3.8 ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' + # Install java and the run-java script # Also set up permissions for user `1001` RUN microdnf install curl ca-certificates ${JAVA_PACKAGE} \ diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/Serializer.java b/src/policy/src/main/java/org/etsi/tfs/policy/Serializer.java index 654e7b6ce1d68f6facaec8c772e16dde68e710f0..dfc93e9830993154bd90812632128b8dae788e39 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/Serializer.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/Serializer.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/SimpleLivenessCheck.java b/src/policy/src/main/java/org/etsi/tfs/policy/SimpleLivenessCheck.java index 31f5584ef475f4ec06d295c423480ecb3df3ef3d..b34f328f4830bc8e7fc9647ee3a0799612c949c4 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/SimpleLivenessCheck.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/SimpleLivenessCheck.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/SimpleReadinessCheck.java b/src/policy/src/main/java/org/etsi/tfs/policy/SimpleReadinessCheck.java index 83968b386836bbbe7e67b756077edd69ecada16b..000cf9d478d47f00711c7ffd3eff1fa8b84d3bc0 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/SimpleReadinessCheck.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/SimpleReadinessCheck.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclAction.java b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclAction.java index 7d46f1d41dfa2a265501767a233fa8d7bdbb57f4..57baa1941d904f57b476a69643fe2f10ae15403e 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclAction.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclAction.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.acl; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclEntry.java b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclEntry.java index a9d6e1fc8f7caac1e7e1f95d6a8228530cbf62d5..8e257153e92e473176dc352c7ac4412503a98d5d 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclEntry.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclEntry.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.acl; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclForwardActionEnum.java b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclForwardActionEnum.java index d6c5654a54c258d69690b779657fd130dce31857..5cc2012612f342cb317b5e938b3e28b3fbf8ac0a 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclForwardActionEnum.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclForwardActionEnum.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.acl; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclLogActionEnum.java b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclLogActionEnum.java index 135ff4336b499970f0b5a322787df775c170ab4e..3ee5b1e562157bddb8465caab03289c6b52fcf20 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclLogActionEnum.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclLogActionEnum.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.acl; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclMatch.java b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclMatch.java index 6115f2d2f01d295f5cf3dc113e21661ec37aa57f..953241e5c1896a557a9c690ba05aa7f413f25aa1 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclMatch.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclMatch.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.acl; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclRuleSet.java b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclRuleSet.java index e01c325fd8974854e0ea3d07c179618778e1f7fb..ee781cdd3c1ac02a5ca04a18858105dca1cfd03b 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclRuleSet.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclRuleSet.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.acl; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclRuleTypeEnum.java b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclRuleTypeEnum.java index 2b6779f3ebc3e0563c99e3cea47d4c8de2b05f17..5e7c89e1ac65bf90217b4ce608d97970c33aac4f 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclRuleTypeEnum.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/acl/AclRuleTypeEnum.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.acl; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/common/ApplicationProperties.java b/src/policy/src/main/java/org/etsi/tfs/policy/common/ApplicationProperties.java index 4b890485e854feaf093cb51141c2ed352c33cbd4..65a0a341906bb8dc1c15d1615947e0f9846d4ac9 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/common/ApplicationProperties.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/common/ApplicationProperties.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.common; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/common/Util.java b/src/policy/src/main/java/org/etsi/tfs/policy/common/Util.java index a3e5a318cc54323cabdd02626d157b95bb8ef480..27cb44916121358a017a61618429dc41b7d23d90 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/common/Util.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/common/Util.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.common; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextGateway.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextGateway.java index 126bad6115e79ae0befbfb3e4793931b8f26eecf..bbf5e79a60e92b6b6b11f689bab4549d60f53c81 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextGateway.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextGateway.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextGatewayImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextGatewayImpl.java index 2484a586ec62e96c0621ab320cc8cbca59200d59..760d5e423b4f7cbf0ea7801e6ca04b5b24da2e31 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextGatewayImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextGatewayImpl.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextService.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextService.java index 2d68d0c5e365d20672716e85f88f15f10419115c..643c2066edc5a005193a8ad46de840e823b2945f 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextService.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextService.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextServiceImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextServiceImpl.java index c48feed649071c0627a06adc3d5e56d7e3f7273a..dacd5c6ae000a6e23746a573ba6ce2c64f7912b0 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextServiceImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/ContextServiceImpl.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigActionEnum.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigActionEnum.java index 83c90851641e3333d57a475f4370d993e07a065d..6c9ed3b5ca3afcc73b61ba61b58bc56c38c0df51 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigActionEnum.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigActionEnum.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRule.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRule.java index 4d9c366b5c6ed602d06d15525563d496280ebe9b..d121c13a5f646ff4c63070742ab9c620ddbd0925 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRule.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRule.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleAcl.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleAcl.java index bb0d4ebc9b809579a765aab61a7f3dfba30f3093..ef89bf9f2dcc2aa31908d8831845f749ea1d4c45 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleAcl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleAcl.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleCustom.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleCustom.java index 2b7dc0eb58de0a534f355c3eafa87f4443933486..60e6f9a65e24d5777cb4847e79d0c584eece5911 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleCustom.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleCustom.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleType.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleType.java index 75542af1226ba40d5520ea88399b65faf60ba9ec..39319d8cafb3427019eeb413dd27eb6f157ac8bf 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleType.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleType.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleTypeAcl.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleTypeAcl.java index 8ac855e36c20b5b74e18162da7c28e7422f79566..6291b613121a040af56ba1085063cf859a875249 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleTypeAcl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleTypeAcl.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleTypeCustom.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleTypeCustom.java index 40e0992f24f0f760459d1ba5b6fa7f1b2b6a1106..9f2b7c6069bb242bbe04b72527f8168a4c11fcca 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleTypeCustom.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConfigRuleTypeCustom.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Constraint.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Constraint.java index 954360ad5b4e056e566693c8925049b58b5975e0..c692742185fe4db0050ba780e74b781d34e29774 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Constraint.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Constraint.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintCustom.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintCustom.java index 9708090e19e5db8c06af8db8c63a475b6d92ff88..9c1197fab39287bc43ced87046fb1a2aff73ab0b 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintCustom.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintCustom.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintEndPointLocation.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintEndPointLocation.java index 3554cbafc2567e8835253d8a6798e46c80b6f446..5fa1e652ada813ba04785d9536f647f2b1a82b33 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintEndPointLocation.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintEndPointLocation.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSchedule.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSchedule.java index c17aade1596c7dc4b65ca55f23845fe194a77fc2..9bcae65e91395f5e91a0a802d8c9b1d0eba6590a 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSchedule.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSchedule.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaAvailability.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaAvailability.java index b0d988aae9b1e41dc1f5cb42297ab32df3c86ea0..da4a2ebbd98685a9c701d7c962f9cae68da298d9 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaAvailability.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaAvailability.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaCapacity.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaCapacity.java index 4a1638d5177344f8426126fd4489ae2f7f5c10a7..f3d1dca1814ddd534d0715e4e687bd8606203fd9 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaCapacity.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaCapacity.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaIsolationLevel.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaIsolationLevel.java index f10b95e5ef0e4c3bac1d396954689d84eac339f5..523d339d79e9fc896aef22bfcc0eb81b5ceef5d4 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaIsolationLevel.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaIsolationLevel.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaLatency.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaLatency.java index 04ff65f4fc8c33ab4fb1520ff07cd7d65cbe18c9..b2c92b0dba2c9856ac1efd4d43a252a786cdf4b9 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaLatency.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintSlaLatency.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintType.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintType.java index f302bac299e6c32e1a92eb73a49895585ffca132..7573fac94348e407d9e8341d655370f5f6ba0a3b 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintType.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintType.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeCustom.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeCustom.java index 675b3de188c76ce30523c27f99ca373dee3c6966..9199329f1e4b4d6b108880622ce243a665989477 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeCustom.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeCustom.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeEndPointLocation.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeEndPointLocation.java index 0832153e3c1d5aef9d253bab344e12cb16b5aaef..2bf23dfc42499d6dc97a01294761cafd25015b46 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeEndPointLocation.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeEndPointLocation.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSchedule.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSchedule.java index bead74a143ffaffed6467b2f7d57106134ec3249..6aff606463b23ae2c15f861914daa0cb6d9c6ce8 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSchedule.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSchedule.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaAvailability.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaAvailability.java index 89add927b596134c9c96b9f752e66590ddb4ff44..8e4a8aafb95ae84fc804ce1445e711dc1c19bc44 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaAvailability.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaAvailability.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaCapacity.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaCapacity.java index 08fe4684db7e9581dd250174a5c018095f404ce6..0c18eba23602b64e2e54db42e1e78b6e2d89d411 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaCapacity.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaCapacity.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaIsolationLevel.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaIsolationLevel.java index d60bf5e432fc5d7c116baf16a88d8ea3c0d5c37d..fe1d48a210121177975c1b2984394a9646c79a6d 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaIsolationLevel.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaIsolationLevel.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaLatency.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaLatency.java index 0ff1fb71f2d788dc5965f35d61b8f72fc47c9181..a7f6987470f2ca69fec9a41ed92f2682570136da 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaLatency.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ConstraintTypeSlaLatency.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Device.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Device.java index 20bdf807acffc80254afb7c952ea7f3c59f8d6f1..25021f9fdb90085ba570f614a6f0cd94282731d9 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Device.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Device.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceConfig.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceConfig.java index 08af313a362cf683a41cb8468e55fd684288c164..f7699d282b4ea25e9d53ac5fa9ea1b377be98780 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceConfig.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceConfig.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceDriverEnum.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceDriverEnum.java index 3273725afd41e3552bf71e3e0b1ee6c347512c6e..18e329daa27e41941506788e1e9d25aee62cd193 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceDriverEnum.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceDriverEnum.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceOperationalStatus.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceOperationalStatus.java index 60373f0bd3c7e8bdb525f0892e84a0f57d21c226..7e90851468ddb81e81a9f030d94483179cd8bf16 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceOperationalStatus.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/DeviceOperationalStatus.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Empty.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Empty.java index d1fd4b17a85f3081c11ad091d9d269171322c1e6..bd4471ff1df742f73e20f22aa1f4b4b556546f95 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Empty.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Empty.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/EndPoint.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/EndPoint.java index cf3ada8aadd9b3295ffb472165bc61478a44005d..83c6ab452ab29d03c8212f30ca5e98bdff3b2dd2 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/EndPoint.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/EndPoint.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/EndPointId.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/EndPointId.java index 674e1446bb22e15670722de18efeb784bc3a961b..a57c629263f6d63661a0cfff7b523d969a01c1ff 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/EndPointId.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/EndPointId.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Event.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Event.java index e1f649e00f37d110159256953fe3fb837d47b7b2..193634b2aea0f695890bc260ce32edbdac46658f 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Event.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Event.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/EventTypeEnum.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/EventTypeEnum.java index c613eefc59aaee553db9baa6b4eea5081ec64668..d2392f781e28a47bc32e5566274d8266d9c063d8 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/EventTypeEnum.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/EventTypeEnum.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/GpsPosition.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/GpsPosition.java index 58bc1647e700dbf27c505240dab28fffea368d1c..18c296bf4f00e17ddd18f9bd2490b8e5b9bf44f7 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/GpsPosition.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/GpsPosition.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/IsolationLevelEnum.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/IsolationLevelEnum.java index bf44270eb5d790fdc2398f66e6d58dbf91684985..e447b1adb8027743f0462288d54f73c8b758a741 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/IsolationLevelEnum.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/IsolationLevelEnum.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Location.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Location.java index c5a0dd22d244ddca76b591dd9b9828f12a68fb12..cef38e26b466a1f7d368e605ed22d83669a4ea84 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Location.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Location.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/LocationType.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/LocationType.java index 1c12ece116d921fcc09004864fe92d44a27f2eac..d42666fe528efe2e45dc3d5d946d975d637bb4f7 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/LocationType.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/LocationType.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/LocationTypeGpsPosition.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/LocationTypeGpsPosition.java index 0dbcc315a1af976a7e41163f6ef07f7c03c0358f..1486b54e61603b5da4345a5a2b44c96ddfcbd0f7 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/LocationTypeGpsPosition.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/LocationTypeGpsPosition.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/LocationTypeRegion.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/LocationTypeRegion.java index b7796fb53d6c75ad8caeda114ca8458a000f3b63..982ff994d5487b0a870c3732d618ade1547e2e57 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/LocationTypeRegion.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/LocationTypeRegion.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Service.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Service.java index 0c964b7da7160bbe4beb9d0ba326fc7e4036f931..6bf8f075950880bf52b95f75faae74abc05df9a1 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Service.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/Service.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceConfig.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceConfig.java index 3b9dac9a967b6fbf3ff0bee42c91ba21fd01b904..ef07c126e2a4d642a61374d4aae2a856f352e452 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceConfig.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceConfig.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceId.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceId.java index f9d99c58530758ae087685f4bda6e3298075cc99..83583e1406847302aa718b2229901bc3b3cb9469 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceId.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceId.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceStatus.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceStatus.java index 72766be4232ca1b1a03b74eaaa6ce885187cec87..d18e0b6f9426ebc04f3487c312b3abe1aac1b442 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceStatus.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceStatus.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceStatusEnum.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceStatusEnum.java index 69688ab44a85932e8f1058b1bb0ff4fcd29a6ed0..737466203b12a8a7feef28e71cb2457bf641a9a1 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceStatusEnum.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceStatusEnum.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceTypeEnum.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceTypeEnum.java index 6df2f302c968dc8ebcb9525364b377f79f6db240..ef20e894c8b8dae35fa617e77d8f25860dda51a9 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceTypeEnum.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/ServiceTypeEnum.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/SliceId.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/SliceId.java index db2d04be58b61b69806ce32a9fd1f0c6e36e4d2a..f10caeac3c3244b9cc6725c70efa8acae05091e8 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/SliceId.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/SliceId.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/TopologyId.java b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/TopologyId.java index 34d0ba06a9ad4f210c7039d2d23dcd6e1b39956b..95075acddc48d637bfda4a139be7e2056f6f44db 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/context/model/TopologyId.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/context/model/TopologyId.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.context.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceGateway.java b/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceGateway.java index a3dc71113a60db4b8b0af14ccc09ee50a6a45d47..9b2774297dd0eca35e0b0c6bbc30405cc9188ad8 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceGateway.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceGateway.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.device; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceGatewayImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceGatewayImpl.java index 9bd63ee07e5d985d3e50b734521defa883194403..a5bbcdd97b96311db53df62373c8f783a9325af8 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceGatewayImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceGatewayImpl.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.device; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceService.java b/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceService.java index dfba5ee76ac334051bb38963d51d87c345e05a30..561650f7320c3de239c7730c85e3012e1a60ca02 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceService.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceService.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.device; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceServiceImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceServiceImpl.java index 041631ce03ba99b0ba828d0547328708e6750949..c9fac12d749eadba46921f7560bade9424bbf222 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceServiceImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/device/DeviceServiceImpl.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.device; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/exception/ExternalServiceFailureException.java b/src/policy/src/main/java/org/etsi/tfs/policy/exception/ExternalServiceFailureException.java index 8a070ce8947e5d0fb21ad54f72a6261c696d1fc9..20eaef68079374218779a7178fa7eae53b5afab1 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/exception/ExternalServiceFailureException.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/exception/ExternalServiceFailureException.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.exception; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/exception/GeneralExceptionHandler.java b/src/policy/src/main/java/org/etsi/tfs/policy/exception/GeneralExceptionHandler.java index 4e591aed9a99ff208b6704946c580e5478fb82d8..7ccb35f311737c3a9e5fb4574c5868bc64330337 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/exception/GeneralExceptionHandler.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/exception/GeneralExceptionHandler.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.exception; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/kpi_sample_types/model/KpiSampleType.java b/src/policy/src/main/java/org/etsi/tfs/policy/kpi_sample_types/model/KpiSampleType.java index 2c0e559a89402804bcc03975aed25258872dfd7a..4d457a0c3893f14b0a8a2cf7ecd193006053e0c9 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/kpi_sample_types/model/KpiSampleType.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/kpi_sample_types/model/KpiSampleType.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.kpi_sample_types.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringGateway.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringGateway.java index 29f535eee5f83b0e79496e134e75af9a48278763..2c169009e7954338706524c82f8798f60e453513 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringGateway.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringGateway.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.monitoring; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringGatewayImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringGatewayImpl.java index 08026dae7cefc0a4fe21d37c1fc36f80420a908a..13ebaef2be98212cfb3eb1ed5780b7591f85eb68 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringGatewayImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringGatewayImpl.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.monitoring; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringService.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringService.java index 091f6b795e5a96812f7e5e1d7d10a54e6f2a9fcf..bf8d00cdb4018de51abe19a11567a42c606b84b7 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringService.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringService.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.monitoring; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringServiceImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringServiceImpl.java index 825758534d4fc37d711dbacfc3df2c6b636ef6f5..ba8736eb12b2fed89648a8b6cc32ff50f988b355 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringServiceImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/MonitoringServiceImpl.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.monitoring; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/AlarmDescriptor.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/AlarmDescriptor.java index 707537f3254ec8dd3e9e9f42b64baf52e584e416..297afe21ede48ad7ff0f11f8b29384c8f6a0c14f 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/AlarmDescriptor.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/AlarmDescriptor.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.monitoring.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/AlarmResponse.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/AlarmResponse.java index 408d1c833a903d9730b0ce17371b74a9582e86f2..429fd98f94aea45f27ea0b7680064b2e3a8ff1d4 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/AlarmResponse.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/AlarmResponse.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.monitoring.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/AlarmSubscription.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/AlarmSubscription.java index b50093870d7aefca58750e4edfe32c625de22495..a3c07ca8e752e295015ef2fe15ccc4b805e2438d 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/AlarmSubscription.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/AlarmSubscription.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.monitoring.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/BooleanKpiValue.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/BooleanKpiValue.java index 75adc4c769e8395c7e69404abb8456fbddf51447..e2f8463faa3afef31860a734e8275ae03f7358b3 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/BooleanKpiValue.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/BooleanKpiValue.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.monitoring.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/FloatKpiValue.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/FloatKpiValue.java index 57fdcef3c1379d2aeb1782744eb3d2d39c0f240d..9fc2e27a52750cd125a8b044f01e0498479e1cb1 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/FloatKpiValue.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/FloatKpiValue.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.monitoring.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/IntegerKpiValue.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/IntegerKpiValue.java index 19172a3819295b318ac0900cb47bec0761df4d1b..4b87d8a2c7a9e2af4cc26a1d1f0b5748809bfce4 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/IntegerKpiValue.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/IntegerKpiValue.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.monitoring.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/Kpi.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/Kpi.java index 10cfa3e1bbf846daf4c91d96c74fd5a2a49d5fbc..1485b9256726fa51d4d1622170c24d925219ea62 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/Kpi.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/Kpi.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.monitoring.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/KpiDescriptor.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/KpiDescriptor.java index c62c3926ccfd7d9fcb3bcc9a31a108c8830a0782..675c7d6a64dbe16c189134668474dcd9922ffda6 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/KpiDescriptor.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/KpiDescriptor.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.monitoring.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/KpiValue.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/KpiValue.java index 3a9d7d21409a032beedc11fd41c5d4a41de9a74c..4bd59af0592dd92b5b29d50114f53600c4bd79f5 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/KpiValue.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/KpiValue.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.monitoring.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/KpiValueRange.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/KpiValueRange.java index a7de600ce84dab44795337709b93997f4c0365e4..706244aae0ba25784a25e9aa4622a6c239d02121 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/KpiValueRange.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/KpiValueRange.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.monitoring.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/LongKpiValue.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/LongKpiValue.java index 4777a62d6fb9a52bfbe3c4df4f2bbb951970834a..c90adce90b729a54746965244d7c14dff3981660 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/LongKpiValue.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/LongKpiValue.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.monitoring.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/MonitorKpiRequest.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/MonitorKpiRequest.java index 6311118ca2cf6044a02eb108ee26b7d61e6feb6d..1aa2d3e2197d53bcdf0062addcb8e251bb6f9619 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/MonitorKpiRequest.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/MonitorKpiRequest.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.monitoring.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/StringKpiValue.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/StringKpiValue.java index 7d26911d481e72a16b6f15be6e4428ddda66ebb6..91b52576cf11cefc7abd059545d363bbff9358c5 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/StringKpiValue.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/StringKpiValue.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.monitoring.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/SubsDescriptor.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/SubsDescriptor.java index 247043f02fc035f4a34951877de44b7abcb035a6..9e8400d4684f475cd7a7fc4fcf546e0b0a457f6d 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/SubsDescriptor.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/SubsDescriptor.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.monitoring.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/SubsResponse.java b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/SubsResponse.java index 832d9278bbac0e6e0eefba131f637b1f42ccefac..be072120711536c437c764a0f74e4010151909e8 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/SubsResponse.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/monitoring/model/SubsResponse.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.monitoring.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/AddPolicyDeviceImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/AddPolicyDeviceImpl.java index 05109df421a085eeeb65b4e2de1bf4534f5e6332..08529a63aa09c582ca5b9b47d901ea8644814bdd 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/AddPolicyDeviceImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/AddPolicyDeviceImpl.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.policy; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/AddPolicyServiceImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/AddPolicyServiceImpl.java index 77aa96d2652768382c1312393cb5be7cc22ac5ae..db9bb35d257c53b6254c2cd951f132970e2ab80d 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/AddPolicyServiceImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/AddPolicyServiceImpl.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.policy; @@ -22,13 +22,10 @@ import static org.etsi.tfs.policy.common.ApplicationProperties.VALIDATED_POLICYR import io.smallrye.mutiny.Uni; import jakarta.enterprise.context.ApplicationScoped; import jakarta.inject.Inject; -import java.util.List; import org.etsi.tfs.policy.context.ContextService; import org.etsi.tfs.policy.context.model.ServiceId; import org.etsi.tfs.policy.exception.ExternalServiceFailureException; -import org.etsi.tfs.policy.monitoring.model.AlarmDescriptor; import org.etsi.tfs.policy.policy.model.PolicyRule; -import org.etsi.tfs.policy.policy.model.PolicyRuleBasic; import org.etsi.tfs.policy.policy.model.PolicyRuleService; import org.etsi.tfs.policy.policy.model.PolicyRuleState; import org.etsi.tfs.policy.policy.model.PolicyRuleStateEnum; @@ -38,14 +35,10 @@ import org.etsi.tfs.policy.policy.model.PolicyRuleTypeService; public class AddPolicyServiceImpl { @Inject private CommonPolicyServiceImpl commonPolicyService; - @Inject private CommonAlarmService commonAlarmService; @Inject private ContextService contextService; public Uni<PolicyRuleState> constructPolicyStateBasedOnCriteria( - Boolean isService, - ServiceId serviceId, - PolicyRuleService policyRuleService, - PolicyRuleBasic policyRuleBasic) { + Boolean isService, ServiceId serviceId, PolicyRuleService policyRuleService) { if (!isService) { var policyRuleState = @@ -57,36 +50,20 @@ public class AddPolicyServiceImpl { final var policyRuleTypeService = new PolicyRuleTypeService(policyRuleService); final var policyRule = new PolicyRule(policyRuleTypeService); - final var alarmDescriptorList = commonPolicyService.createAlarmDescriptorList(policyRule); - if (alarmDescriptorList.isEmpty()) { - var policyRuleState = - new PolicyRuleState( - PolicyRuleStateEnum.POLICY_FAILED, - String.format( - "Invalid PolicyRuleConditions in PolicyRule with ID: %s", - policyRuleBasic.getPolicyRuleId())); - return Uni.createFrom().item(policyRuleState); - } + final String kpiId = + policyRuleService.getPolicyRuleBasic().getPolicyRuleConditions().get(0).getKpiId(); + commonPolicyService.getKpiPolicyRuleServiceMap().put(kpiId, policyRuleService); - return setPolicyRuleOnContextAndReturnState(policyRule, policyRuleService, alarmDescriptorList); + return setPolicyRuleOnContextAndReturnState(policyRule); } - private Uni<PolicyRuleState> setPolicyRuleOnContextAndReturnState( - PolicyRule policyRule, - PolicyRuleService policyRuleService, - List<AlarmDescriptor> alarmDescriptorList) { + private Uni<PolicyRuleState> setPolicyRuleOnContextAndReturnState(PolicyRule policyRule) { return contextService .setPolicyRule(policyRule) .onFailure() .transform(failure -> new ExternalServiceFailureException(failure.getMessage())) .onItem() - .transform( - policyId -> { - commonAlarmService.startMonitoringBasedOnAlarmDescriptors( - policyId, policyRuleService, alarmDescriptorList); - - return VALIDATED_POLICYRULE_STATE; - }); + .transform(policyId -> VALIDATED_POLICYRULE_STATE); } } diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/CommonAlarmService.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/CommonAlarmService.java index 9db561204b4e41e7429d12e663ae6dc321140ab1..9f6a7101fd6066978ed5f1ca05af98a9ecdcc712 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/CommonAlarmService.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/CommonAlarmService.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.policy; @@ -99,12 +99,12 @@ public class CommonAlarmService { } /** - * Transform the alarmIds into promised alarms returned from the getAlarmResponseStream - * - * @param alarmIds the list of alarm ids - * @param policyRuleService the policy rule service - * @return - */ + * Transform the alarmIds into promised alarms returned from the getAlarmResponseStream + * + * @param alarmIds the list of alarm ids + * @param policyRuleService the policy rule service + * @return + */ private List<Multi<AlarmResponse>> transformAlarmIds( List<Uni<String>> alarmIds, PolicyRuleService policyRuleService) { List<Multi<AlarmResponse>> alarmResponseStreamList = new ArrayList<>(); @@ -146,11 +146,11 @@ public class CommonAlarmService { } /** - * Create an alarmIds list that contains the promised ids returned from setKpiAlarm - * - * @param alarmDescriptorList the list of alarm descriptors - * @return the list of alarm descriptors - */ + * Create an alarmIds list that contains the promised ids returned from setKpiAlarm + * + * @param alarmDescriptorList the list of alarm descriptors + * @return the list of alarm descriptors + */ public List<Uni<String>> createAlarmList(List<AlarmDescriptor> alarmDescriptorList) { List<Uni<String>> alarmIds = new ArrayList<Uni<String>>(); for (AlarmDescriptor alarmDescriptor : alarmDescriptorList) { diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/CommonPolicyServiceImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/CommonPolicyServiceImpl.java index f4d1f84a253a0f63f45ee3c2974668878037c293..b3c8d3568ecc0727fa4710aff6ad80f583e70600 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/CommonPolicyServiceImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/CommonPolicyServiceImpl.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.policy; @@ -77,7 +77,8 @@ public class CommonPolicyServiceImpl { // TODO: Find a better way to disregard alarms while reconfiguring path // Temporary solution for not calling the same rpc more than it's needed public static int noAlarms = 0; - + private ConcurrentHashMap<String, PolicyRuleService> kpiPolicyRuleServiceMap = + new ConcurrentHashMap<>(); private ConcurrentHashMap<String, PolicyRuleService> alarmPolicyRuleServiceMap = new ConcurrentHashMap<>(); private ConcurrentHashMap<String, PolicyRuleDevice> alarmPolicyRuleDeviceMap = @@ -89,6 +90,10 @@ public class CommonPolicyServiceImpl { return subscriptionList; } + public ConcurrentHashMap<String, PolicyRuleService> getKpiPolicyRuleServiceMap() { + return kpiPolicyRuleServiceMap; + } + public ConcurrentHashMap<String, PolicyRuleService> getAlarmPolicyRuleServiceMap() { return alarmPolicyRuleServiceMap; } @@ -111,6 +116,31 @@ public class CommonPolicyServiceImpl { return Long.valueOf(now).doubleValue(); } + public void applyActionServiceBasedOnKpiId(String kpiId) { + if (!kpiPolicyRuleServiceMap.containsKey(kpiId)) { + LOGGER.info("No Policy for KpiId"); + return; + } + + PolicyRuleService policyRuleService = kpiPolicyRuleServiceMap.get(kpiId); + PolicyRuleAction policyRuleAction = + policyRuleService.getPolicyRuleBasic().getPolicyRuleActions().get(0); + + setPolicyRuleServiceToContext(policyRuleService, ACTIVE_POLICYRULE_STATE); + + switch (policyRuleAction.getPolicyRuleActionEnum()) { + case POLICY_RULE_ACTION_ADD_SERVICE_CONSTRAINT: + addServiceConstraint(policyRuleService, policyRuleAction); + case POLICY_RULE_ACTION_ADD_SERVICE_CONFIGRULE: + addServiceConfigRule(policyRuleService, policyRuleAction); + case POLICY_RULE_ACTION_RECALCULATE_PATH: + callRecalculatePathRPC(policyRuleService, policyRuleAction); + default: + LOGGER.errorf(INVALID_MESSAGE, policyRuleAction.getPolicyRuleActionEnum()); + return; + } + } + public void applyActionService(String alarmId) { PolicyRuleService policyRuleService = alarmPolicyRuleServiceMap.get(alarmId); PolicyRuleAction policyRuleAction = diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyGateway.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyGateway.java index db01eb9df714023fd11e71beb32904a9fa0272ec..58e8f0c92c1d91f7cbf369d7d1275fd18168411c 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyGateway.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyGateway.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.policy; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyGatewayImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyGatewayImpl.java index d8ba0ca8d158858dd512b40bd0e97937edca9cd2..dd454b48bdb1365407df099d2201d2b727dd3ce7 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyGatewayImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyGatewayImpl.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.policy; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyService.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyService.java index 22cb203abea8899297b3aadf53c162fda252ed37..f9063cccaa975f8ca451738940738945ca2898bc 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyService.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyService.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.policy; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyServiceImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyServiceImpl.java index f2cc6f99a68351fba1a93af0880bc61eace74cbb..c2476e11b5b370c499c4bd8af725e4d71361fd9a 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyServiceImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/PolicyServiceImpl.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.policy; @@ -90,7 +90,7 @@ public class PolicyServiceImpl implements PolicyService { .transform( isService -> addPolicyServiceImpl.constructPolicyStateBasedOnCriteria( - isService, serviceId, policyRuleService, policyRuleBasic)) + isService, serviceId, policyRuleService)) .flatMap(Function.identity()); } diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/kafka/AlarmListener.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/kafka/AlarmListener.java new file mode 100644 index 0000000000000000000000000000000000000000..81cd6df4d9699f1ce5c7fda8956d336bec7a7c13 --- /dev/null +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/kafka/AlarmListener.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.etsi.tfs.policy.policy.kafka; + +import io.smallrye.reactive.messaging.annotations.Blocking; +import jakarta.enterprise.context.ApplicationScoped; +import jakarta.inject.Inject; +import org.eclipse.microprofile.reactive.messaging.Incoming; +import org.etsi.tfs.policy.policy.CommonPolicyServiceImpl; +import org.etsi.tfs.policy.policy.model.AlarmTopicDTO; +import org.jboss.logging.Logger; + +@ApplicationScoped +public class AlarmListener { + private final CommonPolicyServiceImpl commonPolicyServiceImpl; + + private final Logger logger = Logger.getLogger(AlarmListener.class); + public static final String ALARM_TOPIC = "topic_alarms"; + + @Inject + public AlarmListener(CommonPolicyServiceImpl commonPolicyServiceImpl) { + this.commonPolicyServiceImpl = commonPolicyServiceImpl; + } + + @Incoming(ALARM_TOPIC) + @Blocking + public void receiveAlarm(AlarmTopicDTO alarmTopicDto) { + logger.infof("Received message for analytic service backend :\n %s", alarmTopicDto.toString()); + if (alarmTopicDto.isThresholdRaise() || alarmTopicDto.isThresholdFall()) { + logger.infof("**************************Received Alarm!**************************"); + logger.infof( + "Received Alarm for analytic service backend with kpiId: %s", alarmTopicDto.getKpiId()); + commonPolicyServiceImpl.applyActionServiceBasedOnKpiId(alarmTopicDto.getKpiId()); + } + } +} diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/kafka/TopicAlarmDeserializer.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/kafka/TopicAlarmDeserializer.java new file mode 100644 index 0000000000000000000000000000000000000000..5cf476c54aef2c65f98a7d54116d01c36a0aea54 --- /dev/null +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/kafka/TopicAlarmDeserializer.java @@ -0,0 +1,26 @@ +/* + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.etsi.tfs.policy.policy.kafka; + +import io.quarkus.kafka.client.serialization.ObjectMapperDeserializer; +import org.etsi.tfs.policy.policy.model.AlarmTopicDTO; + +public class TopicAlarmDeserializer extends ObjectMapperDeserializer<AlarmTopicDTO> { + public TopicAlarmDeserializer() { + super(AlarmTopicDTO.class); + } +} diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/AlarmTopicDTO.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/AlarmTopicDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..b26d53484d02495391367a5dbc45619ddac9c2e1 --- /dev/null +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/AlarmTopicDTO.java @@ -0,0 +1,38 @@ +/* + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.etsi.tfs.policy.policy.model; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +@Data +public class AlarmTopicDTO { + + @JsonProperty("window_start") + private String windowStart; + + @JsonProperty("THRESHOLD_FALL") + private boolean thresholdFall; + + @JsonProperty("THRESHOLD_RAISE") + private boolean thresholdRaise; + + private String value; + + @JsonProperty("kpi_id") + private String kpiId; +} diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/BooleanOperator.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/BooleanOperator.java index a4f5ef12cd1197e4ba7e18937b12bb6c952e7f91..5c11f863445ecb98e8384ef1cc2d0f7685d87651 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/BooleanOperator.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/BooleanOperator.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.policy.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/NumericalOperator.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/NumericalOperator.java index bcb27cdaf162b0959ffbb68ce2c1737ece04412a..10d2476d33e62b36b7e57fb5487e4f3d22827e8b 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/NumericalOperator.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/NumericalOperator.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.policy.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRule.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRule.java index 423b3a05d1879b91728b469bccc21d4d3cf64fcb..a4d01ce960ea33efc3ab3c9e8f0cac1a0e302a70 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRule.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRule.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.policy.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleAction.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleAction.java index a84ceaf58141815f6bbc24d822985fd2df2001e8..7cb951b907d91ec00aab7b6a3a894ad91d9c0787 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleAction.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleAction.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.policy.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleActionConfig.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleActionConfig.java index 7399a3bfb2bde611a4d0ea99b4d1f9fd742aca84..004ff7bd19ac615d78762c9168c844249fdf4426 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleActionConfig.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleActionConfig.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.policy.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleActionEnum.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleActionEnum.java index 10bd7ec61bf8c839a248a420362bf248bd420e80..3d5e5e9b6a6be96e3bf76f15cc1e7a0ecd1c63d0 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleActionEnum.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleActionEnum.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.policy.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleBase.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleBase.java index d4cf83fc65a6569f12808850788f4caa0238fa47..e1f1fbecac90fd9567969a1379692e8f97de8778 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleBase.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleBase.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.policy.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleBasic.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleBasic.java index 085767bd19539f015de07c7850a29759b12f49d8..6a3b8602caaa8980130971029d19c13a8fe6309d 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleBasic.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleBasic.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.policy.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleCondition.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleCondition.java index f872e9980986dcb5ba8279f1c04a3d41f1a27791..697924f45cb5d8f4b5e67217ebc7d0230018a33f 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleCondition.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleCondition.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.policy.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleDevice.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleDevice.java index 2e7d93951b2b891eeec63c65cf7b6fdf08c2c813..205b3e1330d6e3b8926ceb0b4a73c5801e3af58e 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleDevice.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleDevice.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.policy.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleService.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleService.java index f10d4b58e9d74638c96d497d034b42927d84130e..07f3076e7801b703fe4024a2012c9543071af180 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleService.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleService.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.policy.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleState.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleState.java index 2e96d8d9c760c88d036208d43ba982842b52bb3b..d6ef07990e18606d7c5e4dd71a0492b55f6d64ce 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleState.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleState.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.policy.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleStateEnum.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleStateEnum.java index 95711def2f1f47d40079d21d241c433c9546a19b..b093d15d555df3a46788ba128be4ff9bb1a30977 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleStateEnum.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleStateEnum.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.policy.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleType.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleType.java index 5cb04c05c685b70e70b88f7595246aa49b00237a..24cf2d8961a51deae664087e2d55a482bc5cf7bf 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleType.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleType.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.policy.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleTypeDevice.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleTypeDevice.java index 476bba516df51c12ded9e628f83cf3710bb34c1e..326df220a0b1396bad4eca7d9a7c68751aecc621 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleTypeDevice.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleTypeDevice.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.policy.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleTypeService.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleTypeService.java index 1de46182267e1d8ed0c61be36f2ed638a52042bb..a684218df8e9ff9b1a599ecd351cc766372d67bd 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleTypeService.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/model/PolicyRuleTypeService.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.policy.model; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/service/PolicyRuleConditionFieldsGetter.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/service/PolicyRuleConditionFieldsGetter.java index cf58b9d6c46af9a7710f4daf436ccc62754e8139..c42fc081a71373ef0167421749aa47facd99f2f5 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/service/PolicyRuleConditionFieldsGetter.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/service/PolicyRuleConditionFieldsGetter.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.policy.service; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/policy/service/PolicyRuleConditionValidator.java b/src/policy/src/main/java/org/etsi/tfs/policy/policy/service/PolicyRuleConditionValidator.java index 090579fee16901ad1d427755be9fc330efad8ea7..c1947ae32edfbfd4ca7aa3b560150c63656b32aa 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/policy/service/PolicyRuleConditionValidator.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/policy/service/PolicyRuleConditionValidator.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.policy.service; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceGateway.java b/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceGateway.java index 4e065132fe4805462386d55ffa2a6ee284778644..a4b39ef434b9b9a6f5c1466a386c921d55128e69 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceGateway.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceGateway.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.service; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceGatewayImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceGatewayImpl.java index fbf96534b892a84208ace947b9664a6e0a2833e2..0deb437ff3a9d852ee98a6c021c83e9fa9d7c3c5 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceGatewayImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceGatewayImpl.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.service; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceService.java b/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceService.java index b6b05370f633568f0b294ef6672040431ec871d3..a6a7bf955387f47c7239e87cf45b54946a4bb780 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceService.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceService.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.service; diff --git a/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceServiceImpl.java b/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceServiceImpl.java index 125dd144999661ef1b1fe86787f1e91772a09b8e..93fe9162fb288bd3f075b522db07e4a7f780da3c 100644 --- a/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceServiceImpl.java +++ b/src/policy/src/main/java/org/etsi/tfs/policy/service/ServiceServiceImpl.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy.service; diff --git a/src/policy/src/main/resources/application.yml b/src/policy/src/main/resources/application.yml index c006f5472d5d4fbd062f143988132fa62fa2c8ed..d0fca91427e5d0242db5abcd349ea1cdf9bb5364 100644 --- a/src/policy/src/main/resources/application.yml +++ b/src/policy/src/main/resources/application.yml @@ -63,6 +63,7 @@ quarkus: context-service-host: "contextservice" monitoring-service-host: "monitoringservice" service-service-host: "serviceservice" + kafka-broker-host: "kafka-service.kafka.svc.cluster.local" resources: requests: cpu: 50m @@ -71,3 +72,23 @@ quarkus: cpu: 500m memory: 2048Mi +#Disable Kafka on Test +"%test": + mp: + messaging: + connector: + smallrye-kafka: + enabled: false + +mp: + messaging: + incoming: + topic-alarms: + failure-strategy: ignore + connector: smallrye-kafka + topic: topic-alarms + value: + deserializer: org.etsi.tfs.policy.policy.kafka.TopicAlarmDeserializer +kafka: + bootstrap: + servers: ${quarkus.kubernetes.env.vars.kafka-broker-host}:9092 diff --git a/src/policy/src/test/java/org/etsi/tfs/policy/ConfigRuleTypeTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/ConfigRuleTypeTest.java index 69e63ff4c399a6f8f4a11f38f23800d350b926c3..668a4a5fee2d377e79bb0a97c6f93e922b82ab93 100644 --- a/src/policy/src/test/java/org/etsi/tfs/policy/ConfigRuleTypeTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/ConfigRuleTypeTest.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy; diff --git a/src/policy/src/test/java/org/etsi/tfs/policy/ConstraintTypeTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/ConstraintTypeTest.java index b6271469ace381eb647f083fe8dea3439040f202..0fd999ed491b9c42f3ec88f65029cce3fe4188d1 100644 --- a/src/policy/src/test/java/org/etsi/tfs/policy/ConstraintTypeTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/ConstraintTypeTest.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy; diff --git a/src/policy/src/test/java/org/etsi/tfs/policy/EndPointCreationTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/EndPointCreationTest.java index 6542a593167a0ff1c5ff245d20fcabec564b57e2..6f02ee4bb3485280ae468115f1a8d90120299d4d 100644 --- a/src/policy/src/test/java/org/etsi/tfs/policy/EndPointCreationTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/EndPointCreationTest.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy; diff --git a/src/policy/src/test/java/org/etsi/tfs/policy/LocationTypeTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/LocationTypeTest.java index ed4f5d712197106c5afeca04aa64543823778707..9072d7df0b7e058eac0852c8aafdb3603c9901e8 100644 --- a/src/policy/src/test/java/org/etsi/tfs/policy/LocationTypeTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/LocationTypeTest.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy; diff --git a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyAddDeviceTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyAddDeviceTest.java index 91ed70a1687eacac35e08c28e0da0596e62df1de..03b6dee313c126f13c54a0a761417ab02161c0eb 100644 --- a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyAddDeviceTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyAddDeviceTest.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy; diff --git a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyAddServiceTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyAddServiceTest.java index 398a8b5feea479ce7f70c8fe9dfed189802b1c82..1297ecd2a4b5a482496dc6afd6d988d1951031e6 100644 --- a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyAddServiceTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyAddServiceTest.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy; diff --git a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyDeleteServiceTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyDeleteServiceTest.java index 464ff7fc800ee196459698de39e85a2666b29159..c2acd12f1fb9c24cb24d65b12688210c35022c9b 100644 --- a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyDeleteServiceTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyDeleteServiceTest.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy; diff --git a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyGrpcServiceTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyGrpcServiceTest.java index a179ea710fa72fd63dec6336bd3ee1d4dc0cdb84..1d4bf0ad4ccfac43aeee295f368f6370ea27396d 100644 --- a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyGrpcServiceTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyGrpcServiceTest.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy; diff --git a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleBasicValidationTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleBasicValidationTest.java index 06364ab2fc1bb2b842db8268354f98ddd6b366af..a2f7c5be8a855c56f7dd2b7afb0b3fd5d6e83c3b 100644 --- a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleBasicValidationTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleBasicValidationTest.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy; diff --git a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleConditionValidationTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleConditionValidationTest.java index f442543676934a5866e9b0972adc53e384336b4a..9ff1935e003264667236bbe84735f3df7e7b5d77 100644 --- a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleConditionValidationTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleConditionValidationTest.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy; diff --git a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleDeviceValidationTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleDeviceValidationTest.java index 57e350067fa44da1d59f4a972143b9ed07740ef9..8e40adc607564e600680ef9531e9569bd1cc7822 100644 --- a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleDeviceValidationTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleDeviceValidationTest.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy; diff --git a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleServiceValidationTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleServiceValidationTest.java index e02af1e2aba9c276df6d2ec76d1cb4b8e44a5bd8..895f0ec3be9df5487bb89b1bbeb0ad7e637e0e9a 100644 --- a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleServiceValidationTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyRuleServiceValidationTest.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy; diff --git a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyUpdateDeviceTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyUpdateDeviceTest.java index f549eb0c63bd115e5b94ad2949ced89177ecc58a..f073e1a4e6368aa4f99e1bdb0a47532dfcddfada 100644 --- a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyUpdateDeviceTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyUpdateDeviceTest.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy; diff --git a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyUpdateServiceTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyUpdateServiceTest.java index 4cf62695ac16c63eb5185356d93ed076391b5a4c..d403a7df256858096719c3abd7a7d2a10be1d9af 100644 --- a/src/policy/src/test/java/org/etsi/tfs/policy/PolicyUpdateServiceTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/PolicyUpdateServiceTest.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy; diff --git a/src/policy/src/test/java/org/etsi/tfs/policy/SerializerTest.java b/src/policy/src/test/java/org/etsi/tfs/policy/SerializerTest.java index 9ebbfe762b0857ee314cb690775d01c052328024..911fcbdb9f3b2ab32c3586a8aa71662ec8923ef1 100644 --- a/src/policy/src/test/java/org/etsi/tfs/policy/SerializerTest.java +++ b/src/policy/src/test/java/org/etsi/tfs/policy/SerializerTest.java @@ -1,18 +1,18 @@ /* -* Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ + * Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.etsi.tfs.policy; diff --git a/src/policy/target/generated-sources/grpc/acl/Acl.java b/src/policy/target/generated-sources/grpc/acl/Acl.java index f1895fa7206642f8f8d6b63f5d2635fb68816f89..037bd385819e8b9db0d80186bf4e210d39ea8bed 100644 --- a/src/policy/target/generated-sources/grpc/acl/Acl.java +++ b/src/policy/target/generated-sources/grpc/acl/Acl.java @@ -459,6 +459,18 @@ public final class Acl { * @return The endMplsLabel. */ int getEndMplsLabel(); + + /** + * <code>string tcp_flags = 9;</code> + * @return The tcpFlags. + */ + java.lang.String getTcpFlags(); + + /** + * <code>string tcp_flags = 9;</code> + * @return The bytes for tcpFlags. + */ + com.google.protobuf.ByteString getTcpFlagsBytes(); } /** @@ -477,6 +489,7 @@ public final class Acl { private AclMatch() { srcAddress_ = ""; dstAddress_ = ""; + tcpFlags_ = ""; } @java.lang.Override @@ -485,86 +498,6 @@ public final class Acl { return new AclMatch(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private AclMatch(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 8: - { - dscp_ = input.readUInt32(); - break; - } - case 16: - { - protocol_ = input.readUInt32(); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - srcAddress_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - dstAddress_ = s; - break; - } - case 40: - { - srcPort_ = input.readUInt32(); - break; - } - case 48: - { - dstPort_ = input.readUInt32(); - break; - } - case 56: - { - startMplsLabel_ = input.readUInt32(); - break; - } - case 64: - { - endMplsLabel_ = input.readUInt32(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return acl.Acl.internal_static_acl_AclMatch_descriptor; } @@ -576,7 +509,7 @@ public final class Acl { public static final int DSCP_FIELD_NUMBER = 1; - private int dscp_; + private int dscp_ = 0; /** * <code>uint32 dscp = 1;</code> @@ -589,7 +522,7 @@ public final class Acl { public static final int PROTOCOL_FIELD_NUMBER = 2; - private int protocol_; + private int protocol_ = 0; /** * <code>uint32 protocol = 2;</code> @@ -602,7 +535,8 @@ public final class Acl { public static final int SRC_ADDRESS_FIELD_NUMBER = 3; - private volatile java.lang.Object srcAddress_; + @SuppressWarnings("serial") + private volatile java.lang.Object srcAddress_ = ""; /** * <code>string src_address = 3;</code> @@ -639,7 +573,8 @@ public final class Acl { public static final int DST_ADDRESS_FIELD_NUMBER = 4; - private volatile java.lang.Object dstAddress_; + @SuppressWarnings("serial") + private volatile java.lang.Object dstAddress_ = ""; /** * <code>string dst_address = 4;</code> @@ -676,7 +611,7 @@ public final class Acl { public static final int SRC_PORT_FIELD_NUMBER = 5; - private int srcPort_; + private int srcPort_ = 0; /** * <code>uint32 src_port = 5;</code> @@ -689,7 +624,7 @@ public final class Acl { public static final int DST_PORT_FIELD_NUMBER = 6; - private int dstPort_; + private int dstPort_ = 0; /** * <code>uint32 dst_port = 6;</code> @@ -702,7 +637,7 @@ public final class Acl { public static final int START_MPLS_LABEL_FIELD_NUMBER = 7; - private int startMplsLabel_; + private int startMplsLabel_ = 0; /** * <code>uint32 start_mpls_label = 7;</code> @@ -715,7 +650,7 @@ public final class Acl { public static final int END_MPLS_LABEL_FIELD_NUMBER = 8; - private int endMplsLabel_; + private int endMplsLabel_ = 0; /** * <code>uint32 end_mpls_label = 8;</code> @@ -726,6 +661,44 @@ public final class Acl { return endMplsLabel_; } + public static final int TCP_FLAGS_FIELD_NUMBER = 9; + + @SuppressWarnings("serial") + private volatile java.lang.Object tcpFlags_ = ""; + + /** + * <code>string tcp_flags = 9;</code> + * @return The tcpFlags. + */ + @java.lang.Override + public java.lang.String getTcpFlags() { + java.lang.Object ref = tcpFlags_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tcpFlags_ = s; + return s; + } + } + + /** + * <code>string tcp_flags = 9;</code> + * @return The bytes for tcpFlags. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTcpFlagsBytes() { + java.lang.Object ref = tcpFlags_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tcpFlags_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -747,10 +720,10 @@ public final class Acl { if (protocol_ != 0) { output.writeUInt32(2, protocol_); } - if (!getSrcAddressBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(srcAddress_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, srcAddress_); } - if (!getDstAddressBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dstAddress_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, dstAddress_); } if (srcPort_ != 0) { @@ -765,7 +738,10 @@ public final class Acl { if (endMplsLabel_ != 0) { output.writeUInt32(8, endMplsLabel_); } - unknownFields.writeTo(output); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tcpFlags_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, tcpFlags_); + } + getUnknownFields().writeTo(output); } @java.lang.Override @@ -780,10 +756,10 @@ public final class Acl { if (protocol_ != 0) { size += com.google.protobuf.CodedOutputStream.computeUInt32Size(2, protocol_); } - if (!getSrcAddressBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(srcAddress_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, srcAddress_); } - if (!getDstAddressBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dstAddress_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, dstAddress_); } if (srcPort_ != 0) { @@ -798,7 +774,10 @@ public final class Acl { if (endMplsLabel_ != 0) { size += com.google.protobuf.CodedOutputStream.computeUInt32Size(8, endMplsLabel_); } - size += unknownFields.getSerializedSize(); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tcpFlags_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, tcpFlags_); + } + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -828,7 +807,9 @@ public final class Acl { return false; if (getEndMplsLabel() != other.getEndMplsLabel()) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getTcpFlags().equals(other.getTcpFlags())) + return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -856,7 +837,9 @@ public final class Acl { hash = (53 * hash) + getStartMplsLabel(); hash = (37 * hash) + END_MPLS_LABEL_FIELD_NUMBER; hash = (53 * hash) + getEndMplsLabel(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (37 * hash) + TCP_FLAGS_FIELD_NUMBER; + hash = (53 * hash) + getTcpFlags().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -950,22 +933,16 @@ public final class Acl { // Construct using acl.Acl.AclMatch.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; dscp_ = 0; protocol_ = 0; srcAddress_ = ""; @@ -974,6 +951,7 @@ public final class Acl { dstPort_ = 0; startMplsLabel_ = 0; endMplsLabel_ = 0; + tcpFlags_ = ""; return this; } @@ -999,46 +977,42 @@ public final class Acl { @java.lang.Override public acl.Acl.AclMatch buildPartial() { acl.Acl.AclMatch result = new acl.Acl.AclMatch(this); - result.dscp_ = dscp_; - result.protocol_ = protocol_; - result.srcAddress_ = srcAddress_; - result.dstAddress_ = dstAddress_; - result.srcPort_ = srcPort_; - result.dstPort_ = dstPort_; - result.startMplsLabel_ = startMplsLabel_; - result.endMplsLabel_ = endMplsLabel_; + if (bitField0_ != 0) { + buildPartial0(result); + } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(acl.Acl.AclMatch result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.dscp_ = dscp_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.protocol_ = protocol_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.srcAddress_ = srcAddress_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.dstAddress_ = dstAddress_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.srcPort_ = srcPort_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.dstPort_ = dstPort_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.startMplsLabel_ = startMplsLabel_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.endMplsLabel_ = endMplsLabel_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.tcpFlags_ = tcpFlags_; + } } @java.lang.Override @@ -1062,10 +1036,12 @@ public final class Acl { } if (!other.getSrcAddress().isEmpty()) { srcAddress_ = other.srcAddress_; + bitField0_ |= 0x00000004; onChanged(); } if (!other.getDstAddress().isEmpty()) { dstAddress_ = other.dstAddress_; + bitField0_ |= 0x00000008; onChanged(); } if (other.getSrcPort() != 0) { @@ -1080,7 +1056,12 @@ public final class Acl { if (other.getEndMplsLabel() != 0) { setEndMplsLabel(other.getEndMplsLabel()); } - this.mergeUnknownFields(other.unknownFields); + if (!other.getTcpFlags().isEmpty()) { + tcpFlags_ = other.tcpFlags_; + bitField0_ |= 0x00000100; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1092,20 +1073,103 @@ public final class Acl { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - acl.Acl.AclMatch parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 8: + { + dscp_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } + // case 8 + case 16: + { + protocol_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } + // case 16 + case 26: + { + srcAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } + // case 26 + case 34: + { + dstAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } + // case 34 + case 40: + { + srcPort_ = input.readUInt32(); + bitField0_ |= 0x00000010; + break; + } + // case 40 + case 48: + { + dstPort_ = input.readUInt32(); + bitField0_ |= 0x00000020; + break; + } + // case 48 + case 56: + { + startMplsLabel_ = input.readUInt32(); + bitField0_ |= 0x00000040; + break; + } + // case 56 + case 64: + { + endMplsLabel_ = input.readUInt32(); + bitField0_ |= 0x00000080; + break; + } + // case 64 + case 74: + { + tcpFlags_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } + // case 74 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (acl.Acl.AclMatch) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private int dscp_; /** @@ -1124,6 +1188,7 @@ public final class Acl { */ public Builder setDscp(int value) { dscp_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -1133,6 +1198,7 @@ public final class Acl { * @return This builder for chaining. */ public Builder clearDscp() { + bitField0_ = (bitField0_ & ~0x00000001); dscp_ = 0; onChanged(); return this; @@ -1156,6 +1222,7 @@ public final class Acl { */ public Builder setProtocol(int value) { protocol_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -1165,6 +1232,7 @@ public final class Acl { * @return This builder for chaining. */ public Builder clearProtocol() { + bitField0_ = (bitField0_ & ~0x00000002); protocol_ = 0; onChanged(); return this; @@ -1213,6 +1281,7 @@ public final class Acl { throw new NullPointerException(); } srcAddress_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -1223,6 +1292,7 @@ public final class Acl { */ public Builder clearSrcAddress() { srcAddress_ = getDefaultInstance().getSrcAddress(); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } @@ -1238,6 +1308,7 @@ public final class Acl { } checkByteStringIsUtf8(value); srcAddress_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -1285,6 +1356,7 @@ public final class Acl { throw new NullPointerException(); } dstAddress_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1295,6 +1367,7 @@ public final class Acl { */ public Builder clearDstAddress() { dstAddress_ = getDefaultInstance().getDstAddress(); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } @@ -1310,6 +1383,7 @@ public final class Acl { } checkByteStringIsUtf8(value); dstAddress_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1332,6 +1406,7 @@ public final class Acl { */ public Builder setSrcPort(int value) { srcPort_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1341,6 +1416,7 @@ public final class Acl { * @return This builder for chaining. */ public Builder clearSrcPort() { + bitField0_ = (bitField0_ & ~0x00000010); srcPort_ = 0; onChanged(); return this; @@ -1364,6 +1440,7 @@ public final class Acl { */ public Builder setDstPort(int value) { dstPort_ = value; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -1373,6 +1450,7 @@ public final class Acl { * @return This builder for chaining. */ public Builder clearDstPort() { + bitField0_ = (bitField0_ & ~0x00000020); dstPort_ = 0; onChanged(); return this; @@ -1396,6 +1474,7 @@ public final class Acl { */ public Builder setStartMplsLabel(int value) { startMplsLabel_ = value; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -1405,6 +1484,7 @@ public final class Acl { * @return This builder for chaining. */ public Builder clearStartMplsLabel() { + bitField0_ = (bitField0_ & ~0x00000040); startMplsLabel_ = 0; onChanged(); return this; @@ -1428,6 +1508,7 @@ public final class Acl { */ public Builder setEndMplsLabel(int value) { endMplsLabel_ = value; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -1437,11 +1518,87 @@ public final class Acl { * @return This builder for chaining. */ public Builder clearEndMplsLabel() { + bitField0_ = (bitField0_ & ~0x00000080); endMplsLabel_ = 0; onChanged(); return this; } + private java.lang.Object tcpFlags_ = ""; + + /** + * <code>string tcp_flags = 9;</code> + * @return The tcpFlags. + */ + public java.lang.String getTcpFlags() { + java.lang.Object ref = tcpFlags_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tcpFlags_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + + /** + * <code>string tcp_flags = 9;</code> + * @return The bytes for tcpFlags. + */ + public com.google.protobuf.ByteString getTcpFlagsBytes() { + java.lang.Object ref = tcpFlags_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tcpFlags_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + /** + * <code>string tcp_flags = 9;</code> + * @param value The tcpFlags to set. + * @return This builder for chaining. + */ + public Builder setTcpFlags(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tcpFlags_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + + /** + * <code>string tcp_flags = 9;</code> + * @return This builder for chaining. + */ + public Builder clearTcpFlags() { + tcpFlags_ = getDefaultInstance().getTcpFlags(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + return this; + } + + /** + * <code>string tcp_flags = 9;</code> + * @param value The bytes for tcpFlags to set. + * @return This builder for chaining. + */ + public Builder setTcpFlagsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tcpFlags_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); @@ -1469,7 +1626,17 @@ public final class Acl { @java.lang.Override public AclMatch parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AclMatch(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1540,56 +1707,6 @@ public final class Acl { return new AclAction(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private AclAction(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 8: - { - int rawValue = input.readEnum(); - forwardAction_ = rawValue; - break; - } - case 16: - { - int rawValue = input.readEnum(); - logAction_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return acl.Acl.internal_static_acl_AclAction_descriptor; } @@ -1601,7 +1718,7 @@ public final class Acl { public static final int FORWARD_ACTION_FIELD_NUMBER = 1; - private int forwardAction_; + private int forwardAction_ = 0; /** * <code>.acl.AclForwardActionEnum forward_action = 1;</code> @@ -1618,14 +1735,13 @@ public final class Acl { */ @java.lang.Override public acl.Acl.AclForwardActionEnum getForwardAction() { - @SuppressWarnings("deprecation") - acl.Acl.AclForwardActionEnum result = acl.Acl.AclForwardActionEnum.valueOf(forwardAction_); + acl.Acl.AclForwardActionEnum result = acl.Acl.AclForwardActionEnum.forNumber(forwardAction_); return result == null ? acl.Acl.AclForwardActionEnum.UNRECOGNIZED : result; } public static final int LOG_ACTION_FIELD_NUMBER = 2; - private int logAction_; + private int logAction_ = 0; /** * <code>.acl.AclLogActionEnum log_action = 2;</code> @@ -1642,8 +1758,7 @@ public final class Acl { */ @java.lang.Override public acl.Acl.AclLogActionEnum getLogAction() { - @SuppressWarnings("deprecation") - acl.Acl.AclLogActionEnum result = acl.Acl.AclLogActionEnum.valueOf(logAction_); + acl.Acl.AclLogActionEnum result = acl.Acl.AclLogActionEnum.forNumber(logAction_); return result == null ? acl.Acl.AclLogActionEnum.UNRECOGNIZED : result; } @@ -1668,7 +1783,7 @@ public final class Acl { if (logAction_ != acl.Acl.AclLogActionEnum.ACLLOGACTION_UNDEFINED.getNumber()) { output.writeEnum(2, logAction_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1683,7 +1798,7 @@ public final class Acl { if (logAction_ != acl.Acl.AclLogActionEnum.ACLLOGACTION_UNDEFINED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, logAction_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1701,7 +1816,7 @@ public final class Acl { return false; if (logAction_ != other.logAction_) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1717,7 +1832,7 @@ public final class Acl { hash = (53 * hash) + forwardAction_; hash = (37 * hash) + LOG_ACTION_FIELD_NUMBER; hash = (53 * hash) + logAction_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1811,22 +1926,16 @@ public final class Acl { // Construct using acl.Acl.AclAction.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; forwardAction_ = 0; logAction_ = 0; return this; @@ -1854,40 +1963,21 @@ public final class Acl { @java.lang.Override public acl.Acl.AclAction buildPartial() { acl.Acl.AclAction result = new acl.Acl.AclAction(this); - result.forwardAction_ = forwardAction_; - result.logAction_ = logAction_; + if (bitField0_ != 0) { + buildPartial0(result); + } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(acl.Acl.AclAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.forwardAction_ = forwardAction_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.logAction_ = logAction_; + } } @java.lang.Override @@ -1909,7 +1999,7 @@ public final class Acl { if (other.logAction_ != 0) { setLogActionValue(other.getLogActionValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1921,20 +2011,54 @@ public final class Acl { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - acl.Acl.AclAction parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 8: + { + forwardAction_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } + // case 8 + case 16: + { + logAction_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } + // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (acl.Acl.AclAction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private int forwardAction_ = 0; /** @@ -1953,6 +2077,7 @@ public final class Acl { */ public Builder setForwardActionValue(int value) { forwardAction_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -1963,8 +2088,7 @@ public final class Acl { */ @java.lang.Override public acl.Acl.AclForwardActionEnum getForwardAction() { - @SuppressWarnings("deprecation") - acl.Acl.AclForwardActionEnum result = acl.Acl.AclForwardActionEnum.valueOf(forwardAction_); + acl.Acl.AclForwardActionEnum result = acl.Acl.AclForwardActionEnum.forNumber(forwardAction_); return result == null ? acl.Acl.AclForwardActionEnum.UNRECOGNIZED : result; } @@ -1977,6 +2101,7 @@ public final class Acl { if (value == null) { throw new NullPointerException(); } + bitField0_ |= 0x00000001; forwardAction_ = value.getNumber(); onChanged(); return this; @@ -1987,6 +2112,7 @@ public final class Acl { * @return This builder for chaining. */ public Builder clearForwardAction() { + bitField0_ = (bitField0_ & ~0x00000001); forwardAction_ = 0; onChanged(); return this; @@ -2010,6 +2136,7 @@ public final class Acl { */ public Builder setLogActionValue(int value) { logAction_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -2020,8 +2147,7 @@ public final class Acl { */ @java.lang.Override public acl.Acl.AclLogActionEnum getLogAction() { - @SuppressWarnings("deprecation") - acl.Acl.AclLogActionEnum result = acl.Acl.AclLogActionEnum.valueOf(logAction_); + acl.Acl.AclLogActionEnum result = acl.Acl.AclLogActionEnum.forNumber(logAction_); return result == null ? acl.Acl.AclLogActionEnum.UNRECOGNIZED : result; } @@ -2034,6 +2160,7 @@ public final class Acl { if (value == null) { throw new NullPointerException(); } + bitField0_ |= 0x00000002; logAction_ = value.getNumber(); onChanged(); return this; @@ -2044,6 +2171,7 @@ public final class Acl { * @return This builder for chaining. */ public Builder clearLogAction() { + bitField0_ = (bitField0_ & ~0x00000002); logAction_ = 0; onChanged(); return this; @@ -2076,7 +2204,17 @@ public final class Acl { @java.lang.Override public AclAction parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AclAction(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2174,81 +2312,6 @@ public final class Acl { return new AclEntry(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private AclEntry(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 8: - { - sequenceId_ = input.readUInt32(); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - description_ = s; - break; - } - case 26: - { - acl.Acl.AclMatch.Builder subBuilder = null; - if (match_ != null) { - subBuilder = match_.toBuilder(); - } - match_ = input.readMessage(acl.Acl.AclMatch.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(match_); - match_ = subBuilder.buildPartial(); - } - break; - } - case 34: - { - acl.Acl.AclAction.Builder subBuilder = null; - if (action_ != null) { - subBuilder = action_.toBuilder(); - } - action_ = input.readMessage(acl.Acl.AclAction.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(action_); - action_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return acl.Acl.internal_static_acl_AclEntry_descriptor; } @@ -2260,7 +2323,7 @@ public final class Acl { public static final int SEQUENCE_ID_FIELD_NUMBER = 1; - private int sequenceId_; + private int sequenceId_ = 0; /** * <code>uint32 sequence_id = 1;</code> @@ -2273,7 +2336,8 @@ public final class Acl { public static final int DESCRIPTION_FIELD_NUMBER = 2; - private volatile java.lang.Object description_; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; /** * <code>string description = 2;</code> @@ -2335,7 +2399,7 @@ public final class Acl { */ @java.lang.Override public acl.Acl.AclMatchOrBuilder getMatchOrBuilder() { - return getMatch(); + return match_ == null ? acl.Acl.AclMatch.getDefaultInstance() : match_; } public static final int ACTION_FIELD_NUMBER = 4; @@ -2365,7 +2429,7 @@ public final class Acl { */ @java.lang.Override public acl.Acl.AclActionOrBuilder getActionOrBuilder() { - return getAction(); + return action_ == null ? acl.Acl.AclAction.getDefaultInstance() : action_; } private byte memoizedIsInitialized = -1; @@ -2386,7 +2450,7 @@ public final class Acl { if (sequenceId_ != 0) { output.writeUInt32(1, sequenceId_); } - if (!getDescriptionBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); } if (match_ != null) { @@ -2395,7 +2459,7 @@ public final class Acl { if (action_ != null) { output.writeMessage(4, getAction()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2407,7 +2471,7 @@ public final class Acl { if (sequenceId_ != 0) { size += com.google.protobuf.CodedOutputStream.computeUInt32Size(1, sequenceId_); } - if (!getDescriptionBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); } if (match_ != null) { @@ -2416,7 +2480,7 @@ public final class Acl { if (action_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getAction()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2446,7 +2510,7 @@ public final class Acl { if (!getAction().equals(other.getAction())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2470,7 +2534,7 @@ public final class Acl { hash = (37 * hash) + ACTION_FIELD_NUMBER; hash = (53 * hash) + getAction().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2564,34 +2628,26 @@ public final class Acl { // Construct using acl.Acl.AclEntry.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; sequenceId_ = 0; description_ = ""; - if (matchBuilder_ == null) { - match_ = null; - } else { - match_ = null; + match_ = null; + if (matchBuilder_ != null) { + matchBuilder_.dispose(); matchBuilder_ = null; } - if (actionBuilder_ == null) { - action_ = null; - } else { - action_ = null; + action_ = null; + if (actionBuilder_ != null) { + actionBuilder_.dispose(); actionBuilder_ = null; } return this; @@ -2619,50 +2675,27 @@ public final class Acl { @java.lang.Override public acl.Acl.AclEntry buildPartial() { acl.Acl.AclEntry result = new acl.Acl.AclEntry(this); - result.sequenceId_ = sequenceId_; - result.description_ = description_; - if (matchBuilder_ == null) { - result.match_ = match_; - } else { - result.match_ = matchBuilder_.build(); - } - if (actionBuilder_ == null) { - result.action_ = action_; - } else { - result.action_ = actionBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(acl.Acl.AclEntry result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sequenceId_ = sequenceId_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.match_ = matchBuilder_ == null ? match_ : matchBuilder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.action_ = actionBuilder_ == null ? action_ : actionBuilder_.build(); + } } @java.lang.Override @@ -2683,6 +2716,7 @@ public final class Acl { } if (!other.getDescription().isEmpty()) { description_ = other.description_; + bitField0_ |= 0x00000002; onChanged(); } if (other.hasMatch()) { @@ -2691,7 +2725,7 @@ public final class Acl { if (other.hasAction()) { mergeAction(other.getAction()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2703,20 +2737,68 @@ public final class Acl { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - acl.Acl.AclEntry parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 8: + { + sequenceId_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } + // case 8 + case 18: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 26: + { + input.readMessage(getMatchFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } + // case 26 + case 34: + { + input.readMessage(getActionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } + // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (acl.Acl.AclEntry) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private int sequenceId_; /** @@ -2735,6 +2817,7 @@ public final class Acl { */ public Builder setSequenceId(int value) { sequenceId_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -2744,6 +2827,7 @@ public final class Acl { * @return This builder for chaining. */ public Builder clearSequenceId() { + bitField0_ = (bitField0_ & ~0x00000001); sequenceId_ = 0; onChanged(); return this; @@ -2792,6 +2876,7 @@ public final class Acl { throw new NullPointerException(); } description_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -2802,6 +2887,7 @@ public final class Acl { */ public Builder clearDescription() { description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -2817,6 +2903,7 @@ public final class Acl { } checkByteStringIsUtf8(value); description_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -2830,7 +2917,7 @@ public final class Acl { * @return Whether the match field is set. */ public boolean hasMatch() { - return matchBuilder_ != null || match_ != null; + return ((bitField0_ & 0x00000004) != 0); } /** @@ -2854,10 +2941,11 @@ public final class Acl { throw new NullPointerException(); } match_ = value; - onChanged(); } else { matchBuilder_.setMessage(value); } + bitField0_ |= 0x00000004; + onChanged(); return this; } @@ -2867,10 +2955,11 @@ public final class Acl { public Builder setMatch(acl.Acl.AclMatch.Builder builderForValue) { if (matchBuilder_ == null) { match_ = builderForValue.build(); - onChanged(); } else { matchBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000004; + onChanged(); return this; } @@ -2879,15 +2968,16 @@ public final class Acl { */ public Builder mergeMatch(acl.Acl.AclMatch value) { if (matchBuilder_ == null) { - if (match_ != null) { - match_ = acl.Acl.AclMatch.newBuilder(match_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000004) != 0) && match_ != null && match_ != acl.Acl.AclMatch.getDefaultInstance()) { + getMatchBuilder().mergeFrom(value); } else { match_ = value; } - onChanged(); } else { matchBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000004; + onChanged(); return this; } @@ -2895,13 +2985,13 @@ public final class Acl { * <code>.acl.AclMatch match = 3;</code> */ public Builder clearMatch() { - if (matchBuilder_ == null) { - match_ = null; - onChanged(); - } else { - match_ = null; + bitField0_ = (bitField0_ & ~0x00000004); + match_ = null; + if (matchBuilder_ != null) { + matchBuilder_.dispose(); matchBuilder_ = null; } + onChanged(); return this; } @@ -2909,6 +2999,7 @@ public final class Acl { * <code>.acl.AclMatch match = 3;</code> */ public acl.Acl.AclMatch.Builder getMatchBuilder() { + bitField0_ |= 0x00000004; onChanged(); return getMatchFieldBuilder().getBuilder(); } @@ -2944,7 +3035,7 @@ public final class Acl { * @return Whether the action field is set. */ public boolean hasAction() { - return actionBuilder_ != null || action_ != null; + return ((bitField0_ & 0x00000008) != 0); } /** @@ -2968,10 +3059,11 @@ public final class Acl { throw new NullPointerException(); } action_ = value; - onChanged(); } else { actionBuilder_.setMessage(value); } + bitField0_ |= 0x00000008; + onChanged(); return this; } @@ -2981,10 +3073,11 @@ public final class Acl { public Builder setAction(acl.Acl.AclAction.Builder builderForValue) { if (actionBuilder_ == null) { action_ = builderForValue.build(); - onChanged(); } else { actionBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000008; + onChanged(); return this; } @@ -2993,15 +3086,16 @@ public final class Acl { */ public Builder mergeAction(acl.Acl.AclAction value) { if (actionBuilder_ == null) { - if (action_ != null) { - action_ = acl.Acl.AclAction.newBuilder(action_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000008) != 0) && action_ != null && action_ != acl.Acl.AclAction.getDefaultInstance()) { + getActionBuilder().mergeFrom(value); } else { action_ = value; } - onChanged(); } else { actionBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000008; + onChanged(); return this; } @@ -3009,13 +3103,13 @@ public final class Acl { * <code>.acl.AclAction action = 4;</code> */ public Builder clearAction() { - if (actionBuilder_ == null) { - action_ = null; - onChanged(); - } else { - action_ = null; + bitField0_ = (bitField0_ & ~0x00000008); + action_ = null; + if (actionBuilder_ != null) { + actionBuilder_.dispose(); actionBuilder_ = null; } + onChanged(); return this; } @@ -3023,6 +3117,7 @@ public final class Acl { * <code>.acl.AclAction action = 4;</code> */ public acl.Acl.AclAction.Builder getActionBuilder() { + bitField0_ |= 0x00000008; onChanged(); return getActionFieldBuilder().getBuilder(); } @@ -3076,7 +3171,17 @@ public final class Acl { @java.lang.Override public AclEntry parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AclEntry(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -3199,81 +3304,6 @@ public final class Acl { return new AclRuleSet(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private AclRuleSet(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - name_ = s; - break; - } - case 16: - { - int rawValue = input.readEnum(); - type_ = rawValue; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - description_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - userId_ = s; - break; - } - case 42: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - entries_ = new java.util.ArrayList<acl.Acl.AclEntry>(); - mutable_bitField0_ |= 0x00000001; - } - entries_.add(input.readMessage(acl.Acl.AclEntry.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - entries_ = java.util.Collections.unmodifiableList(entries_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return acl.Acl.internal_static_acl_AclRuleSet_descriptor; } @@ -3285,7 +3315,8 @@ public final class Acl { public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** * <code>string name = 1;</code> @@ -3322,7 +3353,7 @@ public final class Acl { public static final int TYPE_FIELD_NUMBER = 2; - private int type_; + private int type_ = 0; /** * <code>.acl.AclRuleTypeEnum type = 2;</code> @@ -3339,14 +3370,14 @@ public final class Acl { */ @java.lang.Override public acl.Acl.AclRuleTypeEnum getType() { - @SuppressWarnings("deprecation") - acl.Acl.AclRuleTypeEnum result = acl.Acl.AclRuleTypeEnum.valueOf(type_); + acl.Acl.AclRuleTypeEnum result = acl.Acl.AclRuleTypeEnum.forNumber(type_); return result == null ? acl.Acl.AclRuleTypeEnum.UNRECOGNIZED : result; } public static final int DESCRIPTION_FIELD_NUMBER = 3; - private volatile java.lang.Object description_; + @SuppressWarnings("serial") + private volatile java.lang.Object description_ = ""; /** * <code>string description = 3;</code> @@ -3383,7 +3414,8 @@ public final class Acl { public static final int USER_ID_FIELD_NUMBER = 4; - private volatile java.lang.Object userId_; + @SuppressWarnings("serial") + private volatile java.lang.Object userId_ = ""; /** * <code>string user_id = 4;</code> @@ -3420,6 +3452,7 @@ public final class Acl { public static final int ENTRIES_FIELD_NUMBER = 5; + @SuppressWarnings("serial") private java.util.List<acl.Acl.AclEntry> entries_; /** @@ -3477,22 +3510,22 @@ public final class Acl { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (type_ != acl.Acl.AclRuleTypeEnum.ACLRULETYPE_UNDEFINED.getNumber()) { output.writeEnum(2, type_); } - if (!getDescriptionBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); } - if (!getUserIdBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, userId_); } for (int i = 0; i < entries_.size(); i++) { output.writeMessage(5, entries_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3501,22 +3534,22 @@ public final class Acl { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (type_ != acl.Acl.AclRuleTypeEnum.ACLRULETYPE_UNDEFINED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, type_); } - if (!getDescriptionBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); } - if (!getUserIdBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, userId_); } for (int i = 0; i < entries_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, entries_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3540,7 +3573,7 @@ public final class Acl { return false; if (!getEntriesList().equals(other.getEntriesList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3564,7 +3597,7 @@ public final class Acl { hash = (37 * hash) + ENTRIES_FIELD_NUMBER; hash = (53 * hash) + getEntriesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3658,33 +3691,27 @@ public final class Acl { // Construct using acl.Acl.AclRuleSet.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getEntriesFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; name_ = ""; type_ = 0; description_ = ""; userId_ = ""; if (entriesBuilder_ == null) { entries_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + entries_ = null; entriesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -3710,52 +3737,40 @@ public final class Acl { @java.lang.Override public acl.Acl.AclRuleSet buildPartial() { acl.Acl.AclRuleSet result = new acl.Acl.AclRuleSet(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.type_ = type_; - result.description_ = description_; - result.userId_ = userId_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(acl.Acl.AclRuleSet result) { if (entriesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000010) != 0)) { entries_ = java.util.Collections.unmodifiableList(entries_); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000010); } result.entries_ = entries_; } else { result.entries_ = entriesBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); } - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(acl.Acl.AclRuleSet result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.description_ = description_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.userId_ = userId_; + } } @java.lang.Override @@ -3773,6 +3788,7 @@ public final class Acl { return this; if (!other.getName().isEmpty()) { name_ = other.name_; + bitField0_ |= 0x00000001; onChanged(); } if (other.type_ != 0) { @@ -3780,17 +3796,19 @@ public final class Acl { } if (!other.getDescription().isEmpty()) { description_ = other.description_; + bitField0_ |= 0x00000004; onChanged(); } if (!other.getUserId().isEmpty()) { userId_ = other.userId_; + bitField0_ |= 0x00000008; onChanged(); } if (entriesBuilder_ == null) { if (!other.entries_.isEmpty()) { if (entries_.isEmpty()) { entries_ = other.entries_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000010); } else { ensureEntriesIsMutable(); entries_.addAll(other.entries_); @@ -3803,14 +3821,14 @@ public final class Acl { entriesBuilder_.dispose(); entriesBuilder_ = null; entries_ = other.entries_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000010); entriesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getEntriesFieldBuilder() : null; } else { entriesBuilder_.addAllMessages(other.entries_); } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3822,17 +3840,75 @@ public final class Acl { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - acl.Acl.AclRuleSet parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 16: + { + type_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } + // case 16 + case 26: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } + // case 26 + case 34: + { + userId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } + // case 34 + case 42: + { + acl.Acl.AclEntry m = input.readMessage(acl.Acl.AclEntry.parser(), extensionRegistry); + if (entriesBuilder_ == null) { + ensureEntriesIsMutable(); + entries_.add(m); + } else { + entriesBuilder_.addMessage(m); + } + break; + } + // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (acl.Acl.AclRuleSet) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -3881,6 +3957,7 @@ public final class Acl { throw new NullPointerException(); } name_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -3891,6 +3968,7 @@ public final class Acl { */ public Builder clearName() { name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -3906,6 +3984,7 @@ public final class Acl { } checkByteStringIsUtf8(value); name_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -3928,6 +4007,7 @@ public final class Acl { */ public Builder setTypeValue(int value) { type_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -3938,8 +4018,7 @@ public final class Acl { */ @java.lang.Override public acl.Acl.AclRuleTypeEnum getType() { - @SuppressWarnings("deprecation") - acl.Acl.AclRuleTypeEnum result = acl.Acl.AclRuleTypeEnum.valueOf(type_); + acl.Acl.AclRuleTypeEnum result = acl.Acl.AclRuleTypeEnum.forNumber(type_); return result == null ? acl.Acl.AclRuleTypeEnum.UNRECOGNIZED : result; } @@ -3952,6 +4031,7 @@ public final class Acl { if (value == null) { throw new NullPointerException(); } + bitField0_ |= 0x00000002; type_ = value.getNumber(); onChanged(); return this; @@ -3962,6 +4042,7 @@ public final class Acl { * @return This builder for chaining. */ public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000002); type_ = 0; onChanged(); return this; @@ -4010,6 +4091,7 @@ public final class Acl { throw new NullPointerException(); } description_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -4020,6 +4102,7 @@ public final class Acl { */ public Builder clearDescription() { description_ = getDefaultInstance().getDescription(); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } @@ -4035,6 +4118,7 @@ public final class Acl { } checkByteStringIsUtf8(value); description_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -4082,6 +4166,7 @@ public final class Acl { throw new NullPointerException(); } userId_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -4092,6 +4177,7 @@ public final class Acl { */ public Builder clearUserId() { userId_ = getDefaultInstance().getUserId(); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } @@ -4107,6 +4193,7 @@ public final class Acl { } checkByteStringIsUtf8(value); userId_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -4114,9 +4201,9 @@ public final class Acl { private java.util.List<acl.Acl.AclEntry> entries_ = java.util.Collections.emptyList(); private void ensureEntriesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!((bitField0_ & 0x00000010) != 0)) { entries_ = new java.util.ArrayList<acl.Acl.AclEntry>(entries_); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000010; } } @@ -4268,7 +4355,7 @@ public final class Acl { public Builder clearEntries() { if (entriesBuilder_ == null) { entries_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); } else { entriesBuilder_.clear(); @@ -4342,7 +4429,7 @@ public final class Acl { private com.google.protobuf.RepeatedFieldBuilderV3<acl.Acl.AclEntry, acl.Acl.AclEntry.Builder, acl.Acl.AclEntryOrBuilder> getEntriesFieldBuilder() { if (entriesBuilder_ == null) { - entriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<acl.Acl.AclEntry, acl.Acl.AclEntry.Builder, acl.Acl.AclEntryOrBuilder>(entries_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + entriesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<acl.Acl.AclEntry, acl.Acl.AclEntry.Builder, acl.Acl.AclEntryOrBuilder>(entries_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); entries_ = null; } return entriesBuilder_; @@ -4375,7 +4462,17 @@ public final class Acl { @java.lang.Override public AclRuleSet parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AclRuleSet(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -4417,10 +4514,10 @@ public final class Acl { private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { - java.lang.String[] descriptorData = { "\n\tacl.proto\022\003acl\"\252\001\n\010AclMatch\022\014\n\004dscp\030\001 " + "\001(\r\022\020\n\010protocol\030\002 \001(\r\022\023\n\013src_address\030\003 \001" + "(\t\022\023\n\013dst_address\030\004 \001(\t\022\020\n\010src_port\030\005 \001(" + "\r\022\020\n\010dst_port\030\006 \001(\r\022\030\n\020start_mpls_label\030" + "\007 \001(\r\022\026\n\016end_mpls_label\030\010 \001(\r\"i\n\tAclActi" + "on\0221\n\016forward_action\030\001 \001(\0162\031.acl.AclForw" + "ardActionEnum\022)\n\nlog_action\030\002 \001(\0162\025.acl." + "AclLogActionEnum\"r\n\010AclEntry\022\023\n\013sequence" + "_id\030\001 \001(\r\022\023\n\013description\030\002 \001(\t\022\034\n\005match\030" + "\003 \001(\0132\r.acl.AclMatch\022\036\n\006action\030\004 \001(\0132\016.a" + "cl.AclAction\"\204\001\n\nAclRuleSet\022\014\n\004name\030\001 \001(" + "\t\022\"\n\004type\030\002 \001(\0162\024.acl.AclRuleTypeEnum\022\023\n" + "\013description\030\003 \001(\t\022\017\n\007user_id\030\004 \001(\t\022\036\n\007e" + "ntries\030\005 \003(\0132\r.acl.AclEntry*\231\001\n\017AclRuleT" + "ypeEnum\022\031\n\025ACLRULETYPE_UNDEFINED\020\000\022\024\n\020AC" + "LRULETYPE_IPV4\020\001\022\024\n\020ACLRULETYPE_IPV6\020\002\022\022" + "\n\016ACLRULETYPE_L2\020\003\022\024\n\020ACLRULETYPE_MPLS\020\004" + "\022\025\n\021ACLRULETYPE_MIXED\020\005*\227\001\n\024AclForwardAc" + "tionEnum\022!\n\035ACLFORWARDINGACTION_UNDEFINE" + "D\020\000\022\034\n\030ACLFORWARDINGACTION_DROP\020\001\022\036\n\032ACL" + "FORWARDINGACTION_ACCEPT\020\002\022\036\n\032ACLFORWARDI" + "NGACTION_REJECT\020\003*_\n\020AclLogActionEnum\022\032\n" + "\026ACLLOGACTION_UNDEFINED\020\000\022\026\n\022ACLLOGACTIO" + "N_NOLOG\020\001\022\027\n\023ACLLOGACTION_SYSLOG\020\002b\006prot" + "o3" }; + java.lang.String[] descriptorData = { "\n\tacl.proto\022\003acl\"\275\001\n\010AclMatch\022\014\n\004dscp\030\001 " + "\001(\r\022\020\n\010protocol\030\002 \001(\r\022\023\n\013src_address\030\003 \001" + "(\t\022\023\n\013dst_address\030\004 \001(\t\022\020\n\010src_port\030\005 \001(" + "\r\022\020\n\010dst_port\030\006 \001(\r\022\030\n\020start_mpls_label\030" + "\007 \001(\r\022\026\n\016end_mpls_label\030\010 \001(\r\022\021\n\ttcp_fla" + "gs\030\t \001(\t\"i\n\tAclAction\0221\n\016forward_action\030" + "\001 \001(\0162\031.acl.AclForwardActionEnum\022)\n\nlog_" + "action\030\002 \001(\0162\025.acl.AclLogActionEnum\"r\n\010A" + "clEntry\022\023\n\013sequence_id\030\001 \001(\r\022\023\n\013descript" + "ion\030\002 \001(\t\022\034\n\005match\030\003 \001(\0132\r.acl.AclMatch\022" + "\036\n\006action\030\004 \001(\0132\016.acl.AclAction\"\204\001\n\nAclR" + "uleSet\022\014\n\004name\030\001 \001(\t\022\"\n\004type\030\002 \001(\0162\024.acl" + ".AclRuleTypeEnum\022\023\n\013description\030\003 \001(\t\022\017\n" + "\007user_id\030\004 \001(\t\022\036\n\007entries\030\005 \003(\0132\r.acl.Ac" + "lEntry*\231\001\n\017AclRuleTypeEnum\022\031\n\025ACLRULETYP" + "E_UNDEFINED\020\000\022\024\n\020ACLRULETYPE_IPV4\020\001\022\024\n\020A" + "CLRULETYPE_IPV6\020\002\022\022\n\016ACLRULETYPE_L2\020\003\022\024\n" + "\020ACLRULETYPE_MPLS\020\004\022\025\n\021ACLRULETYPE_MIXED" + "\020\005*\227\001\n\024AclForwardActionEnum\022!\n\035ACLFORWAR" + "DINGACTION_UNDEFINED\020\000\022\034\n\030ACLFORWARDINGA" + "CTION_DROP\020\001\022\036\n\032ACLFORWARDINGACTION_ACCE" + "PT\020\002\022\036\n\032ACLFORWARDINGACTION_REJECT\020\003*_\n\020" + "AclLogActionEnum\022\032\n\026ACLLOGACTION_UNDEFIN" + "ED\020\000\022\026\n\022ACLLOGACTION_NOLOG\020\001\022\027\n\023ACLLOGAC" + "TION_SYSLOG\020\002b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}); internal_static_acl_AclMatch_descriptor = getDescriptor().getMessageTypes().get(0); - internal_static_acl_AclMatch_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_acl_AclMatch_descriptor, new java.lang.String[] { "Dscp", "Protocol", "SrcAddress", "DstAddress", "SrcPort", "DstPort", "StartMplsLabel", "EndMplsLabel" }); + internal_static_acl_AclMatch_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_acl_AclMatch_descriptor, new java.lang.String[] { "Dscp", "Protocol", "SrcAddress", "DstAddress", "SrcPort", "DstPort", "StartMplsLabel", "EndMplsLabel", "TcpFlags" }); internal_static_acl_AclAction_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_acl_AclAction_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_acl_AclAction_descriptor, new java.lang.String[] { "ForwardAction", "LogAction" }); internal_static_acl_AclEntry_descriptor = getDescriptor().getMessageTypes().get(2); diff --git a/src/policy/target/generated-sources/grpc/context/ContextOuterClass.java b/src/policy/target/generated-sources/grpc/context/ContextOuterClass.java index 4593770498216267b8d2f95dd728fccfbb9dc134..d41b80f1d0efdbd5a345c1ebf41c8c25fb7157f7 100644 --- a/src/policy/target/generated-sources/grpc/context/ContextOuterClass.java +++ b/src/policy/target/generated-sources/grpc/context/ContextOuterClass.java @@ -195,6 +195,10 @@ public final class ContextOuterClass { * <code>DEVICEDRIVER_OC = 11;</code> */ DEVICEDRIVER_OC(11), + /** + * <code>DEVICEDRIVER_QKD = 12;</code> + */ + DEVICEDRIVER_QKD(12), UNRECOGNIZED(-1); /** @@ -261,6 +265,11 @@ public final class ContextOuterClass { */ public static final int DEVICEDRIVER_OC_VALUE = 11; + /** + * <code>DEVICEDRIVER_QKD = 12;</code> + */ + public static final int DEVICEDRIVER_QKD_VALUE = 12; + public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); @@ -308,6 +317,8 @@ public final class ContextOuterClass { return DEVICEDRIVER_IETF_ACTN; case 11: return DEVICEDRIVER_OC; + case 12: + return DEVICEDRIVER_QKD; default: return null; } @@ -504,6 +515,10 @@ public final class ContextOuterClass { * <code>SERVICETYPE_OPTICAL_CONNECTIVITY = 6;</code> */ SERVICETYPE_OPTICAL_CONNECTIVITY(6), + /** + * <code>SERVICETYPE_QKD = 7;</code> + */ + SERVICETYPE_QKD(7), UNRECOGNIZED(-1); /** @@ -541,6 +556,11 @@ public final class ContextOuterClass { */ public static final int SERVICETYPE_OPTICAL_CONNECTIVITY_VALUE = 6; + /** + * <code>SERVICETYPE_QKD = 7;</code> + */ + public static final int SERVICETYPE_QKD_VALUE = 7; + public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException("Can't get the number of an unknown enum value."); @@ -578,6 +598,8 @@ public final class ContextOuterClass { return SERVICETYPE_E2E; case 6: return SERVICETYPE_OPTICAL_CONNECTIVITY; + case 7: + return SERVICETYPE_QKD; default: return null; } @@ -1363,44 +1385,6 @@ public final class ContextOuterClass { return new Empty(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Empty(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_Empty_descriptor; } @@ -1425,7 +1409,7 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1434,7 +1418,7 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1448,7 +1432,7 @@ public final class ContextOuterClass { return super.equals(obj); } context.ContextOuterClass.Empty other = (context.ContextOuterClass.Empty) obj; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1460,7 +1444,7 @@ public final class ContextOuterClass { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1558,17 +1542,10 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.Empty.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override @@ -1603,36 +1580,6 @@ public final class ContextOuterClass { return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof context.ContextOuterClass.Empty) { @@ -1646,7 +1593,7 @@ public final class ContextOuterClass { public Builder mergeFrom(context.ContextOuterClass.Empty other) { if (other == context.ContextOuterClass.Empty.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1658,17 +1605,35 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.Empty parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Empty) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -1699,7 +1664,17 @@ public final class ContextOuterClass { @java.lang.Override public Empty parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Empty(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1757,50 +1732,6 @@ public final class ContextOuterClass { return new Uuid(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Uuid(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - uuid_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_Uuid_descriptor; } @@ -1812,7 +1743,8 @@ public final class ContextOuterClass { public static final int UUID_FIELD_NUMBER = 1; - private volatile java.lang.Object uuid_; + @SuppressWarnings("serial") + private volatile java.lang.Object uuid_ = ""; /** * <code>string uuid = 1;</code> @@ -1862,10 +1794,10 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getUuidBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uuid_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, uuid_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1874,10 +1806,10 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (!getUuidBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uuid_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, uuid_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1893,7 +1825,7 @@ public final class ContextOuterClass { context.ContextOuterClass.Uuid other = (context.ContextOuterClass.Uuid) obj; if (!getUuid().equals(other.getUuid())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1907,7 +1839,7 @@ public final class ContextOuterClass { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + UUID_FIELD_NUMBER; hash = (53 * hash) + getUuid().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2001,22 +1933,16 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.Uuid.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; uuid_ = ""; return this; } @@ -2043,39 +1969,18 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.Uuid buildPartial() { context.ContextOuterClass.Uuid result = new context.ContextOuterClass.Uuid(this); - result.uuid_ = uuid_; + if (bitField0_ != 0) { + buildPartial0(result); + } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.Uuid result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uuid_ = uuid_; + } } @java.lang.Override @@ -2093,9 +1998,10 @@ public final class ContextOuterClass { return this; if (!other.getUuid().isEmpty()) { uuid_ = other.uuid_; + bitField0_ |= 0x00000001; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2107,20 +2013,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.Uuid parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + uuid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Uuid) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private java.lang.Object uuid_ = ""; /** @@ -2164,6 +2097,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } uuid_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -2174,6 +2108,7 @@ public final class ContextOuterClass { */ public Builder clearUuid() { uuid_ = getDefaultInstance().getUuid(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -2189,6 +2124,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); uuid_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -2220,7 +2156,17 @@ public final class ContextOuterClass { @java.lang.Override public Uuid parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Uuid(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2271,49 +2217,6 @@ public final class ContextOuterClass { return new Timestamp(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Timestamp(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 9: - { - timestamp_ = input.readDouble(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_Timestamp_descriptor; } @@ -2325,7 +2228,7 @@ public final class ContextOuterClass { public static final int TIMESTAMP_FIELD_NUMBER = 1; - private double timestamp_; + private double timestamp_ = 0D; /** * <code>double timestamp = 1;</code> @@ -2351,10 +2254,10 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (timestamp_ != 0D) { + if (java.lang.Double.doubleToRawLongBits(timestamp_) != 0) { output.writeDouble(1, timestamp_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2363,10 +2266,10 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (timestamp_ != 0D) { + if (java.lang.Double.doubleToRawLongBits(timestamp_) != 0) { size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, timestamp_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2382,7 +2285,7 @@ public final class ContextOuterClass { context.ContextOuterClass.Timestamp other = (context.ContextOuterClass.Timestamp) obj; if (java.lang.Double.doubleToLongBits(getTimestamp()) != java.lang.Double.doubleToLongBits(other.getTimestamp())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2396,7 +2299,7 @@ public final class ContextOuterClass { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(java.lang.Double.doubleToLongBits(getTimestamp())); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2490,22 +2393,16 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.Timestamp.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; timestamp_ = 0D; return this; } @@ -2532,39 +2429,18 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.Timestamp buildPartial() { context.ContextOuterClass.Timestamp result = new context.ContextOuterClass.Timestamp(this); - result.timestamp_ = timestamp_; + if (bitField0_ != 0) { + buildPartial0(result); + } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.Timestamp result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.timestamp_ = timestamp_; + } } @java.lang.Override @@ -2583,7 +2459,7 @@ public final class ContextOuterClass { if (other.getTimestamp() != 0D) { setTimestamp(other.getTimestamp()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2595,20 +2471,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.Timestamp parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 9: + { + timestamp_ = input.readDouble(); + bitField0_ |= 0x00000001; + break; + } + // case 9 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Timestamp) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private double timestamp_; /** @@ -2627,6 +2530,7 @@ public final class ContextOuterClass { */ public Builder setTimestamp(double value) { timestamp_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -2636,6 +2540,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearTimestamp() { + bitField0_ = (bitField0_ & ~0x00000001); timestamp_ = 0D; onChanged(); return this; @@ -2668,7 +2573,17 @@ public final class ContextOuterClass { @java.lang.Override public Timestamp parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Timestamp(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2743,63 +2658,6 @@ public final class ContextOuterClass { return new Event(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Event(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.Timestamp.Builder subBuilder = null; - if (timestamp_ != null) { - subBuilder = timestamp_.toBuilder(); - } - timestamp_ = input.readMessage(context.ContextOuterClass.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(timestamp_); - timestamp_ = subBuilder.buildPartial(); - } - break; - } - case 16: - { - int rawValue = input.readEnum(); - eventType_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_Event_descriptor; } @@ -2836,12 +2694,12 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - return getTimestamp(); + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; } public static final int EVENT_TYPE_FIELD_NUMBER = 2; - private int eventType_; + private int eventType_ = 0; /** * <code>.context.EventTypeEnum event_type = 2;</code> @@ -2858,8 +2716,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.EventTypeEnum getEventType() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.EventTypeEnum result = context.ContextOuterClass.EventTypeEnum.valueOf(eventType_); + context.ContextOuterClass.EventTypeEnum result = context.ContextOuterClass.EventTypeEnum.forNumber(eventType_); return result == null ? context.ContextOuterClass.EventTypeEnum.UNRECOGNIZED : result; } @@ -2884,7 +2741,7 @@ public final class ContextOuterClass { if (eventType_ != context.ContextOuterClass.EventTypeEnum.EVENTTYPE_UNDEFINED.getNumber()) { output.writeEnum(2, eventType_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2899,7 +2756,7 @@ public final class ContextOuterClass { if (eventType_ != context.ContextOuterClass.EventTypeEnum.EVENTTYPE_UNDEFINED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, eventType_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2921,7 +2778,7 @@ public final class ContextOuterClass { } if (eventType_ != other.eventType_) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2939,7 +2796,7 @@ public final class ContextOuterClass { } hash = (37 * hash) + EVENT_TYPE_FIELD_NUMBER; hash = (53 * hash) + eventType_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3033,26 +2890,19 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.Event.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (timestampBuilder_ == null) { - timestamp_ = null; - } else { - timestamp_ = null; + bitField0_ = 0; + timestamp_ = null; + if (timestampBuilder_ != null) { + timestampBuilder_.dispose(); timestampBuilder_ = null; } eventType_ = 0; @@ -3081,44 +2931,21 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.Event buildPartial() { context.ContextOuterClass.Event result = new context.ContextOuterClass.Event(this); - if (timestampBuilder_ == null) { - result.timestamp_ = timestamp_; - } else { - result.timestamp_ = timestampBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } - result.eventType_ = eventType_; onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.Event result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.timestamp_ = timestampBuilder_ == null ? timestamp_ : timestampBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.eventType_ = eventType_; + } } @java.lang.Override @@ -3140,7 +2967,7 @@ public final class ContextOuterClass { if (other.eventType_ != 0) { setEventTypeValue(other.getEventTypeValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3152,20 +2979,54 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.Event parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getTimestampFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 16: + { + eventType_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } + // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Event) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.Timestamp timestamp_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> timestampBuilder_; @@ -3175,7 +3036,7 @@ public final class ContextOuterClass { * @return Whether the timestamp field is set. */ public boolean hasTimestamp() { - return timestampBuilder_ != null || timestamp_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -3199,10 +3060,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } timestamp_ = value; - onChanged(); } else { timestampBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -3212,10 +3074,11 @@ public final class ContextOuterClass { public Builder setTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) { if (timestampBuilder_ == null) { timestamp_ = builderForValue.build(); - onChanged(); } else { timestampBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -3224,15 +3087,16 @@ public final class ContextOuterClass { */ public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) { if (timestampBuilder_ == null) { - if (timestamp_ != null) { - timestamp_ = context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && timestamp_ != null && timestamp_ != context.ContextOuterClass.Timestamp.getDefaultInstance()) { + getTimestampBuilder().mergeFrom(value); } else { timestamp_ = value; } - onChanged(); } else { timestampBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -3240,13 +3104,13 @@ public final class ContextOuterClass { * <code>.context.Timestamp timestamp = 1;</code> */ public Builder clearTimestamp() { - if (timestampBuilder_ == null) { - timestamp_ = null; - onChanged(); - } else { - timestamp_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + timestamp_ = null; + if (timestampBuilder_ != null) { + timestampBuilder_.dispose(); timestampBuilder_ = null; } + onChanged(); return this; } @@ -3254,6 +3118,7 @@ public final class ContextOuterClass { * <code>.context.Timestamp timestamp = 1;</code> */ public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getTimestampFieldBuilder().getBuilder(); } @@ -3298,6 +3163,7 @@ public final class ContextOuterClass { */ public Builder setEventTypeValue(int value) { eventType_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -3308,8 +3174,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.EventTypeEnum getEventType() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.EventTypeEnum result = context.ContextOuterClass.EventTypeEnum.valueOf(eventType_); + context.ContextOuterClass.EventTypeEnum result = context.ContextOuterClass.EventTypeEnum.forNumber(eventType_); return result == null ? context.ContextOuterClass.EventTypeEnum.UNRECOGNIZED : result; } @@ -3322,6 +3187,7 @@ public final class ContextOuterClass { if (value == null) { throw new NullPointerException(); } + bitField0_ |= 0x00000002; eventType_ = value.getNumber(); onChanged(); return this; @@ -3332,6 +3198,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearEventType() { + bitField0_ = (bitField0_ & ~0x00000002); eventType_ = 0; onChanged(); return this; @@ -3364,7 +3231,17 @@ public final class ContextOuterClass { @java.lang.Override public Event parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Event(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -3430,57 +3307,6 @@ public final class ContextOuterClass { return new ContextId(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ContextId(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.Uuid.Builder subBuilder = null; - if (contextUuid_ != null) { - subBuilder = contextUuid_.toBuilder(); - } - contextUuid_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(contextUuid_); - contextUuid_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_ContextId_descriptor; } @@ -3517,7 +3343,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.UuidOrBuilder getContextUuidOrBuilder() { - return getContextUuid(); + return contextUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : contextUuid_; } private byte memoizedIsInitialized = -1; @@ -3538,7 +3364,7 @@ public final class ContextOuterClass { if (contextUuid_ != null) { output.writeMessage(1, getContextUuid()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3550,7 +3376,7 @@ public final class ContextOuterClass { if (contextUuid_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getContextUuid()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3570,7 +3396,7 @@ public final class ContextOuterClass { if (!getContextUuid().equals(other.getContextUuid())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3586,7 +3412,7 @@ public final class ContextOuterClass { hash = (37 * hash) + CONTEXT_UUID_FIELD_NUMBER; hash = (53 * hash) + getContextUuid().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3684,26 +3510,19 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.ContextId.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (contextUuidBuilder_ == null) { - contextUuid_ = null; - } else { - contextUuid_ = null; + bitField0_ = 0; + contextUuid_ = null; + if (contextUuidBuilder_ != null) { + contextUuidBuilder_.dispose(); contextUuidBuilder_ = null; } return this; @@ -3731,43 +3550,18 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.ContextId buildPartial() { context.ContextOuterClass.ContextId result = new context.ContextOuterClass.ContextId(this); - if (contextUuidBuilder_ == null) { - result.contextUuid_ = contextUuid_; - } else { - result.contextUuid_ = contextUuidBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.ContextId result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.contextUuid_ = contextUuidBuilder_ == null ? contextUuid_ : contextUuidBuilder_.build(); + } } @java.lang.Override @@ -3786,7 +3580,7 @@ public final class ContextOuterClass { if (other.hasContextUuid()) { mergeContextUuid(other.getContextUuid()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3798,20 +3592,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.ContextId parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getContextUuidFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ContextId) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.Uuid contextUuid_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> contextUuidBuilder_; @@ -3821,7 +3642,7 @@ public final class ContextOuterClass { * @return Whether the contextUuid field is set. */ public boolean hasContextUuid() { - return contextUuidBuilder_ != null || contextUuid_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -3845,10 +3666,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } contextUuid_ = value; - onChanged(); } else { contextUuidBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -3858,10 +3680,11 @@ public final class ContextOuterClass { public Builder setContextUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { if (contextUuidBuilder_ == null) { contextUuid_ = builderForValue.build(); - onChanged(); } else { contextUuidBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -3870,15 +3693,16 @@ public final class ContextOuterClass { */ public Builder mergeContextUuid(context.ContextOuterClass.Uuid value) { if (contextUuidBuilder_ == null) { - if (contextUuid_ != null) { - contextUuid_ = context.ContextOuterClass.Uuid.newBuilder(contextUuid_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && contextUuid_ != null && contextUuid_ != context.ContextOuterClass.Uuid.getDefaultInstance()) { + getContextUuidBuilder().mergeFrom(value); } else { contextUuid_ = value; } - onChanged(); } else { contextUuidBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -3886,13 +3710,13 @@ public final class ContextOuterClass { * <code>.context.Uuid context_uuid = 1;</code> */ public Builder clearContextUuid() { - if (contextUuidBuilder_ == null) { - contextUuid_ = null; - onChanged(); - } else { - contextUuid_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + contextUuid_ = null; + if (contextUuidBuilder_ != null) { + contextUuidBuilder_.dispose(); contextUuidBuilder_ = null; } + onChanged(); return this; } @@ -3900,6 +3724,7 @@ public final class ContextOuterClass { * <code>.context.Uuid context_uuid = 1;</code> */ public context.ContextOuterClass.Uuid.Builder getContextUuidBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getContextUuidFieldBuilder().getBuilder(); } @@ -3953,7 +3778,17 @@ public final class ContextOuterClass { @java.lang.Override public ContextId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ContextId(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -4123,113 +3958,6 @@ public final class ContextOuterClass { return new Context(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Context(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.ContextId.Builder subBuilder = null; - if (contextId_ != null) { - subBuilder = contextId_.toBuilder(); - } - contextId_ = input.readMessage(context.ContextOuterClass.ContextId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(contextId_); - contextId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - name_ = s; - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - topologyIds_ = new java.util.ArrayList<context.ContextOuterClass.TopologyId>(); - mutable_bitField0_ |= 0x00000001; - } - topologyIds_.add(input.readMessage(context.ContextOuterClass.TopologyId.parser(), extensionRegistry)); - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - serviceIds_ = new java.util.ArrayList<context.ContextOuterClass.ServiceId>(); - mutable_bitField0_ |= 0x00000002; - } - serviceIds_.add(input.readMessage(context.ContextOuterClass.ServiceId.parser(), extensionRegistry)); - break; - } - case 42: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - sliceIds_ = new java.util.ArrayList<context.ContextOuterClass.SliceId>(); - mutable_bitField0_ |= 0x00000004; - } - sliceIds_.add(input.readMessage(context.ContextOuterClass.SliceId.parser(), extensionRegistry)); - break; - } - case 50: - { - context.ContextOuterClass.TeraFlowController.Builder subBuilder = null; - if (controller_ != null) { - subBuilder = controller_.toBuilder(); - } - controller_ = input.readMessage(context.ContextOuterClass.TeraFlowController.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(controller_); - controller_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - topologyIds_ = java.util.Collections.unmodifiableList(topologyIds_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - serviceIds_ = java.util.Collections.unmodifiableList(serviceIds_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - sliceIds_ = java.util.Collections.unmodifiableList(sliceIds_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_Context_descriptor; } @@ -4266,12 +3994,13 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - return getContextId(); + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; } public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** * <code>string name = 2;</code> @@ -4308,6 +4037,7 @@ public final class ContextOuterClass { public static final int TOPOLOGY_IDS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.TopologyId> topologyIds_; /** @@ -4352,6 +4082,7 @@ public final class ContextOuterClass { public static final int SERVICE_IDS_FIELD_NUMBER = 4; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.ServiceId> serviceIds_; /** @@ -4396,6 +4127,7 @@ public final class ContextOuterClass { public static final int SLICE_IDS_FIELD_NUMBER = 5; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.SliceId> sliceIds_; /** @@ -4465,7 +4197,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.TeraFlowControllerOrBuilder getControllerOrBuilder() { - return getController(); + return controller_ == null ? context.ContextOuterClass.TeraFlowController.getDefaultInstance() : controller_; } private byte memoizedIsInitialized = -1; @@ -4486,7 +4218,7 @@ public final class ContextOuterClass { if (contextId_ != null) { output.writeMessage(1, getContextId()); } - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); } for (int i = 0; i < topologyIds_.size(); i++) { @@ -4501,7 +4233,7 @@ public final class ContextOuterClass { if (controller_ != null) { output.writeMessage(6, getController()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -4513,7 +4245,7 @@ public final class ContextOuterClass { if (contextId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getContextId()); } - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); } for (int i = 0; i < topologyIds_.size(); i++) { @@ -4528,7 +4260,7 @@ public final class ContextOuterClass { if (controller_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getController()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -4562,7 +4294,7 @@ public final class ContextOuterClass { if (!getController().equals(other.getController())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4596,7 +4328,7 @@ public final class ContextOuterClass { hash = (37 * hash) + CONTROLLER_FIELD_NUMBER; hash = (53 * hash) + getController().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -4690,54 +4422,46 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.Context.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getTopologyIdsFieldBuilder(); - getServiceIdsFieldBuilder(); - getSliceIdsFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); - if (contextIdBuilder_ == null) { - contextId_ = null; - } else { - contextId_ = null; + bitField0_ = 0; + contextId_ = null; + if (contextIdBuilder_ != null) { + contextIdBuilder_.dispose(); contextIdBuilder_ = null; } name_ = ""; if (topologyIdsBuilder_ == null) { topologyIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + topologyIds_ = null; topologyIdsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); if (serviceIdsBuilder_ == null) { serviceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + serviceIds_ = null; serviceIdsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000008); if (sliceIdsBuilder_ == null) { sliceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + sliceIds_ = null; sliceIdsBuilder_.clear(); } - if (controllerBuilder_ == null) { - controller_ = null; - } else { - controller_ = null; + bitField0_ = (bitField0_ & ~0x00000010); + controller_ = null; + if (controllerBuilder_ != null) { + controllerBuilder_.dispose(); controllerBuilder_ = null; } return this; @@ -4765,77 +4489,55 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.Context buildPartial() { context.ContextOuterClass.Context result = new context.ContextOuterClass.Context(this); - int from_bitField0_ = bitField0_; - if (contextIdBuilder_ == null) { - result.contextId_ = contextId_; - } else { - result.contextId_ = contextIdBuilder_.build(); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); } - result.name_ = name_; + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.Context result) { if (topologyIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { topologyIds_ = java.util.Collections.unmodifiableList(topologyIds_); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); } result.topologyIds_ = topologyIds_; } else { result.topologyIds_ = topologyIdsBuilder_.build(); } if (serviceIdsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000008) != 0)) { serviceIds_ = java.util.Collections.unmodifiableList(serviceIds_); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); } result.serviceIds_ = serviceIds_; } else { result.serviceIds_ = serviceIdsBuilder_.build(); } if (sliceIdsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { + if (((bitField0_ & 0x00000010) != 0)) { sliceIds_ = java.util.Collections.unmodifiableList(sliceIds_); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000010); } result.sliceIds_ = sliceIds_; } else { result.sliceIds_ = sliceIdsBuilder_.build(); } - if (controllerBuilder_ == null) { - result.controller_ = controller_; - } else { - result.controller_ = controllerBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); } - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.Context result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.contextId_ = contextIdBuilder_ == null ? contextId_ : contextIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.controller_ = controllerBuilder_ == null ? controller_ : controllerBuilder_.build(); + } } @java.lang.Override @@ -4856,13 +4558,14 @@ public final class ContextOuterClass { } if (!other.getName().isEmpty()) { name_ = other.name_; + bitField0_ |= 0x00000002; onChanged(); } if (topologyIdsBuilder_ == null) { if (!other.topologyIds_.isEmpty()) { if (topologyIds_.isEmpty()) { topologyIds_ = other.topologyIds_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); } else { ensureTopologyIdsIsMutable(); topologyIds_.addAll(other.topologyIds_); @@ -4875,7 +4578,7 @@ public final class ContextOuterClass { topologyIdsBuilder_.dispose(); topologyIdsBuilder_ = null; topologyIds_ = other.topologyIds_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); topologyIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getTopologyIdsFieldBuilder() : null; } else { topologyIdsBuilder_.addAllMessages(other.topologyIds_); @@ -4886,7 +4589,7 @@ public final class ContextOuterClass { if (!other.serviceIds_.isEmpty()) { if (serviceIds_.isEmpty()) { serviceIds_ = other.serviceIds_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); } else { ensureServiceIdsIsMutable(); serviceIds_.addAll(other.serviceIds_); @@ -4899,7 +4602,7 @@ public final class ContextOuterClass { serviceIdsBuilder_.dispose(); serviceIdsBuilder_ = null; serviceIds_ = other.serviceIds_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); serviceIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getServiceIdsFieldBuilder() : null; } else { serviceIdsBuilder_.addAllMessages(other.serviceIds_); @@ -4910,7 +4613,7 @@ public final class ContextOuterClass { if (!other.sliceIds_.isEmpty()) { if (sliceIds_.isEmpty()) { sliceIds_ = other.sliceIds_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000010); } else { ensureSliceIdsIsMutable(); sliceIds_.addAll(other.sliceIds_); @@ -4923,7 +4626,7 @@ public final class ContextOuterClass { sliceIdsBuilder_.dispose(); sliceIdsBuilder_ = null; sliceIds_ = other.sliceIds_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000010); sliceIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSliceIdsFieldBuilder() : null; } else { sliceIdsBuilder_.addAllMessages(other.sliceIds_); @@ -4933,7 +4636,7 @@ public final class ContextOuterClass { if (other.hasController()) { mergeController(other.getController()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4945,17 +4648,92 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.Context parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getContextIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 26: + { + context.ContextOuterClass.TopologyId m = input.readMessage(context.ContextOuterClass.TopologyId.parser(), extensionRegistry); + if (topologyIdsBuilder_ == null) { + ensureTopologyIdsIsMutable(); + topologyIds_.add(m); + } else { + topologyIdsBuilder_.addMessage(m); + } + break; + } + // case 26 + case 34: + { + context.ContextOuterClass.ServiceId m = input.readMessage(context.ContextOuterClass.ServiceId.parser(), extensionRegistry); + if (serviceIdsBuilder_ == null) { + ensureServiceIdsIsMutable(); + serviceIds_.add(m); + } else { + serviceIdsBuilder_.addMessage(m); + } + break; + } + // case 34 + case 42: + { + context.ContextOuterClass.SliceId m = input.readMessage(context.ContextOuterClass.SliceId.parser(), extensionRegistry); + if (sliceIdsBuilder_ == null) { + ensureSliceIdsIsMutable(); + sliceIds_.add(m); + } else { + sliceIdsBuilder_.addMessage(m); + } + break; + } + // case 42 + case 50: + { + input.readMessage(getControllerFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } + // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Context) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -4970,7 +4748,7 @@ public final class ContextOuterClass { * @return Whether the contextId field is set. */ public boolean hasContextId() { - return contextIdBuilder_ != null || contextId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -4994,10 +4772,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } contextId_ = value; - onChanged(); } else { contextIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -5007,10 +4786,11 @@ public final class ContextOuterClass { public Builder setContextId(context.ContextOuterClass.ContextId.Builder builderForValue) { if (contextIdBuilder_ == null) { contextId_ = builderForValue.build(); - onChanged(); } else { contextIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -5019,15 +4799,16 @@ public final class ContextOuterClass { */ public Builder mergeContextId(context.ContextOuterClass.ContextId value) { if (contextIdBuilder_ == null) { - if (contextId_ != null) { - contextId_ = context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && contextId_ != null && contextId_ != context.ContextOuterClass.ContextId.getDefaultInstance()) { + getContextIdBuilder().mergeFrom(value); } else { contextId_ = value; } - onChanged(); } else { contextIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -5035,13 +4816,13 @@ public final class ContextOuterClass { * <code>.context.ContextId context_id = 1;</code> */ public Builder clearContextId() { - if (contextIdBuilder_ == null) { - contextId_ = null; - onChanged(); - } else { - contextId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + contextId_ = null; + if (contextIdBuilder_ != null) { + contextIdBuilder_.dispose(); contextIdBuilder_ = null; } + onChanged(); return this; } @@ -5049,6 +4830,7 @@ public final class ContextOuterClass { * <code>.context.ContextId context_id = 1;</code> */ public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getContextIdFieldBuilder().getBuilder(); } @@ -5118,6 +4900,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } name_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -5128,6 +4911,7 @@ public final class ContextOuterClass { */ public Builder clearName() { name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -5143,6 +4927,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); name_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -5150,9 +4935,9 @@ public final class ContextOuterClass { private java.util.List<context.ContextOuterClass.TopologyId> topologyIds_ = java.util.Collections.emptyList(); private void ensureTopologyIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!((bitField0_ & 0x00000004) != 0)) { topologyIds_ = new java.util.ArrayList<context.ContextOuterClass.TopologyId>(topologyIds_); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000004; } } @@ -5304,7 +5089,7 @@ public final class ContextOuterClass { public Builder clearTopologyIds() { if (topologyIdsBuilder_ == null) { topologyIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { topologyIdsBuilder_.clear(); @@ -5378,7 +5163,7 @@ public final class ContextOuterClass { private com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.TopologyId, context.ContextOuterClass.TopologyId.Builder, context.ContextOuterClass.TopologyIdOrBuilder> getTopologyIdsFieldBuilder() { if (topologyIdsBuilder_ == null) { - topologyIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.TopologyId, context.ContextOuterClass.TopologyId.Builder, context.ContextOuterClass.TopologyIdOrBuilder>(topologyIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + topologyIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.TopologyId, context.ContextOuterClass.TopologyId.Builder, context.ContextOuterClass.TopologyIdOrBuilder>(topologyIds_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); topologyIds_ = null; } return topologyIdsBuilder_; @@ -5387,9 +5172,9 @@ public final class ContextOuterClass { private java.util.List<context.ContextOuterClass.ServiceId> serviceIds_ = java.util.Collections.emptyList(); private void ensureServiceIdsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { + if (!((bitField0_ & 0x00000008) != 0)) { serviceIds_ = new java.util.ArrayList<context.ContextOuterClass.ServiceId>(serviceIds_); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000008; } } @@ -5541,7 +5326,7 @@ public final class ContextOuterClass { public Builder clearServiceIds() { if (serviceIdsBuilder_ == null) { serviceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { serviceIdsBuilder_.clear(); @@ -5615,7 +5400,7 @@ public final class ContextOuterClass { private com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder> getServiceIdsFieldBuilder() { if (serviceIdsBuilder_ == null) { - serviceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder>(serviceIds_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + serviceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder>(serviceIds_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); serviceIds_ = null; } return serviceIdsBuilder_; @@ -5624,9 +5409,9 @@ public final class ContextOuterClass { private java.util.List<context.ContextOuterClass.SliceId> sliceIds_ = java.util.Collections.emptyList(); private void ensureSliceIdsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { + if (!((bitField0_ & 0x00000010) != 0)) { sliceIds_ = new java.util.ArrayList<context.ContextOuterClass.SliceId>(sliceIds_); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000010; } } @@ -5778,7 +5563,7 @@ public final class ContextOuterClass { public Builder clearSliceIds() { if (sliceIdsBuilder_ == null) { sliceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); } else { sliceIdsBuilder_.clear(); @@ -5852,7 +5637,7 @@ public final class ContextOuterClass { private com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.SliceId, context.ContextOuterClass.SliceId.Builder, context.ContextOuterClass.SliceIdOrBuilder> getSliceIdsFieldBuilder() { if (sliceIdsBuilder_ == null) { - sliceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.SliceId, context.ContextOuterClass.SliceId.Builder, context.ContextOuterClass.SliceIdOrBuilder>(sliceIds_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + sliceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.SliceId, context.ContextOuterClass.SliceId.Builder, context.ContextOuterClass.SliceIdOrBuilder>(sliceIds_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); sliceIds_ = null; } return sliceIdsBuilder_; @@ -5867,7 +5652,7 @@ public final class ContextOuterClass { * @return Whether the controller field is set. */ public boolean hasController() { - return controllerBuilder_ != null || controller_ != null; + return ((bitField0_ & 0x00000020) != 0); } /** @@ -5891,10 +5676,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } controller_ = value; - onChanged(); } else { controllerBuilder_.setMessage(value); } + bitField0_ |= 0x00000020; + onChanged(); return this; } @@ -5904,10 +5690,11 @@ public final class ContextOuterClass { public Builder setController(context.ContextOuterClass.TeraFlowController.Builder builderForValue) { if (controllerBuilder_ == null) { controller_ = builderForValue.build(); - onChanged(); } else { controllerBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000020; + onChanged(); return this; } @@ -5916,15 +5703,16 @@ public final class ContextOuterClass { */ public Builder mergeController(context.ContextOuterClass.TeraFlowController value) { if (controllerBuilder_ == null) { - if (controller_ != null) { - controller_ = context.ContextOuterClass.TeraFlowController.newBuilder(controller_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000020) != 0) && controller_ != null && controller_ != context.ContextOuterClass.TeraFlowController.getDefaultInstance()) { + getControllerBuilder().mergeFrom(value); } else { controller_ = value; } - onChanged(); } else { controllerBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000020; + onChanged(); return this; } @@ -5932,13 +5720,13 @@ public final class ContextOuterClass { * <code>.context.TeraFlowController controller = 6;</code> */ public Builder clearController() { - if (controllerBuilder_ == null) { - controller_ = null; - onChanged(); - } else { - controller_ = null; + bitField0_ = (bitField0_ & ~0x00000020); + controller_ = null; + if (controllerBuilder_ != null) { + controllerBuilder_.dispose(); controllerBuilder_ = null; } + onChanged(); return this; } @@ -5946,6 +5734,7 @@ public final class ContextOuterClass { * <code>.context.TeraFlowController controller = 6;</code> */ public context.ContextOuterClass.TeraFlowController.Builder getControllerBuilder() { + bitField0_ |= 0x00000020; onChanged(); return getControllerFieldBuilder().getBuilder(); } @@ -5999,7 +5788,17 @@ public final class ContextOuterClass { @java.lang.Override public Context parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Context(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -6070,57 +5869,6 @@ public final class ContextOuterClass { return new ContextIdList(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ContextIdList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - contextIds_ = new java.util.ArrayList<context.ContextOuterClass.ContextId>(); - mutable_bitField0_ |= 0x00000001; - } - contextIds_.add(input.readMessage(context.ContextOuterClass.ContextId.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - contextIds_ = java.util.Collections.unmodifiableList(contextIds_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_ContextIdList_descriptor; } @@ -6132,6 +5880,7 @@ public final class ContextOuterClass { public static final int CONTEXT_IDS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.ContextId> contextIds_; /** @@ -6192,7 +5941,7 @@ public final class ContextOuterClass { for (int i = 0; i < contextIds_.size(); i++) { output.writeMessage(1, contextIds_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -6204,7 +5953,7 @@ public final class ContextOuterClass { for (int i = 0; i < contextIds_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, contextIds_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -6220,7 +5969,7 @@ public final class ContextOuterClass { context.ContextOuterClass.ContextIdList other = (context.ContextOuterClass.ContextIdList) obj; if (!getContextIdsList().equals(other.getContextIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -6236,7 +5985,7 @@ public final class ContextOuterClass { hash = (37 * hash) + CONTEXT_IDS_FIELD_NUMBER; hash = (53 * hash) + getContextIdsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -6330,29 +6079,23 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.ContextIdList.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getContextIdsFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (contextIdsBuilder_ == null) { contextIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + contextIds_ = null; contextIdsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -6378,7 +6121,15 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.ContextIdList buildPartial() { context.ContextOuterClass.ContextIdList result = new context.ContextOuterClass.ContextIdList(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.ContextIdList result) { if (contextIdsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { contextIds_ = java.util.Collections.unmodifiableList(contextIds_); @@ -6388,38 +6139,10 @@ public final class ContextOuterClass { } else { result.contextIds_ = contextIdsBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.ContextIdList result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -6459,7 +6182,7 @@ public final class ContextOuterClass { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -6471,17 +6194,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.ContextIdList parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + context.ContextOuterClass.ContextId m = input.readMessage(context.ContextOuterClass.ContextId.parser(), extensionRegistry); + if (contextIdsBuilder_ == null) { + ensureContextIdsIsMutable(); + contextIds_.add(m); + } else { + contextIdsBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ContextIdList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -6751,7 +6504,17 @@ public final class ContextOuterClass { @java.lang.Override public ContextIdList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ContextIdList(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -6822,57 +6585,6 @@ public final class ContextOuterClass { return new ContextList(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ContextList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - contexts_ = new java.util.ArrayList<context.ContextOuterClass.Context>(); - mutable_bitField0_ |= 0x00000001; - } - contexts_.add(input.readMessage(context.ContextOuterClass.Context.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - contexts_ = java.util.Collections.unmodifiableList(contexts_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_ContextList_descriptor; } @@ -6884,6 +6596,7 @@ public final class ContextOuterClass { public static final int CONTEXTS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.Context> contexts_; /** @@ -6944,7 +6657,7 @@ public final class ContextOuterClass { for (int i = 0; i < contexts_.size(); i++) { output.writeMessage(1, contexts_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -6956,7 +6669,7 @@ public final class ContextOuterClass { for (int i = 0; i < contexts_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, contexts_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -6972,7 +6685,7 @@ public final class ContextOuterClass { context.ContextOuterClass.ContextList other = (context.ContextOuterClass.ContextList) obj; if (!getContextsList().equals(other.getContextsList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -6988,7 +6701,7 @@ public final class ContextOuterClass { hash = (37 * hash) + CONTEXTS_FIELD_NUMBER; hash = (53 * hash) + getContextsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -7082,29 +6795,23 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.ContextList.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getContextsFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (contextsBuilder_ == null) { contexts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + contexts_ = null; contextsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -7130,7 +6837,15 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.ContextList buildPartial() { context.ContextOuterClass.ContextList result = new context.ContextOuterClass.ContextList(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.ContextList result) { if (contextsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { contexts_ = java.util.Collections.unmodifiableList(contexts_); @@ -7140,38 +6855,10 @@ public final class ContextOuterClass { } else { result.contexts_ = contextsBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.ContextList result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -7211,7 +6898,7 @@ public final class ContextOuterClass { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -7223,17 +6910,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.ContextList parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + context.ContextOuterClass.Context m = input.readMessage(context.ContextOuterClass.Context.parser(), extensionRegistry); + if (contextsBuilder_ == null) { + ensureContextsIsMutable(); + contexts_.add(m); + } else { + contextsBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ContextList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -7503,7 +7220,17 @@ public final class ContextOuterClass { @java.lang.Override public ContextList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ContextList(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -7582,70 +7309,6 @@ public final class ContextOuterClass { return new ContextEvent(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ContextEvent(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.Event.Builder subBuilder = null; - if (event_ != null) { - subBuilder = event_.toBuilder(); - } - event_ = input.readMessage(context.ContextOuterClass.Event.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(event_); - event_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - context.ContextOuterClass.ContextId.Builder subBuilder = null; - if (contextId_ != null) { - subBuilder = contextId_.toBuilder(); - } - contextId_ = input.readMessage(context.ContextOuterClass.ContextId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(contextId_); - contextId_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_ContextEvent_descriptor; } @@ -7682,7 +7345,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - return getEvent(); + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; } public static final int CONTEXT_ID_FIELD_NUMBER = 2; @@ -7712,7 +7375,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - return getContextId(); + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; } private byte memoizedIsInitialized = -1; @@ -7736,7 +7399,7 @@ public final class ContextOuterClass { if (contextId_ != null) { output.writeMessage(2, getContextId()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -7751,7 +7414,7 @@ public final class ContextOuterClass { if (contextId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getContextId()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -7777,7 +7440,7 @@ public final class ContextOuterClass { if (!getContextId().equals(other.getContextId())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -7797,7 +7460,7 @@ public final class ContextOuterClass { hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER; hash = (53 * hash) + getContextId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -7891,32 +7554,24 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.ContextEvent.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (eventBuilder_ == null) { - event_ = null; - } else { - event_ = null; + bitField0_ = 0; + event_ = null; + if (eventBuilder_ != null) { + eventBuilder_.dispose(); eventBuilder_ = null; } - if (contextIdBuilder_ == null) { - contextId_ = null; - } else { - contextId_ = null; + contextId_ = null; + if (contextIdBuilder_ != null) { + contextIdBuilder_.dispose(); contextIdBuilder_ = null; } return this; @@ -7944,48 +7599,21 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.ContextEvent buildPartial() { context.ContextOuterClass.ContextEvent result = new context.ContextOuterClass.ContextEvent(this); - if (eventBuilder_ == null) { - result.event_ = event_; - } else { - result.event_ = eventBuilder_.build(); - } - if (contextIdBuilder_ == null) { - result.contextId_ = contextId_; - } else { - result.contextId_ = contextIdBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.ContextEvent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.event_ = eventBuilder_ == null ? event_ : eventBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.contextId_ = contextIdBuilder_ == null ? contextId_ : contextIdBuilder_.build(); + } } @java.lang.Override @@ -8007,7 +7635,7 @@ public final class ContextOuterClass { if (other.hasContextId()) { mergeContextId(other.getContextId()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -8019,20 +7647,54 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.ContextEvent parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getEventFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + input.readMessage(getContextIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } + // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ContextEvent) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.Event event_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> eventBuilder_; @@ -8042,7 +7704,7 @@ public final class ContextOuterClass { * @return Whether the event field is set. */ public boolean hasEvent() { - return eventBuilder_ != null || event_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -8066,10 +7728,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } event_ = value; - onChanged(); } else { eventBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -8079,10 +7742,11 @@ public final class ContextOuterClass { public Builder setEvent(context.ContextOuterClass.Event.Builder builderForValue) { if (eventBuilder_ == null) { event_ = builderForValue.build(); - onChanged(); } else { eventBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -8091,15 +7755,16 @@ public final class ContextOuterClass { */ public Builder mergeEvent(context.ContextOuterClass.Event value) { if (eventBuilder_ == null) { - if (event_ != null) { - event_ = context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && event_ != null && event_ != context.ContextOuterClass.Event.getDefaultInstance()) { + getEventBuilder().mergeFrom(value); } else { event_ = value; } - onChanged(); } else { eventBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -8107,13 +7772,13 @@ public final class ContextOuterClass { * <code>.context.Event event = 1;</code> */ public Builder clearEvent() { - if (eventBuilder_ == null) { - event_ = null; - onChanged(); - } else { - event_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + event_ = null; + if (eventBuilder_ != null) { + eventBuilder_.dispose(); eventBuilder_ = null; } + onChanged(); return this; } @@ -8121,6 +7786,7 @@ public final class ContextOuterClass { * <code>.context.Event event = 1;</code> */ public context.ContextOuterClass.Event.Builder getEventBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getEventFieldBuilder().getBuilder(); } @@ -8156,7 +7822,7 @@ public final class ContextOuterClass { * @return Whether the contextId field is set. */ public boolean hasContextId() { - return contextIdBuilder_ != null || contextId_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** @@ -8180,10 +7846,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } contextId_ = value; - onChanged(); } else { contextIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -8193,10 +7860,11 @@ public final class ContextOuterClass { public Builder setContextId(context.ContextOuterClass.ContextId.Builder builderForValue) { if (contextIdBuilder_ == null) { contextId_ = builderForValue.build(); - onChanged(); } else { contextIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -8205,15 +7873,16 @@ public final class ContextOuterClass { */ public Builder mergeContextId(context.ContextOuterClass.ContextId value) { if (contextIdBuilder_ == null) { - if (contextId_ != null) { - contextId_ = context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000002) != 0) && contextId_ != null && contextId_ != context.ContextOuterClass.ContextId.getDefaultInstance()) { + getContextIdBuilder().mergeFrom(value); } else { contextId_ = value; } - onChanged(); } else { contextIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -8221,13 +7890,13 @@ public final class ContextOuterClass { * <code>.context.ContextId context_id = 2;</code> */ public Builder clearContextId() { - if (contextIdBuilder_ == null) { - contextId_ = null; - onChanged(); - } else { - contextId_ = null; + bitField0_ = (bitField0_ & ~0x00000002); + contextId_ = null; + if (contextIdBuilder_ != null) { + contextIdBuilder_.dispose(); contextIdBuilder_ = null; } + onChanged(); return this; } @@ -8235,6 +7904,7 @@ public final class ContextOuterClass { * <code>.context.ContextId context_id = 2;</code> */ public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { + bitField0_ |= 0x00000002; onChanged(); return getContextIdFieldBuilder().getBuilder(); } @@ -8288,7 +7958,17 @@ public final class ContextOuterClass { @java.lang.Override public ContextEvent parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ContextEvent(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -8371,70 +8051,6 @@ public final class ContextOuterClass { return new TopologyId(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TopologyId(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.ContextId.Builder subBuilder = null; - if (contextId_ != null) { - subBuilder = contextId_.toBuilder(); - } - contextId_ = input.readMessage(context.ContextOuterClass.ContextId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(contextId_); - contextId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - context.ContextOuterClass.Uuid.Builder subBuilder = null; - if (topologyUuid_ != null) { - subBuilder = topologyUuid_.toBuilder(); - } - topologyUuid_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(topologyUuid_); - topologyUuid_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_TopologyId_descriptor; } @@ -8471,7 +8087,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - return getContextId(); + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; } public static final int TOPOLOGY_UUID_FIELD_NUMBER = 2; @@ -8501,7 +8117,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.UuidOrBuilder getTopologyUuidOrBuilder() { - return getTopologyUuid(); + return topologyUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : topologyUuid_; } private byte memoizedIsInitialized = -1; @@ -8525,7 +8141,7 @@ public final class ContextOuterClass { if (topologyUuid_ != null) { output.writeMessage(2, getTopologyUuid()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -8540,7 +8156,7 @@ public final class ContextOuterClass { if (topologyUuid_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTopologyUuid()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -8566,7 +8182,7 @@ public final class ContextOuterClass { if (!getTopologyUuid().equals(other.getTopologyUuid())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -8586,7 +8202,7 @@ public final class ContextOuterClass { hash = (37 * hash) + TOPOLOGY_UUID_FIELD_NUMBER; hash = (53 * hash) + getTopologyUuid().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -8684,32 +8300,24 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.TopologyId.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (contextIdBuilder_ == null) { - contextId_ = null; - } else { - contextId_ = null; + bitField0_ = 0; + contextId_ = null; + if (contextIdBuilder_ != null) { + contextIdBuilder_.dispose(); contextIdBuilder_ = null; } - if (topologyUuidBuilder_ == null) { - topologyUuid_ = null; - } else { - topologyUuid_ = null; + topologyUuid_ = null; + if (topologyUuidBuilder_ != null) { + topologyUuidBuilder_.dispose(); topologyUuidBuilder_ = null; } return this; @@ -8737,48 +8345,21 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.TopologyId buildPartial() { context.ContextOuterClass.TopologyId result = new context.ContextOuterClass.TopologyId(this); - if (contextIdBuilder_ == null) { - result.contextId_ = contextId_; - } else { - result.contextId_ = contextIdBuilder_.build(); - } - if (topologyUuidBuilder_ == null) { - result.topologyUuid_ = topologyUuid_; - } else { - result.topologyUuid_ = topologyUuidBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.TopologyId result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.contextId_ = contextIdBuilder_ == null ? contextId_ : contextIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.topologyUuid_ = topologyUuidBuilder_ == null ? topologyUuid_ : topologyUuidBuilder_.build(); + } } @java.lang.Override @@ -8800,7 +8381,7 @@ public final class ContextOuterClass { if (other.hasTopologyUuid()) { mergeTopologyUuid(other.getTopologyUuid()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -8812,20 +8393,54 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.TopologyId parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getContextIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + input.readMessage(getTopologyUuidFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } + // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.TopologyId) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.ContextId contextId_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> contextIdBuilder_; @@ -8835,7 +8450,7 @@ public final class ContextOuterClass { * @return Whether the contextId field is set. */ public boolean hasContextId() { - return contextIdBuilder_ != null || contextId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -8859,10 +8474,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } contextId_ = value; - onChanged(); } else { contextIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -8872,10 +8488,11 @@ public final class ContextOuterClass { public Builder setContextId(context.ContextOuterClass.ContextId.Builder builderForValue) { if (contextIdBuilder_ == null) { contextId_ = builderForValue.build(); - onChanged(); } else { contextIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -8884,15 +8501,16 @@ public final class ContextOuterClass { */ public Builder mergeContextId(context.ContextOuterClass.ContextId value) { if (contextIdBuilder_ == null) { - if (contextId_ != null) { - contextId_ = context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && contextId_ != null && contextId_ != context.ContextOuterClass.ContextId.getDefaultInstance()) { + getContextIdBuilder().mergeFrom(value); } else { contextId_ = value; } - onChanged(); } else { contextIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -8900,13 +8518,13 @@ public final class ContextOuterClass { * <code>.context.ContextId context_id = 1;</code> */ public Builder clearContextId() { - if (contextIdBuilder_ == null) { - contextId_ = null; - onChanged(); - } else { - contextId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + contextId_ = null; + if (contextIdBuilder_ != null) { + contextIdBuilder_.dispose(); contextIdBuilder_ = null; } + onChanged(); return this; } @@ -8914,6 +8532,7 @@ public final class ContextOuterClass { * <code>.context.ContextId context_id = 1;</code> */ public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getContextIdFieldBuilder().getBuilder(); } @@ -8949,7 +8568,7 @@ public final class ContextOuterClass { * @return Whether the topologyUuid field is set. */ public boolean hasTopologyUuid() { - return topologyUuidBuilder_ != null || topologyUuid_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** @@ -8973,10 +8592,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } topologyUuid_ = value; - onChanged(); } else { topologyUuidBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -8986,10 +8606,11 @@ public final class ContextOuterClass { public Builder setTopologyUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { if (topologyUuidBuilder_ == null) { topologyUuid_ = builderForValue.build(); - onChanged(); } else { topologyUuidBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -8998,15 +8619,16 @@ public final class ContextOuterClass { */ public Builder mergeTopologyUuid(context.ContextOuterClass.Uuid value) { if (topologyUuidBuilder_ == null) { - if (topologyUuid_ != null) { - topologyUuid_ = context.ContextOuterClass.Uuid.newBuilder(topologyUuid_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000002) != 0) && topologyUuid_ != null && topologyUuid_ != context.ContextOuterClass.Uuid.getDefaultInstance()) { + getTopologyUuidBuilder().mergeFrom(value); } else { topologyUuid_ = value; } - onChanged(); } else { topologyUuidBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -9014,13 +8636,13 @@ public final class ContextOuterClass { * <code>.context.Uuid topology_uuid = 2;</code> */ public Builder clearTopologyUuid() { - if (topologyUuidBuilder_ == null) { - topologyUuid_ = null; - onChanged(); - } else { - topologyUuid_ = null; + bitField0_ = (bitField0_ & ~0x00000002); + topologyUuid_ = null; + if (topologyUuidBuilder_ != null) { + topologyUuidBuilder_.dispose(); topologyUuidBuilder_ = null; } + onChanged(); return this; } @@ -9028,6 +8650,7 @@ public final class ContextOuterClass { * <code>.context.Uuid topology_uuid = 2;</code> */ public context.ContextOuterClass.Uuid.Builder getTopologyUuidBuilder() { + bitField0_ |= 0x00000002; onChanged(); return getTopologyUuidFieldBuilder().getBuilder(); } @@ -9081,7 +8704,17 @@ public final class ContextOuterClass { @java.lang.Override public TopologyId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TopologyId(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -9208,88 +8841,6 @@ public final class ContextOuterClass { return new Topology(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Topology(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.TopologyId.Builder subBuilder = null; - if (topologyId_ != null) { - subBuilder = topologyId_.toBuilder(); - } - topologyId_ = input.readMessage(context.ContextOuterClass.TopologyId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(topologyId_); - topologyId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - name_ = s; - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - deviceIds_ = new java.util.ArrayList<context.ContextOuterClass.DeviceId>(); - mutable_bitField0_ |= 0x00000001; - } - deviceIds_.add(input.readMessage(context.ContextOuterClass.DeviceId.parser(), extensionRegistry)); - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - linkIds_ = new java.util.ArrayList<context.ContextOuterClass.LinkId>(); - mutable_bitField0_ |= 0x00000002; - } - linkIds_.add(input.readMessage(context.ContextOuterClass.LinkId.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - deviceIds_ = java.util.Collections.unmodifiableList(deviceIds_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - linkIds_ = java.util.Collections.unmodifiableList(linkIds_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_Topology_descriptor; } @@ -9326,12 +8877,13 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { - return getTopologyId(); + return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; } public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** * <code>string name = 2;</code> @@ -9368,6 +8920,7 @@ public final class ContextOuterClass { public static final int DEVICE_IDS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.DeviceId> deviceIds_; /** @@ -9412,6 +8965,7 @@ public final class ContextOuterClass { public static final int LINK_IDS_FIELD_NUMBER = 4; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.LinkId> linkIds_; /** @@ -9472,7 +9026,7 @@ public final class ContextOuterClass { if (topologyId_ != null) { output.writeMessage(1, getTopologyId()); } - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); } for (int i = 0; i < deviceIds_.size(); i++) { @@ -9481,7 +9035,7 @@ public final class ContextOuterClass { for (int i = 0; i < linkIds_.size(); i++) { output.writeMessage(4, linkIds_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -9493,7 +9047,7 @@ public final class ContextOuterClass { if (topologyId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTopologyId()); } - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); } for (int i = 0; i < deviceIds_.size(); i++) { @@ -9502,7 +9056,7 @@ public final class ContextOuterClass { for (int i = 0; i < linkIds_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, linkIds_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -9528,7 +9082,7 @@ public final class ContextOuterClass { return false; if (!getLinkIdsList().equals(other.getLinkIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -9554,7 +9108,7 @@ public final class ContextOuterClass { hash = (37 * hash) + LINK_IDS_FIELD_NUMBER; hash = (53 * hash) + getLinkIdsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -9648,43 +9202,36 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.Topology.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getDeviceIdsFieldBuilder(); - getLinkIdsFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); - if (topologyIdBuilder_ == null) { - topologyId_ = null; - } else { - topologyId_ = null; + bitField0_ = 0; + topologyId_ = null; + if (topologyIdBuilder_ != null) { + topologyIdBuilder_.dispose(); topologyIdBuilder_ = null; } name_ = ""; if (deviceIdsBuilder_ == null) { deviceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + deviceIds_ = null; deviceIdsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); if (linkIdsBuilder_ == null) { linkIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + linkIds_ = null; linkIdsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -9710,63 +9257,43 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.Topology buildPartial() { context.ContextOuterClass.Topology result = new context.ContextOuterClass.Topology(this); - int from_bitField0_ = bitField0_; - if (topologyIdBuilder_ == null) { - result.topologyId_ = topologyId_; - } else { - result.topologyId_ = topologyIdBuilder_.build(); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); } - result.name_ = name_; + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.Topology result) { if (deviceIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { deviceIds_ = java.util.Collections.unmodifiableList(deviceIds_); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); } result.deviceIds_ = deviceIds_; } else { result.deviceIds_ = deviceIdsBuilder_.build(); } if (linkIdsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000008) != 0)) { linkIds_ = java.util.Collections.unmodifiableList(linkIds_); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); } result.linkIds_ = linkIds_; } else { result.linkIds_ = linkIdsBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); } - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.Topology result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.topologyId_ = topologyIdBuilder_ == null ? topologyId_ : topologyIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } } @java.lang.Override @@ -9787,13 +9314,14 @@ public final class ContextOuterClass { } if (!other.getName().isEmpty()) { name_ = other.name_; + bitField0_ |= 0x00000002; onChanged(); } if (deviceIdsBuilder_ == null) { if (!other.deviceIds_.isEmpty()) { if (deviceIds_.isEmpty()) { deviceIds_ = other.deviceIds_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); } else { ensureDeviceIdsIsMutable(); deviceIds_.addAll(other.deviceIds_); @@ -9806,7 +9334,7 @@ public final class ContextOuterClass { deviceIdsBuilder_.dispose(); deviceIdsBuilder_ = null; deviceIds_ = other.deviceIds_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); deviceIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getDeviceIdsFieldBuilder() : null; } else { deviceIdsBuilder_.addAllMessages(other.deviceIds_); @@ -9817,7 +9345,7 @@ public final class ContextOuterClass { if (!other.linkIds_.isEmpty()) { if (linkIds_.isEmpty()) { linkIds_ = other.linkIds_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); } else { ensureLinkIdsIsMutable(); linkIds_.addAll(other.linkIds_); @@ -9830,14 +9358,14 @@ public final class ContextOuterClass { linkIdsBuilder_.dispose(); linkIdsBuilder_ = null; linkIds_ = other.linkIds_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); linkIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLinkIdsFieldBuilder() : null; } else { linkIdsBuilder_.addAllMessages(other.linkIds_); } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -9849,17 +9377,73 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.Topology parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getTopologyIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 26: + { + context.ContextOuterClass.DeviceId m = input.readMessage(context.ContextOuterClass.DeviceId.parser(), extensionRegistry); + if (deviceIdsBuilder_ == null) { + ensureDeviceIdsIsMutable(); + deviceIds_.add(m); + } else { + deviceIdsBuilder_.addMessage(m); + } + break; + } + // case 26 + case 34: + { + context.ContextOuterClass.LinkId m = input.readMessage(context.ContextOuterClass.LinkId.parser(), extensionRegistry); + if (linkIdsBuilder_ == null) { + ensureLinkIdsIsMutable(); + linkIds_.add(m); + } else { + linkIdsBuilder_.addMessage(m); + } + break; + } + // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Topology) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -9874,7 +9458,7 @@ public final class ContextOuterClass { * @return Whether the topologyId field is set. */ public boolean hasTopologyId() { - return topologyIdBuilder_ != null || topologyId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -9898,10 +9482,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } topologyId_ = value; - onChanged(); } else { topologyIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -9911,10 +9496,11 @@ public final class ContextOuterClass { public Builder setTopologyId(context.ContextOuterClass.TopologyId.Builder builderForValue) { if (topologyIdBuilder_ == null) { topologyId_ = builderForValue.build(); - onChanged(); } else { topologyIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -9923,15 +9509,16 @@ public final class ContextOuterClass { */ public Builder mergeTopologyId(context.ContextOuterClass.TopologyId value) { if (topologyIdBuilder_ == null) { - if (topologyId_ != null) { - topologyId_ = context.ContextOuterClass.TopologyId.newBuilder(topologyId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && topologyId_ != null && topologyId_ != context.ContextOuterClass.TopologyId.getDefaultInstance()) { + getTopologyIdBuilder().mergeFrom(value); } else { topologyId_ = value; } - onChanged(); } else { topologyIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -9939,13 +9526,13 @@ public final class ContextOuterClass { * <code>.context.TopologyId topology_id = 1;</code> */ public Builder clearTopologyId() { - if (topologyIdBuilder_ == null) { - topologyId_ = null; - onChanged(); - } else { - topologyId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + topologyId_ = null; + if (topologyIdBuilder_ != null) { + topologyIdBuilder_.dispose(); topologyIdBuilder_ = null; } + onChanged(); return this; } @@ -9953,6 +9540,7 @@ public final class ContextOuterClass { * <code>.context.TopologyId topology_id = 1;</code> */ public context.ContextOuterClass.TopologyId.Builder getTopologyIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getTopologyIdFieldBuilder().getBuilder(); } @@ -10022,6 +9610,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } name_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -10032,6 +9621,7 @@ public final class ContextOuterClass { */ public Builder clearName() { name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -10047,6 +9637,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); name_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -10054,9 +9645,9 @@ public final class ContextOuterClass { private java.util.List<context.ContextOuterClass.DeviceId> deviceIds_ = java.util.Collections.emptyList(); private void ensureDeviceIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!((bitField0_ & 0x00000004) != 0)) { deviceIds_ = new java.util.ArrayList<context.ContextOuterClass.DeviceId>(deviceIds_); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000004; } } @@ -10208,7 +9799,7 @@ public final class ContextOuterClass { public Builder clearDeviceIds() { if (deviceIdsBuilder_ == null) { deviceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { deviceIdsBuilder_.clear(); @@ -10282,7 +9873,7 @@ public final class ContextOuterClass { private com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> getDeviceIdsFieldBuilder() { if (deviceIdsBuilder_ == null) { - deviceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder>(deviceIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + deviceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder>(deviceIds_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); deviceIds_ = null; } return deviceIdsBuilder_; @@ -10291,9 +9882,9 @@ public final class ContextOuterClass { private java.util.List<context.ContextOuterClass.LinkId> linkIds_ = java.util.Collections.emptyList(); private void ensureLinkIdsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { + if (!((bitField0_ & 0x00000008) != 0)) { linkIds_ = new java.util.ArrayList<context.ContextOuterClass.LinkId>(linkIds_); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000008; } } @@ -10445,7 +10036,7 @@ public final class ContextOuterClass { public Builder clearLinkIds() { if (linkIdsBuilder_ == null) { linkIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { linkIdsBuilder_.clear(); @@ -10519,7 +10110,7 @@ public final class ContextOuterClass { private com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.LinkId, context.ContextOuterClass.LinkId.Builder, context.ContextOuterClass.LinkIdOrBuilder> getLinkIdsFieldBuilder() { if (linkIdsBuilder_ == null) { - linkIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.LinkId, context.ContextOuterClass.LinkId.Builder, context.ContextOuterClass.LinkIdOrBuilder>(linkIds_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + linkIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.LinkId, context.ContextOuterClass.LinkId.Builder, context.ContextOuterClass.LinkIdOrBuilder>(linkIds_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); linkIds_ = null; } return linkIdsBuilder_; @@ -10552,7 +10143,17 @@ public final class ContextOuterClass { @java.lang.Override public Topology parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Topology(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -10679,88 +10280,6 @@ public final class ContextOuterClass { return new TopologyDetails(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TopologyDetails(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.TopologyId.Builder subBuilder = null; - if (topologyId_ != null) { - subBuilder = topologyId_.toBuilder(); - } - topologyId_ = input.readMessage(context.ContextOuterClass.TopologyId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(topologyId_); - topologyId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - name_ = s; - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - devices_ = new java.util.ArrayList<context.ContextOuterClass.Device>(); - mutable_bitField0_ |= 0x00000001; - } - devices_.add(input.readMessage(context.ContextOuterClass.Device.parser(), extensionRegistry)); - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - links_ = new java.util.ArrayList<context.ContextOuterClass.Link>(); - mutable_bitField0_ |= 0x00000002; - } - links_.add(input.readMessage(context.ContextOuterClass.Link.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - devices_ = java.util.Collections.unmodifiableList(devices_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - links_ = java.util.Collections.unmodifiableList(links_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_TopologyDetails_descriptor; } @@ -10797,12 +10316,13 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { - return getTopologyId(); + return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; } public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** * <code>string name = 2;</code> @@ -10839,6 +10359,7 @@ public final class ContextOuterClass { public static final int DEVICES_FIELD_NUMBER = 3; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.Device> devices_; /** @@ -10883,6 +10404,7 @@ public final class ContextOuterClass { public static final int LINKS_FIELD_NUMBER = 4; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.Link> links_; /** @@ -10943,7 +10465,7 @@ public final class ContextOuterClass { if (topologyId_ != null) { output.writeMessage(1, getTopologyId()); } - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); } for (int i = 0; i < devices_.size(); i++) { @@ -10952,7 +10474,7 @@ public final class ContextOuterClass { for (int i = 0; i < links_.size(); i++) { output.writeMessage(4, links_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -10964,7 +10486,7 @@ public final class ContextOuterClass { if (topologyId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTopologyId()); } - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); } for (int i = 0; i < devices_.size(); i++) { @@ -10973,7 +10495,7 @@ public final class ContextOuterClass { for (int i = 0; i < links_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, links_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -10999,7 +10521,7 @@ public final class ContextOuterClass { return false; if (!getLinksList().equals(other.getLinksList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -11025,7 +10547,7 @@ public final class ContextOuterClass { hash = (37 * hash) + LINKS_FIELD_NUMBER; hash = (53 * hash) + getLinksList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -11119,43 +10641,36 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.TopologyDetails.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getDevicesFieldBuilder(); - getLinksFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); - if (topologyIdBuilder_ == null) { - topologyId_ = null; - } else { - topologyId_ = null; + bitField0_ = 0; + topologyId_ = null; + if (topologyIdBuilder_ != null) { + topologyIdBuilder_.dispose(); topologyIdBuilder_ = null; } name_ = ""; if (devicesBuilder_ == null) { devices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + devices_ = null; devicesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); if (linksBuilder_ == null) { links_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + links_ = null; linksBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -11181,63 +10696,43 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.TopologyDetails buildPartial() { context.ContextOuterClass.TopologyDetails result = new context.ContextOuterClass.TopologyDetails(this); - int from_bitField0_ = bitField0_; - if (topologyIdBuilder_ == null) { - result.topologyId_ = topologyId_; - } else { - result.topologyId_ = topologyIdBuilder_.build(); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); } - result.name_ = name_; + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.TopologyDetails result) { if (devicesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { devices_ = java.util.Collections.unmodifiableList(devices_); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); } result.devices_ = devices_; } else { result.devices_ = devicesBuilder_.build(); } if (linksBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000008) != 0)) { links_ = java.util.Collections.unmodifiableList(links_); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); } result.links_ = links_; } else { result.links_ = linksBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); } - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.TopologyDetails result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.topologyId_ = topologyIdBuilder_ == null ? topologyId_ : topologyIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } } @java.lang.Override @@ -11258,13 +10753,14 @@ public final class ContextOuterClass { } if (!other.getName().isEmpty()) { name_ = other.name_; + bitField0_ |= 0x00000002; onChanged(); } if (devicesBuilder_ == null) { if (!other.devices_.isEmpty()) { if (devices_.isEmpty()) { devices_ = other.devices_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); } else { ensureDevicesIsMutable(); devices_.addAll(other.devices_); @@ -11277,7 +10773,7 @@ public final class ContextOuterClass { devicesBuilder_.dispose(); devicesBuilder_ = null; devices_ = other.devices_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); devicesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getDevicesFieldBuilder() : null; } else { devicesBuilder_.addAllMessages(other.devices_); @@ -11288,7 +10784,7 @@ public final class ContextOuterClass { if (!other.links_.isEmpty()) { if (links_.isEmpty()) { links_ = other.links_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); } else { ensureLinksIsMutable(); links_.addAll(other.links_); @@ -11301,14 +10797,14 @@ public final class ContextOuterClass { linksBuilder_.dispose(); linksBuilder_ = null; links_ = other.links_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); linksBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLinksFieldBuilder() : null; } else { linksBuilder_.addAllMessages(other.links_); } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -11320,17 +10816,73 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.TopologyDetails parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getTopologyIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 26: + { + context.ContextOuterClass.Device m = input.readMessage(context.ContextOuterClass.Device.parser(), extensionRegistry); + if (devicesBuilder_ == null) { + ensureDevicesIsMutable(); + devices_.add(m); + } else { + devicesBuilder_.addMessage(m); + } + break; + } + // case 26 + case 34: + { + context.ContextOuterClass.Link m = input.readMessage(context.ContextOuterClass.Link.parser(), extensionRegistry); + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.add(m); + } else { + linksBuilder_.addMessage(m); + } + break; + } + // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.TopologyDetails) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -11345,7 +10897,7 @@ public final class ContextOuterClass { * @return Whether the topologyId field is set. */ public boolean hasTopologyId() { - return topologyIdBuilder_ != null || topologyId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -11369,10 +10921,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } topologyId_ = value; - onChanged(); } else { topologyIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -11382,10 +10935,11 @@ public final class ContextOuterClass { public Builder setTopologyId(context.ContextOuterClass.TopologyId.Builder builderForValue) { if (topologyIdBuilder_ == null) { topologyId_ = builderForValue.build(); - onChanged(); } else { topologyIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -11394,15 +10948,16 @@ public final class ContextOuterClass { */ public Builder mergeTopologyId(context.ContextOuterClass.TopologyId value) { if (topologyIdBuilder_ == null) { - if (topologyId_ != null) { - topologyId_ = context.ContextOuterClass.TopologyId.newBuilder(topologyId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && topologyId_ != null && topologyId_ != context.ContextOuterClass.TopologyId.getDefaultInstance()) { + getTopologyIdBuilder().mergeFrom(value); } else { topologyId_ = value; } - onChanged(); } else { topologyIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -11410,13 +10965,13 @@ public final class ContextOuterClass { * <code>.context.TopologyId topology_id = 1;</code> */ public Builder clearTopologyId() { - if (topologyIdBuilder_ == null) { - topologyId_ = null; - onChanged(); - } else { - topologyId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + topologyId_ = null; + if (topologyIdBuilder_ != null) { + topologyIdBuilder_.dispose(); topologyIdBuilder_ = null; } + onChanged(); return this; } @@ -11424,6 +10979,7 @@ public final class ContextOuterClass { * <code>.context.TopologyId topology_id = 1;</code> */ public context.ContextOuterClass.TopologyId.Builder getTopologyIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getTopologyIdFieldBuilder().getBuilder(); } @@ -11493,6 +11049,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } name_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -11503,6 +11060,7 @@ public final class ContextOuterClass { */ public Builder clearName() { name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -11518,6 +11076,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); name_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -11525,9 +11084,9 @@ public final class ContextOuterClass { private java.util.List<context.ContextOuterClass.Device> devices_ = java.util.Collections.emptyList(); private void ensureDevicesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!((bitField0_ & 0x00000004) != 0)) { devices_ = new java.util.ArrayList<context.ContextOuterClass.Device>(devices_); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000004; } } @@ -11679,7 +11238,7 @@ public final class ContextOuterClass { public Builder clearDevices() { if (devicesBuilder_ == null) { devices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { devicesBuilder_.clear(); @@ -11753,7 +11312,7 @@ public final class ContextOuterClass { private com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.Device, context.ContextOuterClass.Device.Builder, context.ContextOuterClass.DeviceOrBuilder> getDevicesFieldBuilder() { if (devicesBuilder_ == null) { - devicesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.Device, context.ContextOuterClass.Device.Builder, context.ContextOuterClass.DeviceOrBuilder>(devices_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + devicesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.Device, context.ContextOuterClass.Device.Builder, context.ContextOuterClass.DeviceOrBuilder>(devices_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); devices_ = null; } return devicesBuilder_; @@ -11762,9 +11321,9 @@ public final class ContextOuterClass { private java.util.List<context.ContextOuterClass.Link> links_ = java.util.Collections.emptyList(); private void ensureLinksIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { + if (!((bitField0_ & 0x00000008) != 0)) { links_ = new java.util.ArrayList<context.ContextOuterClass.Link>(links_); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000008; } } @@ -11916,7 +11475,7 @@ public final class ContextOuterClass { public Builder clearLinks() { if (linksBuilder_ == null) { links_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { linksBuilder_.clear(); @@ -11990,7 +11549,7 @@ public final class ContextOuterClass { private com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.Link, context.ContextOuterClass.Link.Builder, context.ContextOuterClass.LinkOrBuilder> getLinksFieldBuilder() { if (linksBuilder_ == null) { - linksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.Link, context.ContextOuterClass.Link.Builder, context.ContextOuterClass.LinkOrBuilder>(links_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + linksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.Link, context.ContextOuterClass.Link.Builder, context.ContextOuterClass.LinkOrBuilder>(links_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); links_ = null; } return linksBuilder_; @@ -12023,7 +11582,17 @@ public final class ContextOuterClass { @java.lang.Override public TopologyDetails parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TopologyDetails(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -12094,57 +11663,6 @@ public final class ContextOuterClass { return new TopologyIdList(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TopologyIdList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - topologyIds_ = new java.util.ArrayList<context.ContextOuterClass.TopologyId>(); - mutable_bitField0_ |= 0x00000001; - } - topologyIds_.add(input.readMessage(context.ContextOuterClass.TopologyId.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - topologyIds_ = java.util.Collections.unmodifiableList(topologyIds_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_TopologyIdList_descriptor; } @@ -12156,6 +11674,7 @@ public final class ContextOuterClass { public static final int TOPOLOGY_IDS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.TopologyId> topologyIds_; /** @@ -12216,7 +11735,7 @@ public final class ContextOuterClass { for (int i = 0; i < topologyIds_.size(); i++) { output.writeMessage(1, topologyIds_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -12228,7 +11747,7 @@ public final class ContextOuterClass { for (int i = 0; i < topologyIds_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, topologyIds_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -12244,7 +11763,7 @@ public final class ContextOuterClass { context.ContextOuterClass.TopologyIdList other = (context.ContextOuterClass.TopologyIdList) obj; if (!getTopologyIdsList().equals(other.getTopologyIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -12260,7 +11779,7 @@ public final class ContextOuterClass { hash = (37 * hash) + TOPOLOGY_IDS_FIELD_NUMBER; hash = (53 * hash) + getTopologyIdsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -12354,29 +11873,23 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.TopologyIdList.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getTopologyIdsFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (topologyIdsBuilder_ == null) { topologyIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + topologyIds_ = null; topologyIdsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -12402,7 +11915,15 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.TopologyIdList buildPartial() { context.ContextOuterClass.TopologyIdList result = new context.ContextOuterClass.TopologyIdList(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.TopologyIdList result) { if (topologyIdsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { topologyIds_ = java.util.Collections.unmodifiableList(topologyIds_); @@ -12412,38 +11933,10 @@ public final class ContextOuterClass { } else { result.topologyIds_ = topologyIdsBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); } - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.TopologyIdList result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -12483,7 +11976,7 @@ public final class ContextOuterClass { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -12495,17 +11988,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.TopologyIdList parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + context.ContextOuterClass.TopologyId m = input.readMessage(context.ContextOuterClass.TopologyId.parser(), extensionRegistry); + if (topologyIdsBuilder_ == null) { + ensureTopologyIdsIsMutable(); + topologyIds_.add(m); + } else { + topologyIdsBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.TopologyIdList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -12775,7 +12298,17 @@ public final class ContextOuterClass { @java.lang.Override public TopologyIdList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TopologyIdList(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -12846,57 +12379,6 @@ public final class ContextOuterClass { return new TopologyList(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TopologyList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - topologies_ = new java.util.ArrayList<context.ContextOuterClass.Topology>(); - mutable_bitField0_ |= 0x00000001; - } - topologies_.add(input.readMessage(context.ContextOuterClass.Topology.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - topologies_ = java.util.Collections.unmodifiableList(topologies_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_TopologyList_descriptor; } @@ -12908,6 +12390,7 @@ public final class ContextOuterClass { public static final int TOPOLOGIES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.Topology> topologies_; /** @@ -12968,7 +12451,7 @@ public final class ContextOuterClass { for (int i = 0; i < topologies_.size(); i++) { output.writeMessage(1, topologies_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -12980,7 +12463,7 @@ public final class ContextOuterClass { for (int i = 0; i < topologies_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, topologies_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -12996,7 +12479,7 @@ public final class ContextOuterClass { context.ContextOuterClass.TopologyList other = (context.ContextOuterClass.TopologyList) obj; if (!getTopologiesList().equals(other.getTopologiesList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -13012,7 +12495,7 @@ public final class ContextOuterClass { hash = (37 * hash) + TOPOLOGIES_FIELD_NUMBER; hash = (53 * hash) + getTopologiesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -13106,29 +12589,23 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.TopologyList.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getTopologiesFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (topologiesBuilder_ == null) { topologies_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + topologies_ = null; topologiesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -13154,7 +12631,15 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.TopologyList buildPartial() { context.ContextOuterClass.TopologyList result = new context.ContextOuterClass.TopologyList(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.TopologyList result) { if (topologiesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { topologies_ = java.util.Collections.unmodifiableList(topologies_); @@ -13164,38 +12649,10 @@ public final class ContextOuterClass { } else { result.topologies_ = topologiesBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); } - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.TopologyList result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -13235,7 +12692,7 @@ public final class ContextOuterClass { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -13247,17 +12704,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.TopologyList parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + context.ContextOuterClass.Topology m = input.readMessage(context.ContextOuterClass.Topology.parser(), extensionRegistry); + if (topologiesBuilder_ == null) { + ensureTopologiesIsMutable(); + topologies_.add(m); + } else { + topologiesBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.TopologyList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -13527,7 +13014,17 @@ public final class ContextOuterClass { @java.lang.Override public TopologyList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TopologyList(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -13606,70 +13103,6 @@ public final class ContextOuterClass { return new TopologyEvent(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TopologyEvent(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.Event.Builder subBuilder = null; - if (event_ != null) { - subBuilder = event_.toBuilder(); - } - event_ = input.readMessage(context.ContextOuterClass.Event.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(event_); - event_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - context.ContextOuterClass.TopologyId.Builder subBuilder = null; - if (topologyId_ != null) { - subBuilder = topologyId_.toBuilder(); - } - topologyId_ = input.readMessage(context.ContextOuterClass.TopologyId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(topologyId_); - topologyId_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_TopologyEvent_descriptor; } @@ -13706,7 +13139,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - return getEvent(); + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; } public static final int TOPOLOGY_ID_FIELD_NUMBER = 2; @@ -13736,7 +13169,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { - return getTopologyId(); + return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; } private byte memoizedIsInitialized = -1; @@ -13760,7 +13193,7 @@ public final class ContextOuterClass { if (topologyId_ != null) { output.writeMessage(2, getTopologyId()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -13775,7 +13208,7 @@ public final class ContextOuterClass { if (topologyId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getTopologyId()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -13801,7 +13234,7 @@ public final class ContextOuterClass { if (!getTopologyId().equals(other.getTopologyId())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -13821,7 +13254,7 @@ public final class ContextOuterClass { hash = (37 * hash) + TOPOLOGY_ID_FIELD_NUMBER; hash = (53 * hash) + getTopologyId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -13915,32 +13348,24 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.TopologyEvent.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (eventBuilder_ == null) { - event_ = null; - } else { - event_ = null; + bitField0_ = 0; + event_ = null; + if (eventBuilder_ != null) { + eventBuilder_.dispose(); eventBuilder_ = null; } - if (topologyIdBuilder_ == null) { - topologyId_ = null; - } else { - topologyId_ = null; + topologyId_ = null; + if (topologyIdBuilder_ != null) { + topologyIdBuilder_.dispose(); topologyIdBuilder_ = null; } return this; @@ -13968,48 +13393,21 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.TopologyEvent buildPartial() { context.ContextOuterClass.TopologyEvent result = new context.ContextOuterClass.TopologyEvent(this); - if (eventBuilder_ == null) { - result.event_ = event_; - } else { - result.event_ = eventBuilder_.build(); - } - if (topologyIdBuilder_ == null) { - result.topologyId_ = topologyId_; - } else { - result.topologyId_ = topologyIdBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.TopologyEvent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.event_ = eventBuilder_ == null ? event_ : eventBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.topologyId_ = topologyIdBuilder_ == null ? topologyId_ : topologyIdBuilder_.build(); + } } @java.lang.Override @@ -14031,7 +13429,7 @@ public final class ContextOuterClass { if (other.hasTopologyId()) { mergeTopologyId(other.getTopologyId()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -14043,20 +13441,54 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.TopologyEvent parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getEventFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + input.readMessage(getTopologyIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } + // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.TopologyEvent) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.Event event_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> eventBuilder_; @@ -14066,7 +13498,7 @@ public final class ContextOuterClass { * @return Whether the event field is set. */ public boolean hasEvent() { - return eventBuilder_ != null || event_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -14090,10 +13522,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } event_ = value; - onChanged(); } else { eventBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -14103,10 +13536,11 @@ public final class ContextOuterClass { public Builder setEvent(context.ContextOuterClass.Event.Builder builderForValue) { if (eventBuilder_ == null) { event_ = builderForValue.build(); - onChanged(); } else { eventBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -14115,15 +13549,16 @@ public final class ContextOuterClass { */ public Builder mergeEvent(context.ContextOuterClass.Event value) { if (eventBuilder_ == null) { - if (event_ != null) { - event_ = context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && event_ != null && event_ != context.ContextOuterClass.Event.getDefaultInstance()) { + getEventBuilder().mergeFrom(value); } else { event_ = value; } - onChanged(); } else { eventBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -14131,13 +13566,13 @@ public final class ContextOuterClass { * <code>.context.Event event = 1;</code> */ public Builder clearEvent() { - if (eventBuilder_ == null) { - event_ = null; - onChanged(); - } else { - event_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + event_ = null; + if (eventBuilder_ != null) { + eventBuilder_.dispose(); eventBuilder_ = null; } + onChanged(); return this; } @@ -14145,6 +13580,7 @@ public final class ContextOuterClass { * <code>.context.Event event = 1;</code> */ public context.ContextOuterClass.Event.Builder getEventBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getEventFieldBuilder().getBuilder(); } @@ -14180,7 +13616,7 @@ public final class ContextOuterClass { * @return Whether the topologyId field is set. */ public boolean hasTopologyId() { - return topologyIdBuilder_ != null || topologyId_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** @@ -14204,10 +13640,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } topologyId_ = value; - onChanged(); } else { topologyIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -14217,10 +13654,11 @@ public final class ContextOuterClass { public Builder setTopologyId(context.ContextOuterClass.TopologyId.Builder builderForValue) { if (topologyIdBuilder_ == null) { topologyId_ = builderForValue.build(); - onChanged(); } else { topologyIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -14229,15 +13667,16 @@ public final class ContextOuterClass { */ public Builder mergeTopologyId(context.ContextOuterClass.TopologyId value) { if (topologyIdBuilder_ == null) { - if (topologyId_ != null) { - topologyId_ = context.ContextOuterClass.TopologyId.newBuilder(topologyId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000002) != 0) && topologyId_ != null && topologyId_ != context.ContextOuterClass.TopologyId.getDefaultInstance()) { + getTopologyIdBuilder().mergeFrom(value); } else { topologyId_ = value; } - onChanged(); } else { topologyIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -14245,13 +13684,13 @@ public final class ContextOuterClass { * <code>.context.TopologyId topology_id = 2;</code> */ public Builder clearTopologyId() { - if (topologyIdBuilder_ == null) { - topologyId_ = null; - onChanged(); - } else { - topologyId_ = null; + bitField0_ = (bitField0_ & ~0x00000002); + topologyId_ = null; + if (topologyIdBuilder_ != null) { + topologyIdBuilder_.dispose(); topologyIdBuilder_ = null; } + onChanged(); return this; } @@ -14259,6 +13698,7 @@ public final class ContextOuterClass { * <code>.context.TopologyId topology_id = 2;</code> */ public context.ContextOuterClass.TopologyId.Builder getTopologyIdBuilder() { + bitField0_ |= 0x00000002; onChanged(); return getTopologyIdFieldBuilder().getBuilder(); } @@ -14312,7 +13752,17 @@ public final class ContextOuterClass { @java.lang.Override public TopologyEvent parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TopologyEvent(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -14378,57 +13828,6 @@ public final class ContextOuterClass { return new DeviceId(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private DeviceId(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.Uuid.Builder subBuilder = null; - if (deviceUuid_ != null) { - subBuilder = deviceUuid_.toBuilder(); - } - deviceUuid_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deviceUuid_); - deviceUuid_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_DeviceId_descriptor; } @@ -14465,7 +13864,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.UuidOrBuilder getDeviceUuidOrBuilder() { - return getDeviceUuid(); + return deviceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : deviceUuid_; } private byte memoizedIsInitialized = -1; @@ -14486,7 +13885,7 @@ public final class ContextOuterClass { if (deviceUuid_ != null) { output.writeMessage(1, getDeviceUuid()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -14498,7 +13897,7 @@ public final class ContextOuterClass { if (deviceUuid_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDeviceUuid()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -14518,7 +13917,7 @@ public final class ContextOuterClass { if (!getDeviceUuid().equals(other.getDeviceUuid())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -14534,7 +13933,7 @@ public final class ContextOuterClass { hash = (37 * hash) + DEVICE_UUID_FIELD_NUMBER; hash = (53 * hash) + getDeviceUuid().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -14632,26 +14031,19 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.DeviceId.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (deviceUuidBuilder_ == null) { - deviceUuid_ = null; - } else { - deviceUuid_ = null; + bitField0_ = 0; + deviceUuid_ = null; + if (deviceUuidBuilder_ != null) { + deviceUuidBuilder_.dispose(); deviceUuidBuilder_ = null; } return this; @@ -14679,43 +14071,18 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.DeviceId buildPartial() { context.ContextOuterClass.DeviceId result = new context.ContextOuterClass.DeviceId(this); - if (deviceUuidBuilder_ == null) { - result.deviceUuid_ = deviceUuid_; - } else { - result.deviceUuid_ = deviceUuidBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.DeviceId result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.deviceUuid_ = deviceUuidBuilder_ == null ? deviceUuid_ : deviceUuidBuilder_.build(); + } } @java.lang.Override @@ -14734,7 +14101,7 @@ public final class ContextOuterClass { if (other.hasDeviceUuid()) { mergeDeviceUuid(other.getDeviceUuid()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -14746,20 +14113,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.DeviceId parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getDeviceUuidFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.DeviceId) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.Uuid deviceUuid_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> deviceUuidBuilder_; @@ -14769,7 +14163,7 @@ public final class ContextOuterClass { * @return Whether the deviceUuid field is set. */ public boolean hasDeviceUuid() { - return deviceUuidBuilder_ != null || deviceUuid_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -14793,10 +14187,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } deviceUuid_ = value; - onChanged(); } else { deviceUuidBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -14806,10 +14201,11 @@ public final class ContextOuterClass { public Builder setDeviceUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { if (deviceUuidBuilder_ == null) { deviceUuid_ = builderForValue.build(); - onChanged(); } else { deviceUuidBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -14818,15 +14214,16 @@ public final class ContextOuterClass { */ public Builder mergeDeviceUuid(context.ContextOuterClass.Uuid value) { if (deviceUuidBuilder_ == null) { - if (deviceUuid_ != null) { - deviceUuid_ = context.ContextOuterClass.Uuid.newBuilder(deviceUuid_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && deviceUuid_ != null && deviceUuid_ != context.ContextOuterClass.Uuid.getDefaultInstance()) { + getDeviceUuidBuilder().mergeFrom(value); } else { deviceUuid_ = value; } - onChanged(); } else { deviceUuidBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -14834,13 +14231,13 @@ public final class ContextOuterClass { * <code>.context.Uuid device_uuid = 1;</code> */ public Builder clearDeviceUuid() { - if (deviceUuidBuilder_ == null) { - deviceUuid_ = null; - onChanged(); - } else { - deviceUuid_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + deviceUuid_ = null; + if (deviceUuidBuilder_ != null) { + deviceUuidBuilder_.dispose(); deviceUuidBuilder_ = null; } + onChanged(); return this; } @@ -14848,6 +14245,7 @@ public final class ContextOuterClass { * <code>.context.Uuid device_uuid = 1;</code> */ public context.ContextOuterClass.Uuid.Builder getDeviceUuidBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getDeviceUuidFieldBuilder().getBuilder(); } @@ -14901,7 +14299,17 @@ public final class ContextOuterClass { @java.lang.Override public DeviceId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeviceId(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -15153,154 +14561,6 @@ public final class ContextOuterClass { return new Device(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Device(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.DeviceId.Builder subBuilder = null; - if (deviceId_ != null) { - subBuilder = deviceId_.toBuilder(); - } - deviceId_ = input.readMessage(context.ContextOuterClass.DeviceId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deviceId_); - deviceId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - name_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - deviceType_ = s; - break; - } - case 34: - { - context.ContextOuterClass.DeviceConfig.Builder subBuilder = null; - if (deviceConfig_ != null) { - subBuilder = deviceConfig_.toBuilder(); - } - deviceConfig_ = input.readMessage(context.ContextOuterClass.DeviceConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deviceConfig_); - deviceConfig_ = subBuilder.buildPartial(); - } - break; - } - case 40: - { - int rawValue = input.readEnum(); - deviceOperationalStatus_ = rawValue; - break; - } - case 48: - { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - deviceDrivers_ = new java.util.ArrayList<java.lang.Integer>(); - mutable_bitField0_ |= 0x00000001; - } - deviceDrivers_.add(rawValue); - break; - } - case 50: - { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while (input.getBytesUntilLimit() > 0) { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - deviceDrivers_ = new java.util.ArrayList<java.lang.Integer>(); - mutable_bitField0_ |= 0x00000001; - } - deviceDrivers_.add(rawValue); - } - input.popLimit(oldLimit); - break; - } - case 58: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - deviceEndpoints_ = new java.util.ArrayList<context.ContextOuterClass.EndPoint>(); - mutable_bitField0_ |= 0x00000002; - } - deviceEndpoints_.add(input.readMessage(context.ContextOuterClass.EndPoint.parser(), extensionRegistry)); - break; - } - case 66: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - components_ = new java.util.ArrayList<context.ContextOuterClass.Component>(); - mutable_bitField0_ |= 0x00000004; - } - components_.add(input.readMessage(context.ContextOuterClass.Component.parser(), extensionRegistry)); - break; - } - case 74: - { - context.ContextOuterClass.DeviceId.Builder subBuilder = null; - if (controllerId_ != null) { - subBuilder = controllerId_.toBuilder(); - } - controllerId_ = input.readMessage(context.ContextOuterClass.DeviceId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(controllerId_); - controllerId_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - deviceDrivers_ = java.util.Collections.unmodifiableList(deviceDrivers_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - deviceEndpoints_ = java.util.Collections.unmodifiableList(deviceEndpoints_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - components_ = java.util.Collections.unmodifiableList(components_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_Device_descriptor; } @@ -15337,12 +14597,13 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { - return getDeviceId(); + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; } public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** * <code>string name = 2;</code> @@ -15379,7 +14640,8 @@ public final class ContextOuterClass { public static final int DEVICE_TYPE_FIELD_NUMBER = 3; - private volatile java.lang.Object deviceType_; + @SuppressWarnings("serial") + private volatile java.lang.Object deviceType_ = ""; /** * <code>string device_type = 3;</code> @@ -15441,12 +14703,12 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.DeviceConfigOrBuilder getDeviceConfigOrBuilder() { - return getDeviceConfig(); + return deviceConfig_ == null ? context.ContextOuterClass.DeviceConfig.getDefaultInstance() : deviceConfig_; } public static final int DEVICE_OPERATIONAL_STATUS_FIELD_NUMBER = 5; - private int deviceOperationalStatus_; + private int deviceOperationalStatus_ = 0; /** * <code>.context.DeviceOperationalStatusEnum device_operational_status = 5;</code> @@ -15463,20 +14725,19 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.DeviceOperationalStatusEnum getDeviceOperationalStatus() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.DeviceOperationalStatusEnum result = context.ContextOuterClass.DeviceOperationalStatusEnum.valueOf(deviceOperationalStatus_); + context.ContextOuterClass.DeviceOperationalStatusEnum result = context.ContextOuterClass.DeviceOperationalStatusEnum.forNumber(deviceOperationalStatus_); return result == null ? context.ContextOuterClass.DeviceOperationalStatusEnum.UNRECOGNIZED : result; } public static final int DEVICE_DRIVERS_FIELD_NUMBER = 6; + @SuppressWarnings("serial") private java.util.List<java.lang.Integer> deviceDrivers_; private static final com.google.protobuf.Internal.ListAdapter.Converter<java.lang.Integer, context.ContextOuterClass.DeviceDriverEnum> deviceDrivers_converter_ = new com.google.protobuf.Internal.ListAdapter.Converter<java.lang.Integer, context.ContextOuterClass.DeviceDriverEnum>() { public context.ContextOuterClass.DeviceDriverEnum convert(java.lang.Integer from) { - @SuppressWarnings("deprecation") - context.ContextOuterClass.DeviceDriverEnum result = context.ContextOuterClass.DeviceDriverEnum.valueOf(from); + context.ContextOuterClass.DeviceDriverEnum result = context.ContextOuterClass.DeviceDriverEnum.forNumber(from); return result == null ? context.ContextOuterClass.DeviceDriverEnum.UNRECOGNIZED : result; } }; @@ -15532,6 +14793,7 @@ public final class ContextOuterClass { public static final int DEVICE_ENDPOINTS_FIELD_NUMBER = 7; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.EndPoint> deviceEndpoints_; /** @@ -15576,6 +14838,7 @@ public final class ContextOuterClass { public static final int COMPONENTS_FIELD_NUMBER = 8; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.Component> components_; /** @@ -15677,7 +14940,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.DeviceIdOrBuilder getControllerIdOrBuilder() { - return getControllerId(); + return controllerId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : controllerId_; } private byte memoizedIsInitialized = -1; @@ -15699,10 +14962,10 @@ public final class ContextOuterClass { if (deviceId_ != null) { output.writeMessage(1, getDeviceId()); } - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); } - if (!getDeviceTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceType_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, deviceType_); } if (deviceConfig_ != null) { @@ -15727,7 +14990,7 @@ public final class ContextOuterClass { if (controllerId_ != null) { output.writeMessage(9, getControllerId()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -15739,10 +15002,10 @@ public final class ContextOuterClass { if (deviceId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDeviceId()); } - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); } - if (!getDeviceTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceType_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, deviceType_); } if (deviceConfig_ != null) { @@ -15772,7 +15035,7 @@ public final class ContextOuterClass { if (controllerId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getControllerId()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -15816,7 +15079,7 @@ public final class ContextOuterClass { if (!getControllerId().equals(other.getControllerId())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -15858,7 +15121,7 @@ public final class ContextOuterClass { hash = (37 * hash) + CONTROLLER_ID_FIELD_NUMBER; hash = (53 * hash) + getControllerId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -15952,57 +15215,48 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.Device.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getDeviceEndpointsFieldBuilder(); - getComponentsFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); - if (deviceIdBuilder_ == null) { - deviceId_ = null; - } else { - deviceId_ = null; + bitField0_ = 0; + deviceId_ = null; + if (deviceIdBuilder_ != null) { + deviceIdBuilder_.dispose(); deviceIdBuilder_ = null; } name_ = ""; deviceType_ = ""; - if (deviceConfigBuilder_ == null) { - deviceConfig_ = null; - } else { - deviceConfig_ = null; + deviceConfig_ = null; + if (deviceConfigBuilder_ != null) { + deviceConfigBuilder_.dispose(); deviceConfigBuilder_ = null; } deviceOperationalStatus_ = 0; deviceDrivers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000020); if (deviceEndpointsBuilder_ == null) { deviceEndpoints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + deviceEndpoints_ = null; deviceEndpointsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000040); if (componentsBuilder_ == null) { components_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + components_ = null; componentsBuilder_.clear(); } - if (controllerIdBuilder_ == null) { - controllerId_ = null; - } else { - controllerId_ = null; + bitField0_ = (bitField0_ & ~0x00000080); + controllerId_ = null; + if (controllerIdBuilder_ != null) { + controllerIdBuilder_.dispose(); controllerIdBuilder_ = null; } return this; @@ -16030,80 +15284,60 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.Device buildPartial() { context.ContextOuterClass.Device result = new context.ContextOuterClass.Device(this); - int from_bitField0_ = bitField0_; - if (deviceIdBuilder_ == null) { - result.deviceId_ = deviceId_; - } else { - result.deviceId_ = deviceIdBuilder_.build(); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); } - result.name_ = name_; - result.deviceType_ = deviceType_; - if (deviceConfigBuilder_ == null) { - result.deviceConfig_ = deviceConfig_; - } else { - result.deviceConfig_ = deviceConfigBuilder_.build(); - } - result.deviceOperationalStatus_ = deviceOperationalStatus_; - if (((bitField0_ & 0x00000001) != 0)) { + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.Device result) { + if (((bitField0_ & 0x00000020) != 0)) { deviceDrivers_ = java.util.Collections.unmodifiableList(deviceDrivers_); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000020); } result.deviceDrivers_ = deviceDrivers_; if (deviceEndpointsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000040) != 0)) { deviceEndpoints_ = java.util.Collections.unmodifiableList(deviceEndpoints_); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000040); } result.deviceEndpoints_ = deviceEndpoints_; } else { result.deviceEndpoints_ = deviceEndpointsBuilder_.build(); } if (componentsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { + if (((bitField0_ & 0x00000080) != 0)) { components_ = java.util.Collections.unmodifiableList(components_); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000080); } result.components_ = components_; } else { result.components_ = componentsBuilder_.build(); } - if (controllerIdBuilder_ == null) { - result.controllerId_ = controllerId_; - } else { - result.controllerId_ = controllerIdBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); } - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.Device result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.deviceId_ = deviceIdBuilder_ == null ? deviceId_ : deviceIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.deviceType_ = deviceType_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.deviceConfig_ = deviceConfigBuilder_ == null ? deviceConfig_ : deviceConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.deviceOperationalStatus_ = deviceOperationalStatus_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.controllerId_ = controllerIdBuilder_ == null ? controllerId_ : controllerIdBuilder_.build(); + } } @java.lang.Override @@ -16124,10 +15358,12 @@ public final class ContextOuterClass { } if (!other.getName().isEmpty()) { name_ = other.name_; + bitField0_ |= 0x00000002; onChanged(); } if (!other.getDeviceType().isEmpty()) { deviceType_ = other.deviceType_; + bitField0_ |= 0x00000004; onChanged(); } if (other.hasDeviceConfig()) { @@ -16139,7 +15375,7 @@ public final class ContextOuterClass { if (!other.deviceDrivers_.isEmpty()) { if (deviceDrivers_.isEmpty()) { deviceDrivers_ = other.deviceDrivers_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000020); } else { ensureDeviceDriversIsMutable(); deviceDrivers_.addAll(other.deviceDrivers_); @@ -16150,7 +15386,7 @@ public final class ContextOuterClass { if (!other.deviceEndpoints_.isEmpty()) { if (deviceEndpoints_.isEmpty()) { deviceEndpoints_ = other.deviceEndpoints_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000040); } else { ensureDeviceEndpointsIsMutable(); deviceEndpoints_.addAll(other.deviceEndpoints_); @@ -16163,7 +15399,7 @@ public final class ContextOuterClass { deviceEndpointsBuilder_.dispose(); deviceEndpointsBuilder_ = null; deviceEndpoints_ = other.deviceEndpoints_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000040); deviceEndpointsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getDeviceEndpointsFieldBuilder() : null; } else { deviceEndpointsBuilder_.addAllMessages(other.deviceEndpoints_); @@ -16174,7 +15410,7 @@ public final class ContextOuterClass { if (!other.components_.isEmpty()) { if (components_.isEmpty()) { components_ = other.components_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000080); } else { ensureComponentsIsMutable(); components_.addAll(other.components_); @@ -16187,7 +15423,7 @@ public final class ContextOuterClass { componentsBuilder_.dispose(); componentsBuilder_ = null; components_ = other.components_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000080); componentsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getComponentsFieldBuilder() : null; } else { componentsBuilder_.addAllMessages(other.components_); @@ -16197,7 +15433,7 @@ public final class ContextOuterClass { if (other.hasControllerId()) { mergeControllerId(other.getControllerId()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -16209,17 +15445,122 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.Device parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getDeviceIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 26: + { + deviceType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } + // case 26 + case 34: + { + input.readMessage(getDeviceConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } + // case 34 + case 40: + { + deviceOperationalStatus_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } + // case 40 + case 48: + { + int tmpRaw = input.readEnum(); + ensureDeviceDriversIsMutable(); + deviceDrivers_.add(tmpRaw); + break; + } + // case 48 + case 50: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureDeviceDriversIsMutable(); + deviceDrivers_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } + // case 50 + case 58: + { + context.ContextOuterClass.EndPoint m = input.readMessage(context.ContextOuterClass.EndPoint.parser(), extensionRegistry); + if (deviceEndpointsBuilder_ == null) { + ensureDeviceEndpointsIsMutable(); + deviceEndpoints_.add(m); + } else { + deviceEndpointsBuilder_.addMessage(m); + } + break; + } + // case 58 + case 66: + { + context.ContextOuterClass.Component m = input.readMessage(context.ContextOuterClass.Component.parser(), extensionRegistry); + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); + components_.add(m); + } else { + componentsBuilder_.addMessage(m); + } + break; + } + // case 66 + case 74: + { + input.readMessage(getControllerIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } + // case 74 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Device) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -16234,7 +15575,7 @@ public final class ContextOuterClass { * @return Whether the deviceId field is set. */ public boolean hasDeviceId() { - return deviceIdBuilder_ != null || deviceId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -16258,10 +15599,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } deviceId_ = value; - onChanged(); } else { deviceIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -16271,10 +15613,11 @@ public final class ContextOuterClass { public Builder setDeviceId(context.ContextOuterClass.DeviceId.Builder builderForValue) { if (deviceIdBuilder_ == null) { deviceId_ = builderForValue.build(); - onChanged(); } else { deviceIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -16283,15 +15626,16 @@ public final class ContextOuterClass { */ public Builder mergeDeviceId(context.ContextOuterClass.DeviceId value) { if (deviceIdBuilder_ == null) { - if (deviceId_ != null) { - deviceId_ = context.ContextOuterClass.DeviceId.newBuilder(deviceId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && deviceId_ != null && deviceId_ != context.ContextOuterClass.DeviceId.getDefaultInstance()) { + getDeviceIdBuilder().mergeFrom(value); } else { deviceId_ = value; } - onChanged(); } else { deviceIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -16299,13 +15643,13 @@ public final class ContextOuterClass { * <code>.context.DeviceId device_id = 1;</code> */ public Builder clearDeviceId() { - if (deviceIdBuilder_ == null) { - deviceId_ = null; - onChanged(); - } else { - deviceId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + deviceId_ = null; + if (deviceIdBuilder_ != null) { + deviceIdBuilder_.dispose(); deviceIdBuilder_ = null; } + onChanged(); return this; } @@ -16313,6 +15657,7 @@ public final class ContextOuterClass { * <code>.context.DeviceId device_id = 1;</code> */ public context.ContextOuterClass.DeviceId.Builder getDeviceIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getDeviceIdFieldBuilder().getBuilder(); } @@ -16382,6 +15727,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } name_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -16392,6 +15738,7 @@ public final class ContextOuterClass { */ public Builder clearName() { name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -16407,6 +15754,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); name_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -16454,6 +15802,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } deviceType_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -16464,6 +15813,7 @@ public final class ContextOuterClass { */ public Builder clearDeviceType() { deviceType_ = getDefaultInstance().getDeviceType(); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } @@ -16479,6 +15829,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); deviceType_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -16492,7 +15843,7 @@ public final class ContextOuterClass { * @return Whether the deviceConfig field is set. */ public boolean hasDeviceConfig() { - return deviceConfigBuilder_ != null || deviceConfig_ != null; + return ((bitField0_ & 0x00000008) != 0); } /** @@ -16516,10 +15867,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } deviceConfig_ = value; - onChanged(); } else { deviceConfigBuilder_.setMessage(value); } + bitField0_ |= 0x00000008; + onChanged(); return this; } @@ -16529,10 +15881,11 @@ public final class ContextOuterClass { public Builder setDeviceConfig(context.ContextOuterClass.DeviceConfig.Builder builderForValue) { if (deviceConfigBuilder_ == null) { deviceConfig_ = builderForValue.build(); - onChanged(); } else { deviceConfigBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000008; + onChanged(); return this; } @@ -16541,15 +15894,16 @@ public final class ContextOuterClass { */ public Builder mergeDeviceConfig(context.ContextOuterClass.DeviceConfig value) { if (deviceConfigBuilder_ == null) { - if (deviceConfig_ != null) { - deviceConfig_ = context.ContextOuterClass.DeviceConfig.newBuilder(deviceConfig_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000008) != 0) && deviceConfig_ != null && deviceConfig_ != context.ContextOuterClass.DeviceConfig.getDefaultInstance()) { + getDeviceConfigBuilder().mergeFrom(value); } else { deviceConfig_ = value; } - onChanged(); } else { deviceConfigBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000008; + onChanged(); return this; } @@ -16557,13 +15911,13 @@ public final class ContextOuterClass { * <code>.context.DeviceConfig device_config = 4;</code> */ public Builder clearDeviceConfig() { - if (deviceConfigBuilder_ == null) { - deviceConfig_ = null; - onChanged(); - } else { - deviceConfig_ = null; + bitField0_ = (bitField0_ & ~0x00000008); + deviceConfig_ = null; + if (deviceConfigBuilder_ != null) { + deviceConfigBuilder_.dispose(); deviceConfigBuilder_ = null; } + onChanged(); return this; } @@ -16571,6 +15925,7 @@ public final class ContextOuterClass { * <code>.context.DeviceConfig device_config = 4;</code> */ public context.ContextOuterClass.DeviceConfig.Builder getDeviceConfigBuilder() { + bitField0_ |= 0x00000008; onChanged(); return getDeviceConfigFieldBuilder().getBuilder(); } @@ -16615,6 +15970,7 @@ public final class ContextOuterClass { */ public Builder setDeviceOperationalStatusValue(int value) { deviceOperationalStatus_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -16625,8 +15981,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.DeviceOperationalStatusEnum getDeviceOperationalStatus() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.DeviceOperationalStatusEnum result = context.ContextOuterClass.DeviceOperationalStatusEnum.valueOf(deviceOperationalStatus_); + context.ContextOuterClass.DeviceOperationalStatusEnum result = context.ContextOuterClass.DeviceOperationalStatusEnum.forNumber(deviceOperationalStatus_); return result == null ? context.ContextOuterClass.DeviceOperationalStatusEnum.UNRECOGNIZED : result; } @@ -16639,6 +15994,7 @@ public final class ContextOuterClass { if (value == null) { throw new NullPointerException(); } + bitField0_ |= 0x00000010; deviceOperationalStatus_ = value.getNumber(); onChanged(); return this; @@ -16649,6 +16005,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearDeviceOperationalStatus() { + bitField0_ = (bitField0_ & ~0x00000010); deviceOperationalStatus_ = 0; onChanged(); return this; @@ -16657,9 +16014,9 @@ public final class ContextOuterClass { private java.util.List<java.lang.Integer> deviceDrivers_ = java.util.Collections.emptyList(); private void ensureDeviceDriversIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!((bitField0_ & 0x00000020) != 0)) { deviceDrivers_ = new java.util.ArrayList<java.lang.Integer>(deviceDrivers_); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000020; } } @@ -16739,7 +16096,7 @@ public final class ContextOuterClass { */ public Builder clearDeviceDrivers() { deviceDrivers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } @@ -16763,8 +16120,8 @@ public final class ContextOuterClass { /** * <code>repeated .context.DeviceDriverEnum device_drivers = 6;</code> - * @param index The index of the value to return. - * @return The enum numeric value on the wire of deviceDrivers at the given index. + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for deviceDrivers to set. * @return This builder for chaining. */ public Builder setDeviceDriversValue(int index, int value) { @@ -16803,9 +16160,9 @@ public final class ContextOuterClass { private java.util.List<context.ContextOuterClass.EndPoint> deviceEndpoints_ = java.util.Collections.emptyList(); private void ensureDeviceEndpointsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { + if (!((bitField0_ & 0x00000040) != 0)) { deviceEndpoints_ = new java.util.ArrayList<context.ContextOuterClass.EndPoint>(deviceEndpoints_); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000040; } } @@ -16957,7 +16314,7 @@ public final class ContextOuterClass { public Builder clearDeviceEndpoints() { if (deviceEndpointsBuilder_ == null) { deviceEndpoints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000040); onChanged(); } else { deviceEndpointsBuilder_.clear(); @@ -17031,7 +16388,7 @@ public final class ContextOuterClass { private com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.EndPoint, context.ContextOuterClass.EndPoint.Builder, context.ContextOuterClass.EndPointOrBuilder> getDeviceEndpointsFieldBuilder() { if (deviceEndpointsBuilder_ == null) { - deviceEndpointsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.EndPoint, context.ContextOuterClass.EndPoint.Builder, context.ContextOuterClass.EndPointOrBuilder>(deviceEndpoints_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + deviceEndpointsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.EndPoint, context.ContextOuterClass.EndPoint.Builder, context.ContextOuterClass.EndPointOrBuilder>(deviceEndpoints_, ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean()); deviceEndpoints_ = null; } return deviceEndpointsBuilder_; @@ -17040,9 +16397,9 @@ public final class ContextOuterClass { private java.util.List<context.ContextOuterClass.Component> components_ = java.util.Collections.emptyList(); private void ensureComponentsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { + if (!((bitField0_ & 0x00000080) != 0)) { components_ = new java.util.ArrayList<context.ContextOuterClass.Component>(components_); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000080; } } @@ -17238,7 +16595,7 @@ public final class ContextOuterClass { public Builder clearComponents() { if (componentsBuilder_ == null) { components_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000080); onChanged(); } else { componentsBuilder_.clear(); @@ -17340,7 +16697,7 @@ public final class ContextOuterClass { private com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.Component, context.ContextOuterClass.Component.Builder, context.ContextOuterClass.ComponentOrBuilder> getComponentsFieldBuilder() { if (componentsBuilder_ == null) { - componentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.Component, context.ContextOuterClass.Component.Builder, context.ContextOuterClass.ComponentOrBuilder>(components_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + componentsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.Component, context.ContextOuterClass.Component.Builder, context.ContextOuterClass.ComponentOrBuilder>(components_, ((bitField0_ & 0x00000080) != 0), getParentForChildren(), isClean()); components_ = null; } return componentsBuilder_; @@ -17359,7 +16716,7 @@ public final class ContextOuterClass { * @return Whether the controllerId field is set. */ public boolean hasControllerId() { - return controllerIdBuilder_ != null || controllerId_ != null; + return ((bitField0_ & 0x00000100) != 0); } /** @@ -17391,10 +16748,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } controllerId_ = value; - onChanged(); } else { controllerIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000100; + onChanged(); return this; } @@ -17408,10 +16766,11 @@ public final class ContextOuterClass { public Builder setControllerId(context.ContextOuterClass.DeviceId.Builder builderForValue) { if (controllerIdBuilder_ == null) { controllerId_ = builderForValue.build(); - onChanged(); } else { controllerIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000100; + onChanged(); return this; } @@ -17424,15 +16783,16 @@ public final class ContextOuterClass { */ public Builder mergeControllerId(context.ContextOuterClass.DeviceId value) { if (controllerIdBuilder_ == null) { - if (controllerId_ != null) { - controllerId_ = context.ContextOuterClass.DeviceId.newBuilder(controllerId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000100) != 0) && controllerId_ != null && controllerId_ != context.ContextOuterClass.DeviceId.getDefaultInstance()) { + getControllerIdBuilder().mergeFrom(value); } else { controllerId_ = value; } - onChanged(); } else { controllerIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000100; + onChanged(); return this; } @@ -17444,13 +16804,13 @@ public final class ContextOuterClass { * <code>.context.DeviceId controller_id = 9;</code> */ public Builder clearControllerId() { - if (controllerIdBuilder_ == null) { - controllerId_ = null; - onChanged(); - } else { - controllerId_ = null; + bitField0_ = (bitField0_ & ~0x00000100); + controllerId_ = null; + if (controllerIdBuilder_ != null) { + controllerIdBuilder_.dispose(); controllerIdBuilder_ = null; } + onChanged(); return this; } @@ -17462,6 +16822,7 @@ public final class ContextOuterClass { * <code>.context.DeviceId controller_id = 9;</code> */ public context.ContextOuterClass.DeviceId.Builder getControllerIdBuilder() { + bitField0_ |= 0x00000100; onChanged(); return getControllerIdFieldBuilder().getBuilder(); } @@ -17523,7 +16884,17 @@ public final class ContextOuterClass { @java.lang.Override public Device parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Device(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -17626,7 +16997,9 @@ public final class ContextOuterClass { * * <code>map<string, string> attributes = 4;</code> */ - java.lang.String getAttributesOrDefault(java.lang.String key, java.lang.String defaultValue); + /* nullable */ + java.lang.String getAttributesOrDefault(java.lang.String key, /* nullable */ + java.lang.String defaultValue); /** * <pre> @@ -17679,86 +17052,6 @@ public final class ContextOuterClass { return new Component(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Component(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.Uuid.Builder subBuilder = null; - if (componentUuid_ != null) { - subBuilder = componentUuid_.toBuilder(); - } - componentUuid_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(componentUuid_); - componentUuid_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - name_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - type_ = s; - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - attributes_ = com.google.protobuf.MapField.newMapField(AttributesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry<java.lang.String, java.lang.String> attributes__ = input.readMessage(AttributesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - attributes_.getMutableMap().put(attributes__.getKey(), attributes__.getValue()); - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - parent_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_Component_descriptor; } @@ -17806,12 +17099,13 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.UuidOrBuilder getComponentUuidOrBuilder() { - return getComponentUuid(); + return componentUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : componentUuid_; } public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** * <code>string name = 2;</code> @@ -17848,7 +17142,8 @@ public final class ContextOuterClass { public static final int TYPE_FIELD_NUMBER = 3; - private volatile java.lang.Object type_; + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; /** * <code>string type = 3;</code> @@ -17890,6 +17185,7 @@ public final class ContextOuterClass { static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry = com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance(context.ContextOuterClass.internal_static_context_Component_AttributesEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.STRING, ""); } + @SuppressWarnings("serial") private com.google.protobuf.MapField<java.lang.String, java.lang.String> attributes_; private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetAttributes() { @@ -17913,7 +17209,7 @@ public final class ContextOuterClass { @java.lang.Override public boolean containsAttributes(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } return internalGetAttributes().getMap().containsKey(key); } @@ -17947,9 +17243,11 @@ public final class ContextOuterClass { * <code>map<string, string> attributes = 4;</code> */ @java.lang.Override - public java.lang.String getAttributesOrDefault(java.lang.String key, java.lang.String defaultValue) { + public /* nullable */ + java.lang.String getAttributesOrDefault(java.lang.String key, /* nullable */ + java.lang.String defaultValue) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map<java.lang.String, java.lang.String> map = internalGetAttributes().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; @@ -17965,7 +17263,7 @@ public final class ContextOuterClass { @java.lang.Override public java.lang.String getAttributesOrThrow(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map<java.lang.String, java.lang.String> map = internalGetAttributes().getMap(); if (!map.containsKey(key)) { @@ -17976,7 +17274,8 @@ public final class ContextOuterClass { public static final int PARENT_FIELD_NUMBER = 5; - private volatile java.lang.Object parent_; + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; /** * <code>string parent = 5;</code> @@ -18029,17 +17328,17 @@ public final class ContextOuterClass { if (componentUuid_ != null) { output.writeMessage(1, getComponentUuid()); } - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); } - if (!getTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, type_); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(output, internalGetAttributes(), AttributesDefaultEntryHolder.defaultEntry, 4); - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, parent_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -18051,20 +17350,20 @@ public final class ContextOuterClass { if (componentUuid_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getComponentUuid()); } - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); } - if (!getTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, type_); } for (java.util.Map.Entry<java.lang.String, java.lang.String> entry : internalGetAttributes().getMap().entrySet()) { com.google.protobuf.MapEntry<java.lang.String, java.lang.String> attributes__ = AttributesDefaultEntryHolder.defaultEntry.newBuilderForType().setKey(entry.getKey()).setValue(entry.getValue()).build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, attributes__); } - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, parent_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -18092,7 +17391,7 @@ public final class ContextOuterClass { return false; if (!getParent().equals(other.getParent())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -18118,7 +17417,7 @@ public final class ContextOuterClass { } hash = (37 * hash) + PARENT_FIELD_NUMBER; hash = (53 * hash) + getParent().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -18236,26 +17535,19 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.Component.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (componentUuidBuilder_ == null) { - componentUuid_ = null; - } else { - componentUuid_ = null; + bitField0_ = 0; + componentUuid_ = null; + if (componentUuidBuilder_ != null) { + componentUuidBuilder_.dispose(); componentUuidBuilder_ = null; } name_ = ""; @@ -18287,49 +17579,31 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.Component buildPartial() { context.ContextOuterClass.Component result = new context.ContextOuterClass.Component(this); - int from_bitField0_ = bitField0_; - if (componentUuidBuilder_ == null) { - result.componentUuid_ = componentUuid_; - } else { - result.componentUuid_ = componentUuidBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } - result.name_ = name_; - result.type_ = type_; - result.attributes_ = internalGetAttributes(); - result.attributes_.makeImmutable(); - result.parent_ = parent_; onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.Component result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.componentUuid_ = componentUuidBuilder_ == null ? componentUuid_ : componentUuidBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.attributes_ = internalGetAttributes(); + result.attributes_.makeImmutable(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.parent_ = parent_; + } } @java.lang.Override @@ -18350,18 +17624,22 @@ public final class ContextOuterClass { } if (!other.getName().isEmpty()) { name_ = other.name_; + bitField0_ |= 0x00000002; onChanged(); } if (!other.getType().isEmpty()) { type_ = other.type_; + bitField0_ |= 0x00000004; onChanged(); } internalGetMutableAttributes().mergeFrom(other.internalGetAttributes()); + bitField0_ |= 0x00000008; if (!other.getParent().isEmpty()) { parent_ = other.parent_; + bitField0_ |= 0x00000010; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -18373,17 +17651,71 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.Component parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getComponentUuidFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 26: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } + // case 26 + case 34: + { + com.google.protobuf.MapEntry<java.lang.String, java.lang.String> attributes__ = input.readMessage(AttributesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableAttributes().getMutableMap().put(attributes__.getKey(), attributes__.getValue()); + bitField0_ |= 0x00000008; + break; + } + // case 34 + case 42: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } + // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Component) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -18398,7 +17730,7 @@ public final class ContextOuterClass { * @return Whether the componentUuid field is set. */ public boolean hasComponentUuid() { - return componentUuidBuilder_ != null || componentUuid_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -18422,10 +17754,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } componentUuid_ = value; - onChanged(); } else { componentUuidBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -18435,10 +17768,11 @@ public final class ContextOuterClass { public Builder setComponentUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { if (componentUuidBuilder_ == null) { componentUuid_ = builderForValue.build(); - onChanged(); } else { componentUuidBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -18447,15 +17781,16 @@ public final class ContextOuterClass { */ public Builder mergeComponentUuid(context.ContextOuterClass.Uuid value) { if (componentUuidBuilder_ == null) { - if (componentUuid_ != null) { - componentUuid_ = context.ContextOuterClass.Uuid.newBuilder(componentUuid_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && componentUuid_ != null && componentUuid_ != context.ContextOuterClass.Uuid.getDefaultInstance()) { + getComponentUuidBuilder().mergeFrom(value); } else { componentUuid_ = value; } - onChanged(); } else { componentUuidBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -18463,13 +17798,13 @@ public final class ContextOuterClass { * <code>.context.Uuid component_uuid = 1;</code> */ public Builder clearComponentUuid() { - if (componentUuidBuilder_ == null) { - componentUuid_ = null; - onChanged(); - } else { - componentUuid_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + componentUuid_ = null; + if (componentUuidBuilder_ != null) { + componentUuidBuilder_.dispose(); componentUuidBuilder_ = null; } + onChanged(); return this; } @@ -18477,6 +17812,7 @@ public final class ContextOuterClass { * <code>.context.Uuid component_uuid = 1;</code> */ public context.ContextOuterClass.Uuid.Builder getComponentUuidBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getComponentUuidFieldBuilder().getBuilder(); } @@ -18546,6 +17882,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } name_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -18556,6 +17893,7 @@ public final class ContextOuterClass { */ public Builder clearName() { name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -18571,6 +17909,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); name_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -18618,6 +17957,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } type_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -18628,6 +17968,7 @@ public final class ContextOuterClass { */ public Builder clearType() { type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } @@ -18643,6 +17984,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); type_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -18657,14 +17999,14 @@ public final class ContextOuterClass { } private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMutableAttributes() { - onChanged(); - ; if (attributes_ == null) { attributes_ = com.google.protobuf.MapField.newMapField(AttributesDefaultEntryHolder.defaultEntry); } if (!attributes_.isMutable()) { attributes_ = attributes_.copy(); } + bitField0_ |= 0x00000008; + onChanged(); return attributes_; } @@ -18682,7 +18024,7 @@ public final class ContextOuterClass { @java.lang.Override public boolean containsAttributes(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } return internalGetAttributes().getMap().containsKey(key); } @@ -18716,9 +18058,11 @@ public final class ContextOuterClass { * <code>map<string, string> attributes = 4;</code> */ @java.lang.Override - public java.lang.String getAttributesOrDefault(java.lang.String key, java.lang.String defaultValue) { + public /* nullable */ + java.lang.String getAttributesOrDefault(java.lang.String key, /* nullable */ + java.lang.String defaultValue) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map<java.lang.String, java.lang.String> map = internalGetAttributes().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; @@ -18734,7 +18078,7 @@ public final class ContextOuterClass { @java.lang.Override public java.lang.String getAttributesOrThrow(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map<java.lang.String, java.lang.String> map = internalGetAttributes().getMap(); if (!map.containsKey(key)) { @@ -18744,6 +18088,7 @@ public final class ContextOuterClass { } public Builder clearAttributes() { + bitField0_ = (bitField0_ & ~0x00000008); internalGetMutableAttributes().getMutableMap().clear(); return this; } @@ -18757,7 +18102,7 @@ public final class ContextOuterClass { */ public Builder removeAttributes(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } internalGetMutableAttributes().getMutableMap().remove(key); return this; @@ -18768,6 +18113,7 @@ public final class ContextOuterClass { */ @java.lang.Deprecated public java.util.Map<java.lang.String, java.lang.String> getMutableAttributes() { + bitField0_ |= 0x00000008; return internalGetMutableAttributes().getMutableMap(); } @@ -18780,12 +18126,13 @@ public final class ContextOuterClass { */ public Builder putAttributes(java.lang.String key, java.lang.String value) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } if (value == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map value"); } internalGetMutableAttributes().getMutableMap().put(key, value); + bitField0_ |= 0x00000008; return this; } @@ -18798,6 +18145,7 @@ public final class ContextOuterClass { */ public Builder putAllAttributes(java.util.Map<java.lang.String, java.lang.String> values) { internalGetMutableAttributes().getMutableMap().putAll(values); + bitField0_ |= 0x00000008; return this; } @@ -18844,6 +18192,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } parent_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -18854,6 +18203,7 @@ public final class ContextOuterClass { */ public Builder clearParent() { parent_ = getDefaultInstance().getParent(); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } @@ -18869,6 +18219,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); parent_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -18900,7 +18251,17 @@ public final class ContextOuterClass { @java.lang.Override public Component parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Component(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -18971,57 +18332,6 @@ public final class ContextOuterClass { return new DeviceConfig(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private DeviceConfig(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - configRules_ = new java.util.ArrayList<context.ContextOuterClass.ConfigRule>(); - mutable_bitField0_ |= 0x00000001; - } - configRules_.add(input.readMessage(context.ContextOuterClass.ConfigRule.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - configRules_ = java.util.Collections.unmodifiableList(configRules_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_DeviceConfig_descriptor; } @@ -19033,6 +18343,7 @@ public final class ContextOuterClass { public static final int CONFIG_RULES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.ConfigRule> configRules_; /** @@ -19093,7 +18404,7 @@ public final class ContextOuterClass { for (int i = 0; i < configRules_.size(); i++) { output.writeMessage(1, configRules_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -19105,7 +18416,7 @@ public final class ContextOuterClass { for (int i = 0; i < configRules_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, configRules_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -19121,7 +18432,7 @@ public final class ContextOuterClass { context.ContextOuterClass.DeviceConfig other = (context.ContextOuterClass.DeviceConfig) obj; if (!getConfigRulesList().equals(other.getConfigRulesList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -19137,7 +18448,7 @@ public final class ContextOuterClass { hash = (37 * hash) + CONFIG_RULES_FIELD_NUMBER; hash = (53 * hash) + getConfigRulesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -19231,29 +18542,23 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.DeviceConfig.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getConfigRulesFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (configRulesBuilder_ == null) { configRules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + configRules_ = null; configRulesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -19279,7 +18584,15 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.DeviceConfig buildPartial() { context.ContextOuterClass.DeviceConfig result = new context.ContextOuterClass.DeviceConfig(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.DeviceConfig result) { if (configRulesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { configRules_ = java.util.Collections.unmodifiableList(configRules_); @@ -19289,38 +18602,10 @@ public final class ContextOuterClass { } else { result.configRules_ = configRulesBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); } - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.DeviceConfig result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -19360,7 +18645,7 @@ public final class ContextOuterClass { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -19372,17 +18657,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.DeviceConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + context.ContextOuterClass.ConfigRule m = input.readMessage(context.ContextOuterClass.ConfigRule.parser(), extensionRegistry); + if (configRulesBuilder_ == null) { + ensureConfigRulesIsMutable(); + configRules_.add(m); + } else { + configRulesBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.DeviceConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -19652,7 +18967,17 @@ public final class ContextOuterClass { @java.lang.Override public DeviceConfig parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeviceConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -19723,57 +19048,6 @@ public final class ContextOuterClass { return new DeviceIdList(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private DeviceIdList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - deviceIds_ = new java.util.ArrayList<context.ContextOuterClass.DeviceId>(); - mutable_bitField0_ |= 0x00000001; - } - deviceIds_.add(input.readMessage(context.ContextOuterClass.DeviceId.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - deviceIds_ = java.util.Collections.unmodifiableList(deviceIds_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_DeviceIdList_descriptor; } @@ -19785,6 +19059,7 @@ public final class ContextOuterClass { public static final int DEVICE_IDS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.DeviceId> deviceIds_; /** @@ -19845,7 +19120,7 @@ public final class ContextOuterClass { for (int i = 0; i < deviceIds_.size(); i++) { output.writeMessage(1, deviceIds_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -19857,7 +19132,7 @@ public final class ContextOuterClass { for (int i = 0; i < deviceIds_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, deviceIds_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -19873,7 +19148,7 @@ public final class ContextOuterClass { context.ContextOuterClass.DeviceIdList other = (context.ContextOuterClass.DeviceIdList) obj; if (!getDeviceIdsList().equals(other.getDeviceIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -19889,7 +19164,7 @@ public final class ContextOuterClass { hash = (37 * hash) + DEVICE_IDS_FIELD_NUMBER; hash = (53 * hash) + getDeviceIdsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -19983,29 +19258,23 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.DeviceIdList.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getDeviceIdsFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (deviceIdsBuilder_ == null) { deviceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + deviceIds_ = null; deviceIdsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -20031,7 +19300,15 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.DeviceIdList buildPartial() { context.ContextOuterClass.DeviceIdList result = new context.ContextOuterClass.DeviceIdList(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.DeviceIdList result) { if (deviceIdsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { deviceIds_ = java.util.Collections.unmodifiableList(deviceIds_); @@ -20041,38 +19318,10 @@ public final class ContextOuterClass { } else { result.deviceIds_ = deviceIdsBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); } - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.DeviceIdList result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -20112,7 +19361,7 @@ public final class ContextOuterClass { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -20124,17 +19373,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.DeviceIdList parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + context.ContextOuterClass.DeviceId m = input.readMessage(context.ContextOuterClass.DeviceId.parser(), extensionRegistry); + if (deviceIdsBuilder_ == null) { + ensureDeviceIdsIsMutable(); + deviceIds_.add(m); + } else { + deviceIdsBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.DeviceIdList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -20404,7 +19683,17 @@ public final class ContextOuterClass { @java.lang.Override public DeviceIdList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeviceIdList(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -20475,57 +19764,6 @@ public final class ContextOuterClass { return new DeviceList(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private DeviceList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - devices_ = new java.util.ArrayList<context.ContextOuterClass.Device>(); - mutable_bitField0_ |= 0x00000001; - } - devices_.add(input.readMessage(context.ContextOuterClass.Device.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - devices_ = java.util.Collections.unmodifiableList(devices_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_DeviceList_descriptor; } @@ -20537,6 +19775,7 @@ public final class ContextOuterClass { public static final int DEVICES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.Device> devices_; /** @@ -20597,7 +19836,7 @@ public final class ContextOuterClass { for (int i = 0; i < devices_.size(); i++) { output.writeMessage(1, devices_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -20609,7 +19848,7 @@ public final class ContextOuterClass { for (int i = 0; i < devices_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, devices_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -20625,7 +19864,7 @@ public final class ContextOuterClass { context.ContextOuterClass.DeviceList other = (context.ContextOuterClass.DeviceList) obj; if (!getDevicesList().equals(other.getDevicesList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -20641,7 +19880,7 @@ public final class ContextOuterClass { hash = (37 * hash) + DEVICES_FIELD_NUMBER; hash = (53 * hash) + getDevicesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -20735,29 +19974,23 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.DeviceList.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getDevicesFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (devicesBuilder_ == null) { devices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + devices_ = null; devicesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -20783,7 +20016,15 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.DeviceList buildPartial() { context.ContextOuterClass.DeviceList result = new context.ContextOuterClass.DeviceList(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.DeviceList result) { if (devicesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { devices_ = java.util.Collections.unmodifiableList(devices_); @@ -20793,38 +20034,10 @@ public final class ContextOuterClass { } else { result.devices_ = devicesBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); } - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.DeviceList result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -20864,7 +20077,7 @@ public final class ContextOuterClass { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -20876,17 +20089,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.DeviceList parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + context.ContextOuterClass.Device m = input.readMessage(context.ContextOuterClass.Device.parser(), extensionRegistry); + if (devicesBuilder_ == null) { + ensureDevicesIsMutable(); + devices_.add(m); + } else { + devicesBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.DeviceList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -21156,7 +20399,17 @@ public final class ContextOuterClass { @java.lang.Override public DeviceList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeviceList(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -21236,72 +20489,6 @@ public final class ContextOuterClass { return new DeviceFilter(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private DeviceFilter(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.DeviceIdList.Builder subBuilder = null; - if (deviceIds_ != null) { - subBuilder = deviceIds_.toBuilder(); - } - deviceIds_ = input.readMessage(context.ContextOuterClass.DeviceIdList.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deviceIds_); - deviceIds_ = subBuilder.buildPartial(); - } - break; - } - case 16: - { - includeEndpoints_ = input.readBool(); - break; - } - case 24: - { - includeConfigRules_ = input.readBool(); - break; - } - case 32: - { - includeComponents_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_DeviceFilter_descriptor; } @@ -21338,12 +20525,12 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.DeviceIdListOrBuilder getDeviceIdsOrBuilder() { - return getDeviceIds(); + return deviceIds_ == null ? context.ContextOuterClass.DeviceIdList.getDefaultInstance() : deviceIds_; } public static final int INCLUDE_ENDPOINTS_FIELD_NUMBER = 2; - private boolean includeEndpoints_; + private boolean includeEndpoints_ = false; /** * <code>bool include_endpoints = 2;</code> @@ -21356,7 +20543,7 @@ public final class ContextOuterClass { public static final int INCLUDE_CONFIG_RULES_FIELD_NUMBER = 3; - private boolean includeConfigRules_; + private boolean includeConfigRules_ = false; /** * <code>bool include_config_rules = 3;</code> @@ -21369,7 +20556,7 @@ public final class ContextOuterClass { public static final int INCLUDE_COMPONENTS_FIELD_NUMBER = 4; - private boolean includeComponents_; + private boolean includeComponents_ = false; /** * <code>bool include_components = 4;</code> @@ -21407,7 +20594,7 @@ public final class ContextOuterClass { if (includeComponents_ != false) { output.writeBool(4, includeComponents_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -21428,7 +20615,7 @@ public final class ContextOuterClass { if (includeComponents_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, includeComponents_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -21454,7 +20641,7 @@ public final class ContextOuterClass { return false; if (getIncludeComponents() != other.getIncludeComponents()) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -21476,7 +20663,7 @@ public final class ContextOuterClass { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeConfigRules()); hash = (37 * hash) + INCLUDE_COMPONENTS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeComponents()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -21570,26 +20757,19 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.DeviceFilter.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (deviceIdsBuilder_ == null) { - deviceIds_ = null; - } else { - deviceIds_ = null; + bitField0_ = 0; + deviceIds_ = null; + if (deviceIdsBuilder_ != null) { + deviceIdsBuilder_.dispose(); deviceIdsBuilder_ = null; } includeEndpoints_ = false; @@ -21620,46 +20800,27 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.DeviceFilter buildPartial() { context.ContextOuterClass.DeviceFilter result = new context.ContextOuterClass.DeviceFilter(this); - if (deviceIdsBuilder_ == null) { - result.deviceIds_ = deviceIds_; - } else { - result.deviceIds_ = deviceIdsBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } - result.includeEndpoints_ = includeEndpoints_; - result.includeConfigRules_ = includeConfigRules_; - result.includeComponents_ = includeComponents_; onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.DeviceFilter result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.deviceIds_ = deviceIdsBuilder_ == null ? deviceIds_ : deviceIdsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.includeEndpoints_ = includeEndpoints_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.includeConfigRules_ = includeConfigRules_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.includeComponents_ = includeComponents_; + } } @java.lang.Override @@ -21687,7 +20848,7 @@ public final class ContextOuterClass { if (other.getIncludeComponents() != false) { setIncludeComponents(other.getIncludeComponents()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -21699,20 +20860,68 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.DeviceFilter parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getDeviceIdsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 16: + { + includeEndpoints_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } + // case 16 + case 24: + { + includeConfigRules_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } + // case 24 + case 32: + { + includeComponents_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } + // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.DeviceFilter) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.DeviceIdList deviceIds_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.DeviceIdList, context.ContextOuterClass.DeviceIdList.Builder, context.ContextOuterClass.DeviceIdListOrBuilder> deviceIdsBuilder_; @@ -21722,7 +20931,7 @@ public final class ContextOuterClass { * @return Whether the deviceIds field is set. */ public boolean hasDeviceIds() { - return deviceIdsBuilder_ != null || deviceIds_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -21746,10 +20955,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } deviceIds_ = value; - onChanged(); } else { deviceIdsBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -21759,10 +20969,11 @@ public final class ContextOuterClass { public Builder setDeviceIds(context.ContextOuterClass.DeviceIdList.Builder builderForValue) { if (deviceIdsBuilder_ == null) { deviceIds_ = builderForValue.build(); - onChanged(); } else { deviceIdsBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -21771,15 +20982,16 @@ public final class ContextOuterClass { */ public Builder mergeDeviceIds(context.ContextOuterClass.DeviceIdList value) { if (deviceIdsBuilder_ == null) { - if (deviceIds_ != null) { - deviceIds_ = context.ContextOuterClass.DeviceIdList.newBuilder(deviceIds_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && deviceIds_ != null && deviceIds_ != context.ContextOuterClass.DeviceIdList.getDefaultInstance()) { + getDeviceIdsBuilder().mergeFrom(value); } else { deviceIds_ = value; } - onChanged(); } else { deviceIdsBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -21787,13 +20999,13 @@ public final class ContextOuterClass { * <code>.context.DeviceIdList device_ids = 1;</code> */ public Builder clearDeviceIds() { - if (deviceIdsBuilder_ == null) { - deviceIds_ = null; - onChanged(); - } else { - deviceIds_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + deviceIds_ = null; + if (deviceIdsBuilder_ != null) { + deviceIdsBuilder_.dispose(); deviceIdsBuilder_ = null; } + onChanged(); return this; } @@ -21801,6 +21013,7 @@ public final class ContextOuterClass { * <code>.context.DeviceIdList device_ids = 1;</code> */ public context.ContextOuterClass.DeviceIdList.Builder getDeviceIdsBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getDeviceIdsFieldBuilder().getBuilder(); } @@ -21845,6 +21058,7 @@ public final class ContextOuterClass { */ public Builder setIncludeEndpoints(boolean value) { includeEndpoints_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -21854,6 +21068,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearIncludeEndpoints() { + bitField0_ = (bitField0_ & ~0x00000002); includeEndpoints_ = false; onChanged(); return this; @@ -21877,6 +21092,7 @@ public final class ContextOuterClass { */ public Builder setIncludeConfigRules(boolean value) { includeConfigRules_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -21886,6 +21102,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearIncludeConfigRules() { + bitField0_ = (bitField0_ & ~0x00000004); includeConfigRules_ = false; onChanged(); return this; @@ -21909,6 +21126,7 @@ public final class ContextOuterClass { */ public Builder setIncludeComponents(boolean value) { includeComponents_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -21918,6 +21136,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearIncludeComponents() { + bitField0_ = (bitField0_ & ~0x00000008); includeComponents_ = false; onChanged(); return this; @@ -21950,7 +21169,17 @@ public final class ContextOuterClass { @java.lang.Override public DeviceFilter parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeviceFilter(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -22046,83 +21275,6 @@ public final class ContextOuterClass { return new DeviceEvent(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private DeviceEvent(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.Event.Builder subBuilder = null; - if (event_ != null) { - subBuilder = event_.toBuilder(); - } - event_ = input.readMessage(context.ContextOuterClass.Event.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(event_); - event_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - context.ContextOuterClass.DeviceId.Builder subBuilder = null; - if (deviceId_ != null) { - subBuilder = deviceId_.toBuilder(); - } - deviceId_ = input.readMessage(context.ContextOuterClass.DeviceId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deviceId_); - deviceId_ = subBuilder.buildPartial(); - } - break; - } - case 26: - { - context.ContextOuterClass.DeviceConfig.Builder subBuilder = null; - if (deviceConfig_ != null) { - subBuilder = deviceConfig_.toBuilder(); - } - deviceConfig_ = input.readMessage(context.ContextOuterClass.DeviceConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deviceConfig_); - deviceConfig_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_DeviceEvent_descriptor; } @@ -22159,7 +21311,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - return getEvent(); + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; } public static final int DEVICE_ID_FIELD_NUMBER = 2; @@ -22189,7 +21341,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { - return getDeviceId(); + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; } public static final int DEVICE_CONFIG_FIELD_NUMBER = 3; @@ -22219,7 +21371,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.DeviceConfigOrBuilder getDeviceConfigOrBuilder() { - return getDeviceConfig(); + return deviceConfig_ == null ? context.ContextOuterClass.DeviceConfig.getDefaultInstance() : deviceConfig_; } private byte memoizedIsInitialized = -1; @@ -22246,7 +21398,7 @@ public final class ContextOuterClass { if (deviceConfig_ != null) { output.writeMessage(3, getDeviceConfig()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -22264,7 +21416,7 @@ public final class ContextOuterClass { if (deviceConfig_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDeviceConfig()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -22296,7 +21448,7 @@ public final class ContextOuterClass { if (!getDeviceConfig().equals(other.getDeviceConfig())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -22320,7 +21472,7 @@ public final class ContextOuterClass { hash = (37 * hash) + DEVICE_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getDeviceConfig().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -22414,38 +21566,29 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.DeviceEvent.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (eventBuilder_ == null) { - event_ = null; - } else { - event_ = null; + bitField0_ = 0; + event_ = null; + if (eventBuilder_ != null) { + eventBuilder_.dispose(); eventBuilder_ = null; } - if (deviceIdBuilder_ == null) { - deviceId_ = null; - } else { - deviceId_ = null; + deviceId_ = null; + if (deviceIdBuilder_ != null) { + deviceIdBuilder_.dispose(); deviceIdBuilder_ = null; } - if (deviceConfigBuilder_ == null) { - deviceConfig_ = null; - } else { - deviceConfig_ = null; + deviceConfig_ = null; + if (deviceConfigBuilder_ != null) { + deviceConfigBuilder_.dispose(); deviceConfigBuilder_ = null; } return this; @@ -22473,53 +21616,24 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.DeviceEvent buildPartial() { context.ContextOuterClass.DeviceEvent result = new context.ContextOuterClass.DeviceEvent(this); - if (eventBuilder_ == null) { - result.event_ = event_; - } else { - result.event_ = eventBuilder_.build(); - } - if (deviceIdBuilder_ == null) { - result.deviceId_ = deviceId_; - } else { - result.deviceId_ = deviceIdBuilder_.build(); - } - if (deviceConfigBuilder_ == null) { - result.deviceConfig_ = deviceConfig_; - } else { - result.deviceConfig_ = deviceConfigBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.DeviceEvent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.event_ = eventBuilder_ == null ? event_ : eventBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.deviceId_ = deviceIdBuilder_ == null ? deviceId_ : deviceIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.deviceConfig_ = deviceConfigBuilder_ == null ? deviceConfig_ : deviceConfigBuilder_.build(); + } } @java.lang.Override @@ -22544,7 +21658,7 @@ public final class ContextOuterClass { if (other.hasDeviceConfig()) { mergeDeviceConfig(other.getDeviceConfig()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -22556,20 +21670,61 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.DeviceEvent parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getEventFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + input.readMessage(getDeviceIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 26: + { + input.readMessage(getDeviceConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } + // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.DeviceEvent) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.Event event_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> eventBuilder_; @@ -22579,7 +21734,7 @@ public final class ContextOuterClass { * @return Whether the event field is set. */ public boolean hasEvent() { - return eventBuilder_ != null || event_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -22603,10 +21758,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } event_ = value; - onChanged(); } else { eventBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -22616,10 +21772,11 @@ public final class ContextOuterClass { public Builder setEvent(context.ContextOuterClass.Event.Builder builderForValue) { if (eventBuilder_ == null) { event_ = builderForValue.build(); - onChanged(); } else { eventBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -22628,15 +21785,16 @@ public final class ContextOuterClass { */ public Builder mergeEvent(context.ContextOuterClass.Event value) { if (eventBuilder_ == null) { - if (event_ != null) { - event_ = context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && event_ != null && event_ != context.ContextOuterClass.Event.getDefaultInstance()) { + getEventBuilder().mergeFrom(value); } else { event_ = value; } - onChanged(); } else { eventBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -22644,13 +21802,13 @@ public final class ContextOuterClass { * <code>.context.Event event = 1;</code> */ public Builder clearEvent() { - if (eventBuilder_ == null) { - event_ = null; - onChanged(); - } else { - event_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + event_ = null; + if (eventBuilder_ != null) { + eventBuilder_.dispose(); eventBuilder_ = null; } + onChanged(); return this; } @@ -22658,6 +21816,7 @@ public final class ContextOuterClass { * <code>.context.Event event = 1;</code> */ public context.ContextOuterClass.Event.Builder getEventBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getEventFieldBuilder().getBuilder(); } @@ -22693,7 +21852,7 @@ public final class ContextOuterClass { * @return Whether the deviceId field is set. */ public boolean hasDeviceId() { - return deviceIdBuilder_ != null || deviceId_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** @@ -22717,10 +21876,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } deviceId_ = value; - onChanged(); } else { deviceIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -22730,10 +21890,11 @@ public final class ContextOuterClass { public Builder setDeviceId(context.ContextOuterClass.DeviceId.Builder builderForValue) { if (deviceIdBuilder_ == null) { deviceId_ = builderForValue.build(); - onChanged(); } else { deviceIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -22742,15 +21903,16 @@ public final class ContextOuterClass { */ public Builder mergeDeviceId(context.ContextOuterClass.DeviceId value) { if (deviceIdBuilder_ == null) { - if (deviceId_ != null) { - deviceId_ = context.ContextOuterClass.DeviceId.newBuilder(deviceId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000002) != 0) && deviceId_ != null && deviceId_ != context.ContextOuterClass.DeviceId.getDefaultInstance()) { + getDeviceIdBuilder().mergeFrom(value); } else { deviceId_ = value; } - onChanged(); } else { deviceIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -22758,13 +21920,13 @@ public final class ContextOuterClass { * <code>.context.DeviceId device_id = 2;</code> */ public Builder clearDeviceId() { - if (deviceIdBuilder_ == null) { - deviceId_ = null; - onChanged(); - } else { - deviceId_ = null; + bitField0_ = (bitField0_ & ~0x00000002); + deviceId_ = null; + if (deviceIdBuilder_ != null) { + deviceIdBuilder_.dispose(); deviceIdBuilder_ = null; } + onChanged(); return this; } @@ -22772,6 +21934,7 @@ public final class ContextOuterClass { * <code>.context.DeviceId device_id = 2;</code> */ public context.ContextOuterClass.DeviceId.Builder getDeviceIdBuilder() { + bitField0_ |= 0x00000002; onChanged(); return getDeviceIdFieldBuilder().getBuilder(); } @@ -22807,7 +21970,7 @@ public final class ContextOuterClass { * @return Whether the deviceConfig field is set. */ public boolean hasDeviceConfig() { - return deviceConfigBuilder_ != null || deviceConfig_ != null; + return ((bitField0_ & 0x00000004) != 0); } /** @@ -22831,10 +21994,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } deviceConfig_ = value; - onChanged(); } else { deviceConfigBuilder_.setMessage(value); } + bitField0_ |= 0x00000004; + onChanged(); return this; } @@ -22844,10 +22008,11 @@ public final class ContextOuterClass { public Builder setDeviceConfig(context.ContextOuterClass.DeviceConfig.Builder builderForValue) { if (deviceConfigBuilder_ == null) { deviceConfig_ = builderForValue.build(); - onChanged(); } else { deviceConfigBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000004; + onChanged(); return this; } @@ -22856,15 +22021,16 @@ public final class ContextOuterClass { */ public Builder mergeDeviceConfig(context.ContextOuterClass.DeviceConfig value) { if (deviceConfigBuilder_ == null) { - if (deviceConfig_ != null) { - deviceConfig_ = context.ContextOuterClass.DeviceConfig.newBuilder(deviceConfig_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000004) != 0) && deviceConfig_ != null && deviceConfig_ != context.ContextOuterClass.DeviceConfig.getDefaultInstance()) { + getDeviceConfigBuilder().mergeFrom(value); } else { deviceConfig_ = value; } - onChanged(); } else { deviceConfigBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000004; + onChanged(); return this; } @@ -22872,13 +22038,13 @@ public final class ContextOuterClass { * <code>.context.DeviceConfig device_config = 3;</code> */ public Builder clearDeviceConfig() { - if (deviceConfigBuilder_ == null) { - deviceConfig_ = null; - onChanged(); - } else { - deviceConfig_ = null; + bitField0_ = (bitField0_ & ~0x00000004); + deviceConfig_ = null; + if (deviceConfigBuilder_ != null) { + deviceConfigBuilder_.dispose(); deviceConfigBuilder_ = null; } + onChanged(); return this; } @@ -22886,6 +22052,7 @@ public final class ContextOuterClass { * <code>.context.DeviceConfig device_config = 3;</code> */ public context.ContextOuterClass.DeviceConfig.Builder getDeviceConfigBuilder() { + bitField0_ |= 0x00000004; onChanged(); return getDeviceConfigFieldBuilder().getBuilder(); } @@ -22939,7 +22106,17 @@ public final class ContextOuterClass { @java.lang.Override public DeviceEvent parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeviceEvent(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -23005,57 +22182,6 @@ public final class ContextOuterClass { return new LinkId(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private LinkId(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.Uuid.Builder subBuilder = null; - if (linkUuid_ != null) { - subBuilder = linkUuid_.toBuilder(); - } - linkUuid_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(linkUuid_); - linkUuid_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_LinkId_descriptor; } @@ -23092,7 +22218,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.UuidOrBuilder getLinkUuidOrBuilder() { - return getLinkUuid(); + return linkUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : linkUuid_; } private byte memoizedIsInitialized = -1; @@ -23113,7 +22239,7 @@ public final class ContextOuterClass { if (linkUuid_ != null) { output.writeMessage(1, getLinkUuid()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -23125,7 +22251,7 @@ public final class ContextOuterClass { if (linkUuid_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getLinkUuid()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -23145,7 +22271,7 @@ public final class ContextOuterClass { if (!getLinkUuid().equals(other.getLinkUuid())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -23161,7 +22287,7 @@ public final class ContextOuterClass { hash = (37 * hash) + LINK_UUID_FIELD_NUMBER; hash = (53 * hash) + getLinkUuid().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -23259,26 +22385,19 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.LinkId.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (linkUuidBuilder_ == null) { - linkUuid_ = null; - } else { - linkUuid_ = null; + bitField0_ = 0; + linkUuid_ = null; + if (linkUuidBuilder_ != null) { + linkUuidBuilder_.dispose(); linkUuidBuilder_ = null; } return this; @@ -23306,43 +22425,18 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.LinkId buildPartial() { context.ContextOuterClass.LinkId result = new context.ContextOuterClass.LinkId(this); - if (linkUuidBuilder_ == null) { - result.linkUuid_ = linkUuid_; - } else { - result.linkUuid_ = linkUuidBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.LinkId result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.linkUuid_ = linkUuidBuilder_ == null ? linkUuid_ : linkUuidBuilder_.build(); + } } @java.lang.Override @@ -23361,7 +22455,7 @@ public final class ContextOuterClass { if (other.hasLinkUuid()) { mergeLinkUuid(other.getLinkUuid()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -23373,20 +22467,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.LinkId parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getLinkUuidFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.LinkId) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.Uuid linkUuid_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> linkUuidBuilder_; @@ -23396,7 +22517,7 @@ public final class ContextOuterClass { * @return Whether the linkUuid field is set. */ public boolean hasLinkUuid() { - return linkUuidBuilder_ != null || linkUuid_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -23420,10 +22541,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } linkUuid_ = value; - onChanged(); } else { linkUuidBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -23433,10 +22555,11 @@ public final class ContextOuterClass { public Builder setLinkUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { if (linkUuidBuilder_ == null) { linkUuid_ = builderForValue.build(); - onChanged(); } else { linkUuidBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -23445,15 +22568,16 @@ public final class ContextOuterClass { */ public Builder mergeLinkUuid(context.ContextOuterClass.Uuid value) { if (linkUuidBuilder_ == null) { - if (linkUuid_ != null) { - linkUuid_ = context.ContextOuterClass.Uuid.newBuilder(linkUuid_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && linkUuid_ != null && linkUuid_ != context.ContextOuterClass.Uuid.getDefaultInstance()) { + getLinkUuidBuilder().mergeFrom(value); } else { linkUuid_ = value; } - onChanged(); } else { linkUuidBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -23461,13 +22585,13 @@ public final class ContextOuterClass { * <code>.context.Uuid link_uuid = 1;</code> */ public Builder clearLinkUuid() { - if (linkUuidBuilder_ == null) { - linkUuid_ = null; - onChanged(); - } else { - linkUuid_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + linkUuid_ = null; + if (linkUuidBuilder_ != null) { + linkUuidBuilder_.dispose(); linkUuidBuilder_ = null; } + onChanged(); return this; } @@ -23475,6 +22599,7 @@ public final class ContextOuterClass { * <code>.context.Uuid link_uuid = 1;</code> */ public context.ContextOuterClass.Uuid.Builder getLinkUuidBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getLinkUuidFieldBuilder().getBuilder(); } @@ -23528,7 +22653,17 @@ public final class ContextOuterClass { @java.lang.Override public LinkId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new LinkId(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -23585,54 +22720,6 @@ public final class ContextOuterClass { return new LinkAttributes(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private LinkAttributes(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 13: - { - totalCapacityGbps_ = input.readFloat(); - break; - } - case 21: - { - usedCapacityGbps_ = input.readFloat(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_LinkAttributes_descriptor; } @@ -23644,7 +22731,7 @@ public final class ContextOuterClass { public static final int TOTAL_CAPACITY_GBPS_FIELD_NUMBER = 1; - private float totalCapacityGbps_; + private float totalCapacityGbps_ = 0F; /** * <code>float total_capacity_gbps = 1;</code> @@ -23657,7 +22744,7 @@ public final class ContextOuterClass { public static final int USED_CAPACITY_GBPS_FIELD_NUMBER = 2; - private float usedCapacityGbps_; + private float usedCapacityGbps_ = 0F; /** * <code>float used_capacity_gbps = 2;</code> @@ -23683,13 +22770,13 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (totalCapacityGbps_ != 0F) { + if (java.lang.Float.floatToRawIntBits(totalCapacityGbps_) != 0) { output.writeFloat(1, totalCapacityGbps_); } - if (usedCapacityGbps_ != 0F) { + if (java.lang.Float.floatToRawIntBits(usedCapacityGbps_) != 0) { output.writeFloat(2, usedCapacityGbps_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -23698,13 +22785,13 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (totalCapacityGbps_ != 0F) { + if (java.lang.Float.floatToRawIntBits(totalCapacityGbps_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, totalCapacityGbps_); } - if (usedCapacityGbps_ != 0F) { + if (java.lang.Float.floatToRawIntBits(usedCapacityGbps_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, usedCapacityGbps_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -23722,7 +22809,7 @@ public final class ContextOuterClass { return false; if (java.lang.Float.floatToIntBits(getUsedCapacityGbps()) != java.lang.Float.floatToIntBits(other.getUsedCapacityGbps())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -23738,7 +22825,7 @@ public final class ContextOuterClass { hash = (53 * hash) + java.lang.Float.floatToIntBits(getTotalCapacityGbps()); hash = (37 * hash) + USED_CAPACITY_GBPS_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits(getUsedCapacityGbps()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -23832,22 +22919,16 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.LinkAttributes.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; totalCapacityGbps_ = 0F; usedCapacityGbps_ = 0F; return this; @@ -23875,40 +22956,21 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.LinkAttributes buildPartial() { context.ContextOuterClass.LinkAttributes result = new context.ContextOuterClass.LinkAttributes(this); - result.totalCapacityGbps_ = totalCapacityGbps_; - result.usedCapacityGbps_ = usedCapacityGbps_; + if (bitField0_ != 0) { + buildPartial0(result); + } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.LinkAttributes result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.totalCapacityGbps_ = totalCapacityGbps_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.usedCapacityGbps_ = usedCapacityGbps_; + } } @java.lang.Override @@ -23930,7 +22992,7 @@ public final class ContextOuterClass { if (other.getUsedCapacityGbps() != 0F) { setUsedCapacityGbps(other.getUsedCapacityGbps()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -23942,20 +23004,54 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.LinkAttributes parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 13: + { + totalCapacityGbps_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } + // case 13 + case 21: + { + usedCapacityGbps_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } + // case 21 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.LinkAttributes) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private float totalCapacityGbps_; /** @@ -23974,6 +23070,7 @@ public final class ContextOuterClass { */ public Builder setTotalCapacityGbps(float value) { totalCapacityGbps_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -23983,6 +23080,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearTotalCapacityGbps() { + bitField0_ = (bitField0_ & ~0x00000001); totalCapacityGbps_ = 0F; onChanged(); return this; @@ -24006,6 +23104,7 @@ public final class ContextOuterClass { */ public Builder setUsedCapacityGbps(float value) { usedCapacityGbps_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -24015,6 +23114,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearUsedCapacityGbps() { + bitField0_ = (bitField0_ & ~0x00000002); usedCapacityGbps_ = 0F; onChanged(); return this; @@ -24047,7 +23147,17 @@ public final class ContextOuterClass { @java.lang.Override public LinkAttributes parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new LinkAttributes(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -24165,89 +23275,6 @@ public final class ContextOuterClass { return new Link(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Link(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.LinkId.Builder subBuilder = null; - if (linkId_ != null) { - subBuilder = linkId_.toBuilder(); - } - linkId_ = input.readMessage(context.ContextOuterClass.LinkId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(linkId_); - linkId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - name_ = s; - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - linkEndpointIds_ = new java.util.ArrayList<context.ContextOuterClass.EndPointId>(); - mutable_bitField0_ |= 0x00000001; - } - linkEndpointIds_.add(input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry)); - break; - } - case 34: - { - context.ContextOuterClass.LinkAttributes.Builder subBuilder = null; - if (attributes_ != null) { - subBuilder = attributes_.toBuilder(); - } - attributes_ = input.readMessage(context.ContextOuterClass.LinkAttributes.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(attributes_); - attributes_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - linkEndpointIds_ = java.util.Collections.unmodifiableList(linkEndpointIds_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_Link_descriptor; } @@ -24284,12 +23311,13 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder() { - return getLinkId(); + return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; } public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** * <code>string name = 2;</code> @@ -24326,6 +23354,7 @@ public final class ContextOuterClass { public static final int LINK_ENDPOINT_IDS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.EndPointId> linkEndpointIds_; /** @@ -24395,7 +23424,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.LinkAttributesOrBuilder getAttributesOrBuilder() { - return getAttributes(); + return attributes_ == null ? context.ContextOuterClass.LinkAttributes.getDefaultInstance() : attributes_; } private byte memoizedIsInitialized = -1; @@ -24416,7 +23445,7 @@ public final class ContextOuterClass { if (linkId_ != null) { output.writeMessage(1, getLinkId()); } - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); } for (int i = 0; i < linkEndpointIds_.size(); i++) { @@ -24425,7 +23454,7 @@ public final class ContextOuterClass { if (attributes_ != null) { output.writeMessage(4, getAttributes()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -24437,7 +23466,7 @@ public final class ContextOuterClass { if (linkId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getLinkId()); } - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); } for (int i = 0; i < linkEndpointIds_.size(); i++) { @@ -24446,7 +23475,7 @@ public final class ContextOuterClass { if (attributes_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getAttributes()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -24476,7 +23505,7 @@ public final class ContextOuterClass { if (!getAttributes().equals(other.getAttributes())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -24502,7 +23531,7 @@ public final class ContextOuterClass { hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; hash = (53 * hash) + getAttributes().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -24596,40 +23625,32 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.Link.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getLinkEndpointIdsFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); - if (linkIdBuilder_ == null) { - linkId_ = null; - } else { - linkId_ = null; + bitField0_ = 0; + linkId_ = null; + if (linkIdBuilder_ != null) { + linkIdBuilder_.dispose(); linkIdBuilder_ = null; } name_ = ""; if (linkEndpointIdsBuilder_ == null) { linkEndpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + linkEndpointIds_ = null; linkEndpointIdsBuilder_.clear(); } - if (attributesBuilder_ == null) { - attributes_ = null; - } else { - attributes_ = null; + bitField0_ = (bitField0_ & ~0x00000004); + attributes_ = null; + if (attributesBuilder_ != null) { + attributesBuilder_.dispose(); attributesBuilder_ = null; } return this; @@ -24657,59 +23678,37 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.Link buildPartial() { context.ContextOuterClass.Link result = new context.ContextOuterClass.Link(this); - int from_bitField0_ = bitField0_; - if (linkIdBuilder_ == null) { - result.linkId_ = linkId_; - } else { - result.linkId_ = linkIdBuilder_.build(); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); } - result.name_ = name_; + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.Link result) { if (linkEndpointIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { linkEndpointIds_ = java.util.Collections.unmodifiableList(linkEndpointIds_); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); } result.linkEndpointIds_ = linkEndpointIds_; } else { result.linkEndpointIds_ = linkEndpointIdsBuilder_.build(); } - if (attributesBuilder_ == null) { - result.attributes_ = attributes_; - } else { - result.attributes_ = attributesBuilder_.build(); - } - onBuilt(); - return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.Link result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.linkId_ = linkIdBuilder_ == null ? linkId_ : linkIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.attributes_ = attributesBuilder_ == null ? attributes_ : attributesBuilder_.build(); + } } @java.lang.Override @@ -24730,13 +23729,14 @@ public final class ContextOuterClass { } if (!other.getName().isEmpty()) { name_ = other.name_; + bitField0_ |= 0x00000002; onChanged(); } if (linkEndpointIdsBuilder_ == null) { if (!other.linkEndpointIds_.isEmpty()) { if (linkEndpointIds_.isEmpty()) { linkEndpointIds_ = other.linkEndpointIds_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); } else { ensureLinkEndpointIdsIsMutable(); linkEndpointIds_.addAll(other.linkEndpointIds_); @@ -24749,7 +23749,7 @@ public final class ContextOuterClass { linkEndpointIdsBuilder_.dispose(); linkEndpointIdsBuilder_ = null; linkEndpointIds_ = other.linkEndpointIds_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); linkEndpointIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLinkEndpointIdsFieldBuilder() : null; } else { linkEndpointIdsBuilder_.addAllMessages(other.linkEndpointIds_); @@ -24759,7 +23759,7 @@ public final class ContextOuterClass { if (other.hasAttributes()) { mergeAttributes(other.getAttributes()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -24771,17 +23771,68 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.Link parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getLinkIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 26: + { + context.ContextOuterClass.EndPointId m = input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry); + if (linkEndpointIdsBuilder_ == null) { + ensureLinkEndpointIdsIsMutable(); + linkEndpointIds_.add(m); + } else { + linkEndpointIdsBuilder_.addMessage(m); + } + break; + } + // case 26 + case 34: + { + input.readMessage(getAttributesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } + // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Link) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -24796,7 +23847,7 @@ public final class ContextOuterClass { * @return Whether the linkId field is set. */ public boolean hasLinkId() { - return linkIdBuilder_ != null || linkId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -24820,10 +23871,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } linkId_ = value; - onChanged(); } else { linkIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -24833,10 +23885,11 @@ public final class ContextOuterClass { public Builder setLinkId(context.ContextOuterClass.LinkId.Builder builderForValue) { if (linkIdBuilder_ == null) { linkId_ = builderForValue.build(); - onChanged(); } else { linkIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -24845,15 +23898,16 @@ public final class ContextOuterClass { */ public Builder mergeLinkId(context.ContextOuterClass.LinkId value) { if (linkIdBuilder_ == null) { - if (linkId_ != null) { - linkId_ = context.ContextOuterClass.LinkId.newBuilder(linkId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && linkId_ != null && linkId_ != context.ContextOuterClass.LinkId.getDefaultInstance()) { + getLinkIdBuilder().mergeFrom(value); } else { linkId_ = value; } - onChanged(); } else { linkIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -24861,13 +23915,13 @@ public final class ContextOuterClass { * <code>.context.LinkId link_id = 1;</code> */ public Builder clearLinkId() { - if (linkIdBuilder_ == null) { - linkId_ = null; - onChanged(); - } else { - linkId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + linkId_ = null; + if (linkIdBuilder_ != null) { + linkIdBuilder_.dispose(); linkIdBuilder_ = null; } + onChanged(); return this; } @@ -24875,6 +23929,7 @@ public final class ContextOuterClass { * <code>.context.LinkId link_id = 1;</code> */ public context.ContextOuterClass.LinkId.Builder getLinkIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getLinkIdFieldBuilder().getBuilder(); } @@ -24944,6 +23999,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } name_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -24954,6 +24010,7 @@ public final class ContextOuterClass { */ public Builder clearName() { name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -24969,6 +24026,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); name_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -24976,9 +24034,9 @@ public final class ContextOuterClass { private java.util.List<context.ContextOuterClass.EndPointId> linkEndpointIds_ = java.util.Collections.emptyList(); private void ensureLinkEndpointIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!((bitField0_ & 0x00000004) != 0)) { linkEndpointIds_ = new java.util.ArrayList<context.ContextOuterClass.EndPointId>(linkEndpointIds_); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000004; } } @@ -25130,7 +24188,7 @@ public final class ContextOuterClass { public Builder clearLinkEndpointIds() { if (linkEndpointIdsBuilder_ == null) { linkEndpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { linkEndpointIdsBuilder_.clear(); @@ -25204,7 +24262,7 @@ public final class ContextOuterClass { private com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> getLinkEndpointIdsFieldBuilder() { if (linkEndpointIdsBuilder_ == null) { - linkEndpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder>(linkEndpointIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + linkEndpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder>(linkEndpointIds_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); linkEndpointIds_ = null; } return linkEndpointIdsBuilder_; @@ -25219,7 +24277,7 @@ public final class ContextOuterClass { * @return Whether the attributes field is set. */ public boolean hasAttributes() { - return attributesBuilder_ != null || attributes_ != null; + return ((bitField0_ & 0x00000008) != 0); } /** @@ -25243,10 +24301,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } attributes_ = value; - onChanged(); } else { attributesBuilder_.setMessage(value); } + bitField0_ |= 0x00000008; + onChanged(); return this; } @@ -25256,10 +24315,11 @@ public final class ContextOuterClass { public Builder setAttributes(context.ContextOuterClass.LinkAttributes.Builder builderForValue) { if (attributesBuilder_ == null) { attributes_ = builderForValue.build(); - onChanged(); } else { attributesBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000008; + onChanged(); return this; } @@ -25268,15 +24328,16 @@ public final class ContextOuterClass { */ public Builder mergeAttributes(context.ContextOuterClass.LinkAttributes value) { if (attributesBuilder_ == null) { - if (attributes_ != null) { - attributes_ = context.ContextOuterClass.LinkAttributes.newBuilder(attributes_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000008) != 0) && attributes_ != null && attributes_ != context.ContextOuterClass.LinkAttributes.getDefaultInstance()) { + getAttributesBuilder().mergeFrom(value); } else { attributes_ = value; } - onChanged(); } else { attributesBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000008; + onChanged(); return this; } @@ -25284,13 +24345,13 @@ public final class ContextOuterClass { * <code>.context.LinkAttributes attributes = 4;</code> */ public Builder clearAttributes() { - if (attributesBuilder_ == null) { - attributes_ = null; - onChanged(); - } else { - attributes_ = null; + bitField0_ = (bitField0_ & ~0x00000008); + attributes_ = null; + if (attributesBuilder_ != null) { + attributesBuilder_.dispose(); attributesBuilder_ = null; } + onChanged(); return this; } @@ -25298,6 +24359,7 @@ public final class ContextOuterClass { * <code>.context.LinkAttributes attributes = 4;</code> */ public context.ContextOuterClass.LinkAttributes.Builder getAttributesBuilder() { + bitField0_ |= 0x00000008; onChanged(); return getAttributesFieldBuilder().getBuilder(); } @@ -25351,7 +24413,17 @@ public final class ContextOuterClass { @java.lang.Override public Link parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Link(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -25422,57 +24494,6 @@ public final class ContextOuterClass { return new LinkIdList(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private LinkIdList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - linkIds_ = new java.util.ArrayList<context.ContextOuterClass.LinkId>(); - mutable_bitField0_ |= 0x00000001; - } - linkIds_.add(input.readMessage(context.ContextOuterClass.LinkId.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - linkIds_ = java.util.Collections.unmodifiableList(linkIds_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_LinkIdList_descriptor; } @@ -25484,6 +24505,7 @@ public final class ContextOuterClass { public static final int LINK_IDS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.LinkId> linkIds_; /** @@ -25544,7 +24566,7 @@ public final class ContextOuterClass { for (int i = 0; i < linkIds_.size(); i++) { output.writeMessage(1, linkIds_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -25556,7 +24578,7 @@ public final class ContextOuterClass { for (int i = 0; i < linkIds_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, linkIds_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -25572,7 +24594,7 @@ public final class ContextOuterClass { context.ContextOuterClass.LinkIdList other = (context.ContextOuterClass.LinkIdList) obj; if (!getLinkIdsList().equals(other.getLinkIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -25588,7 +24610,7 @@ public final class ContextOuterClass { hash = (37 * hash) + LINK_IDS_FIELD_NUMBER; hash = (53 * hash) + getLinkIdsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -25682,29 +24704,23 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.LinkIdList.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getLinkIdsFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (linkIdsBuilder_ == null) { linkIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + linkIds_ = null; linkIdsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -25730,7 +24746,15 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.LinkIdList buildPartial() { context.ContextOuterClass.LinkIdList result = new context.ContextOuterClass.LinkIdList(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.LinkIdList result) { if (linkIdsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { linkIds_ = java.util.Collections.unmodifiableList(linkIds_); @@ -25740,38 +24764,10 @@ public final class ContextOuterClass { } else { result.linkIds_ = linkIdsBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.LinkIdList result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -25811,7 +24807,7 @@ public final class ContextOuterClass { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -25823,17 +24819,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.LinkIdList parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + context.ContextOuterClass.LinkId m = input.readMessage(context.ContextOuterClass.LinkId.parser(), extensionRegistry); + if (linkIdsBuilder_ == null) { + ensureLinkIdsIsMutable(); + linkIds_.add(m); + } else { + linkIdsBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.LinkIdList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -26103,7 +25129,17 @@ public final class ContextOuterClass { @java.lang.Override public LinkIdList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new LinkIdList(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -26174,57 +25210,6 @@ public final class ContextOuterClass { return new LinkList(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private LinkList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - links_ = new java.util.ArrayList<context.ContextOuterClass.Link>(); - mutable_bitField0_ |= 0x00000001; - } - links_.add(input.readMessage(context.ContextOuterClass.Link.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - links_ = java.util.Collections.unmodifiableList(links_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_LinkList_descriptor; } @@ -26236,6 +25221,7 @@ public final class ContextOuterClass { public static final int LINKS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.Link> links_; /** @@ -26296,7 +25282,7 @@ public final class ContextOuterClass { for (int i = 0; i < links_.size(); i++) { output.writeMessage(1, links_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -26308,7 +25294,7 @@ public final class ContextOuterClass { for (int i = 0; i < links_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, links_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -26324,7 +25310,7 @@ public final class ContextOuterClass { context.ContextOuterClass.LinkList other = (context.ContextOuterClass.LinkList) obj; if (!getLinksList().equals(other.getLinksList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -26340,7 +25326,7 @@ public final class ContextOuterClass { hash = (37 * hash) + LINKS_FIELD_NUMBER; hash = (53 * hash) + getLinksList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -26434,29 +25420,23 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.LinkList.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getLinksFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (linksBuilder_ == null) { links_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + links_ = null; linksBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -26482,7 +25462,15 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.LinkList buildPartial() { context.ContextOuterClass.LinkList result = new context.ContextOuterClass.LinkList(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.LinkList result) { if (linksBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { links_ = java.util.Collections.unmodifiableList(links_); @@ -26492,38 +25480,10 @@ public final class ContextOuterClass { } else { result.links_ = linksBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.LinkList result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -26563,7 +25523,7 @@ public final class ContextOuterClass { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -26575,17 +25535,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.LinkList parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + context.ContextOuterClass.Link m = input.readMessage(context.ContextOuterClass.Link.parser(), extensionRegistry); + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.add(m); + } else { + linksBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.LinkList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -26855,7 +25845,17 @@ public final class ContextOuterClass { @java.lang.Override public LinkList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new LinkList(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -26934,70 +25934,6 @@ public final class ContextOuterClass { return new LinkEvent(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private LinkEvent(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.Event.Builder subBuilder = null; - if (event_ != null) { - subBuilder = event_.toBuilder(); - } - event_ = input.readMessage(context.ContextOuterClass.Event.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(event_); - event_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - context.ContextOuterClass.LinkId.Builder subBuilder = null; - if (linkId_ != null) { - subBuilder = linkId_.toBuilder(); - } - linkId_ = input.readMessage(context.ContextOuterClass.LinkId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(linkId_); - linkId_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_LinkEvent_descriptor; } @@ -27034,7 +25970,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - return getEvent(); + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; } public static final int LINK_ID_FIELD_NUMBER = 2; @@ -27064,7 +26000,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder() { - return getLinkId(); + return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; } private byte memoizedIsInitialized = -1; @@ -27088,7 +26024,7 @@ public final class ContextOuterClass { if (linkId_ != null) { output.writeMessage(2, getLinkId()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -27103,7 +26039,7 @@ public final class ContextOuterClass { if (linkId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getLinkId()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -27129,7 +26065,7 @@ public final class ContextOuterClass { if (!getLinkId().equals(other.getLinkId())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -27149,7 +26085,7 @@ public final class ContextOuterClass { hash = (37 * hash) + LINK_ID_FIELD_NUMBER; hash = (53 * hash) + getLinkId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -27243,32 +26179,24 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.LinkEvent.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (eventBuilder_ == null) { - event_ = null; - } else { - event_ = null; + bitField0_ = 0; + event_ = null; + if (eventBuilder_ != null) { + eventBuilder_.dispose(); eventBuilder_ = null; } - if (linkIdBuilder_ == null) { - linkId_ = null; - } else { - linkId_ = null; + linkId_ = null; + if (linkIdBuilder_ != null) { + linkIdBuilder_.dispose(); linkIdBuilder_ = null; } return this; @@ -27296,48 +26224,21 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.LinkEvent buildPartial() { context.ContextOuterClass.LinkEvent result = new context.ContextOuterClass.LinkEvent(this); - if (eventBuilder_ == null) { - result.event_ = event_; - } else { - result.event_ = eventBuilder_.build(); - } - if (linkIdBuilder_ == null) { - result.linkId_ = linkId_; - } else { - result.linkId_ = linkIdBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.LinkEvent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.event_ = eventBuilder_ == null ? event_ : eventBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.linkId_ = linkIdBuilder_ == null ? linkId_ : linkIdBuilder_.build(); + } } @java.lang.Override @@ -27359,7 +26260,7 @@ public final class ContextOuterClass { if (other.hasLinkId()) { mergeLinkId(other.getLinkId()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -27371,20 +26272,54 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.LinkEvent parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getEventFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + input.readMessage(getLinkIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } + // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.LinkEvent) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.Event event_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> eventBuilder_; @@ -27394,7 +26329,7 @@ public final class ContextOuterClass { * @return Whether the event field is set. */ public boolean hasEvent() { - return eventBuilder_ != null || event_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -27418,10 +26353,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } event_ = value; - onChanged(); } else { eventBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -27431,10 +26367,11 @@ public final class ContextOuterClass { public Builder setEvent(context.ContextOuterClass.Event.Builder builderForValue) { if (eventBuilder_ == null) { event_ = builderForValue.build(); - onChanged(); } else { eventBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -27443,15 +26380,16 @@ public final class ContextOuterClass { */ public Builder mergeEvent(context.ContextOuterClass.Event value) { if (eventBuilder_ == null) { - if (event_ != null) { - event_ = context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && event_ != null && event_ != context.ContextOuterClass.Event.getDefaultInstance()) { + getEventBuilder().mergeFrom(value); } else { event_ = value; } - onChanged(); } else { eventBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -27459,13 +26397,13 @@ public final class ContextOuterClass { * <code>.context.Event event = 1;</code> */ public Builder clearEvent() { - if (eventBuilder_ == null) { - event_ = null; - onChanged(); - } else { - event_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + event_ = null; + if (eventBuilder_ != null) { + eventBuilder_.dispose(); eventBuilder_ = null; } + onChanged(); return this; } @@ -27473,6 +26411,7 @@ public final class ContextOuterClass { * <code>.context.Event event = 1;</code> */ public context.ContextOuterClass.Event.Builder getEventBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getEventFieldBuilder().getBuilder(); } @@ -27508,7 +26447,7 @@ public final class ContextOuterClass { * @return Whether the linkId field is set. */ public boolean hasLinkId() { - return linkIdBuilder_ != null || linkId_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** @@ -27532,10 +26471,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } linkId_ = value; - onChanged(); } else { linkIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -27545,10 +26485,11 @@ public final class ContextOuterClass { public Builder setLinkId(context.ContextOuterClass.LinkId.Builder builderForValue) { if (linkIdBuilder_ == null) { linkId_ = builderForValue.build(); - onChanged(); } else { linkIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -27557,15 +26498,16 @@ public final class ContextOuterClass { */ public Builder mergeLinkId(context.ContextOuterClass.LinkId value) { if (linkIdBuilder_ == null) { - if (linkId_ != null) { - linkId_ = context.ContextOuterClass.LinkId.newBuilder(linkId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000002) != 0) && linkId_ != null && linkId_ != context.ContextOuterClass.LinkId.getDefaultInstance()) { + getLinkIdBuilder().mergeFrom(value); } else { linkId_ = value; } - onChanged(); } else { linkIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -27573,13 +26515,13 @@ public final class ContextOuterClass { * <code>.context.LinkId link_id = 2;</code> */ public Builder clearLinkId() { - if (linkIdBuilder_ == null) { - linkId_ = null; - onChanged(); - } else { - linkId_ = null; + bitField0_ = (bitField0_ & ~0x00000002); + linkId_ = null; + if (linkIdBuilder_ != null) { + linkIdBuilder_.dispose(); linkIdBuilder_ = null; } + onChanged(); return this; } @@ -27587,6 +26529,7 @@ public final class ContextOuterClass { * <code>.context.LinkId link_id = 2;</code> */ public context.ContextOuterClass.LinkId.Builder getLinkIdBuilder() { + bitField0_ |= 0x00000002; onChanged(); return getLinkIdFieldBuilder().getBuilder(); } @@ -27640,7 +26583,17 @@ public final class ContextOuterClass { @java.lang.Override public LinkEvent parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new LinkEvent(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -27723,70 +26676,6 @@ public final class ContextOuterClass { return new ServiceId(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ServiceId(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.ContextId.Builder subBuilder = null; - if (contextId_ != null) { - subBuilder = contextId_.toBuilder(); - } - contextId_ = input.readMessage(context.ContextOuterClass.ContextId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(contextId_); - contextId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - context.ContextOuterClass.Uuid.Builder subBuilder = null; - if (serviceUuid_ != null) { - subBuilder = serviceUuid_.toBuilder(); - } - serviceUuid_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(serviceUuid_); - serviceUuid_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_ServiceId_descriptor; } @@ -27823,7 +26712,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - return getContextId(); + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; } public static final int SERVICE_UUID_FIELD_NUMBER = 2; @@ -27853,7 +26742,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.UuidOrBuilder getServiceUuidOrBuilder() { - return getServiceUuid(); + return serviceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : serviceUuid_; } private byte memoizedIsInitialized = -1; @@ -27877,7 +26766,7 @@ public final class ContextOuterClass { if (serviceUuid_ != null) { output.writeMessage(2, getServiceUuid()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -27892,7 +26781,7 @@ public final class ContextOuterClass { if (serviceUuid_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getServiceUuid()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -27918,7 +26807,7 @@ public final class ContextOuterClass { if (!getServiceUuid().equals(other.getServiceUuid())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -27938,7 +26827,7 @@ public final class ContextOuterClass { hash = (37 * hash) + SERVICE_UUID_FIELD_NUMBER; hash = (53 * hash) + getServiceUuid().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -28036,32 +26925,24 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.ServiceId.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (contextIdBuilder_ == null) { - contextId_ = null; - } else { - contextId_ = null; + bitField0_ = 0; + contextId_ = null; + if (contextIdBuilder_ != null) { + contextIdBuilder_.dispose(); contextIdBuilder_ = null; } - if (serviceUuidBuilder_ == null) { - serviceUuid_ = null; - } else { - serviceUuid_ = null; + serviceUuid_ = null; + if (serviceUuidBuilder_ != null) { + serviceUuidBuilder_.dispose(); serviceUuidBuilder_ = null; } return this; @@ -28089,48 +26970,21 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.ServiceId buildPartial() { context.ContextOuterClass.ServiceId result = new context.ContextOuterClass.ServiceId(this); - if (contextIdBuilder_ == null) { - result.contextId_ = contextId_; - } else { - result.contextId_ = contextIdBuilder_.build(); - } - if (serviceUuidBuilder_ == null) { - result.serviceUuid_ = serviceUuid_; - } else { - result.serviceUuid_ = serviceUuidBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.ServiceId result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.contextId_ = contextIdBuilder_ == null ? contextId_ : contextIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.serviceUuid_ = serviceUuidBuilder_ == null ? serviceUuid_ : serviceUuidBuilder_.build(); + } } @java.lang.Override @@ -28152,7 +27006,7 @@ public final class ContextOuterClass { if (other.hasServiceUuid()) { mergeServiceUuid(other.getServiceUuid()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -28164,20 +27018,54 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.ServiceId parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getContextIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + input.readMessage(getServiceUuidFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } + // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ServiceId) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.ContextId contextId_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> contextIdBuilder_; @@ -28187,7 +27075,7 @@ public final class ContextOuterClass { * @return Whether the contextId field is set. */ public boolean hasContextId() { - return contextIdBuilder_ != null || contextId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -28211,10 +27099,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } contextId_ = value; - onChanged(); } else { contextIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -28224,10 +27113,11 @@ public final class ContextOuterClass { public Builder setContextId(context.ContextOuterClass.ContextId.Builder builderForValue) { if (contextIdBuilder_ == null) { contextId_ = builderForValue.build(); - onChanged(); } else { contextIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -28236,15 +27126,16 @@ public final class ContextOuterClass { */ public Builder mergeContextId(context.ContextOuterClass.ContextId value) { if (contextIdBuilder_ == null) { - if (contextId_ != null) { - contextId_ = context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && contextId_ != null && contextId_ != context.ContextOuterClass.ContextId.getDefaultInstance()) { + getContextIdBuilder().mergeFrom(value); } else { contextId_ = value; } - onChanged(); } else { contextIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -28252,13 +27143,13 @@ public final class ContextOuterClass { * <code>.context.ContextId context_id = 1;</code> */ public Builder clearContextId() { - if (contextIdBuilder_ == null) { - contextId_ = null; - onChanged(); - } else { - contextId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + contextId_ = null; + if (contextIdBuilder_ != null) { + contextIdBuilder_.dispose(); contextIdBuilder_ = null; } + onChanged(); return this; } @@ -28266,6 +27157,7 @@ public final class ContextOuterClass { * <code>.context.ContextId context_id = 1;</code> */ public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getContextIdFieldBuilder().getBuilder(); } @@ -28301,7 +27193,7 @@ public final class ContextOuterClass { * @return Whether the serviceUuid field is set. */ public boolean hasServiceUuid() { - return serviceUuidBuilder_ != null || serviceUuid_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** @@ -28325,10 +27217,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } serviceUuid_ = value; - onChanged(); } else { serviceUuidBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -28338,10 +27231,11 @@ public final class ContextOuterClass { public Builder setServiceUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { if (serviceUuidBuilder_ == null) { serviceUuid_ = builderForValue.build(); - onChanged(); } else { serviceUuidBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -28350,15 +27244,16 @@ public final class ContextOuterClass { */ public Builder mergeServiceUuid(context.ContextOuterClass.Uuid value) { if (serviceUuidBuilder_ == null) { - if (serviceUuid_ != null) { - serviceUuid_ = context.ContextOuterClass.Uuid.newBuilder(serviceUuid_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000002) != 0) && serviceUuid_ != null && serviceUuid_ != context.ContextOuterClass.Uuid.getDefaultInstance()) { + getServiceUuidBuilder().mergeFrom(value); } else { serviceUuid_ = value; } - onChanged(); } else { serviceUuidBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -28366,13 +27261,13 @@ public final class ContextOuterClass { * <code>.context.Uuid service_uuid = 2;</code> */ public Builder clearServiceUuid() { - if (serviceUuidBuilder_ == null) { - serviceUuid_ = null; - onChanged(); - } else { - serviceUuid_ = null; + bitField0_ = (bitField0_ & ~0x00000002); + serviceUuid_ = null; + if (serviceUuidBuilder_ != null) { + serviceUuidBuilder_.dispose(); serviceUuidBuilder_ = null; } + onChanged(); return this; } @@ -28380,6 +27275,7 @@ public final class ContextOuterClass { * <code>.context.Uuid service_uuid = 2;</code> */ public context.ContextOuterClass.Uuid.Builder getServiceUuidBuilder() { + bitField0_ |= 0x00000002; onChanged(); return getServiceUuidFieldBuilder().getBuilder(); } @@ -28433,7 +27329,17 @@ public final class ContextOuterClass { @java.lang.Override public ServiceId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ServiceId(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -28624,133 +27530,6 @@ public final class ContextOuterClass { return new Service(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Service(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.ServiceId.Builder subBuilder = null; - if (serviceId_ != null) { - subBuilder = serviceId_.toBuilder(); - } - serviceId_ = input.readMessage(context.ContextOuterClass.ServiceId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(serviceId_); - serviceId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - name_ = s; - break; - } - case 24: - { - int rawValue = input.readEnum(); - serviceType_ = rawValue; - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - serviceEndpointIds_ = new java.util.ArrayList<context.ContextOuterClass.EndPointId>(); - mutable_bitField0_ |= 0x00000001; - } - serviceEndpointIds_.add(input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry)); - break; - } - case 42: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - serviceConstraints_ = new java.util.ArrayList<context.ContextOuterClass.Constraint>(); - mutable_bitField0_ |= 0x00000002; - } - serviceConstraints_.add(input.readMessage(context.ContextOuterClass.Constraint.parser(), extensionRegistry)); - break; - } - case 50: - { - context.ContextOuterClass.ServiceStatus.Builder subBuilder = null; - if (serviceStatus_ != null) { - subBuilder = serviceStatus_.toBuilder(); - } - serviceStatus_ = input.readMessage(context.ContextOuterClass.ServiceStatus.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(serviceStatus_); - serviceStatus_ = subBuilder.buildPartial(); - } - break; - } - case 58: - { - context.ContextOuterClass.ServiceConfig.Builder subBuilder = null; - if (serviceConfig_ != null) { - subBuilder = serviceConfig_.toBuilder(); - } - serviceConfig_ = input.readMessage(context.ContextOuterClass.ServiceConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(serviceConfig_); - serviceConfig_ = subBuilder.buildPartial(); - } - break; - } - case 66: - { - context.ContextOuterClass.Timestamp.Builder subBuilder = null; - if (timestamp_ != null) { - subBuilder = timestamp_.toBuilder(); - } - timestamp_ = input.readMessage(context.ContextOuterClass.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(timestamp_); - timestamp_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - serviceEndpointIds_ = java.util.Collections.unmodifiableList(serviceEndpointIds_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - serviceConstraints_ = java.util.Collections.unmodifiableList(serviceConstraints_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_Service_descriptor; } @@ -28787,12 +27566,13 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { - return getServiceId(); + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; } public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** * <code>string name = 2;</code> @@ -28829,7 +27609,7 @@ public final class ContextOuterClass { public static final int SERVICE_TYPE_FIELD_NUMBER = 3; - private int serviceType_; + private int serviceType_ = 0; /** * <code>.context.ServiceTypeEnum service_type = 3;</code> @@ -28846,13 +27626,13 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.ServiceTypeEnum getServiceType() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.ServiceTypeEnum result = context.ContextOuterClass.ServiceTypeEnum.valueOf(serviceType_); + context.ContextOuterClass.ServiceTypeEnum result = context.ContextOuterClass.ServiceTypeEnum.forNumber(serviceType_); return result == null ? context.ContextOuterClass.ServiceTypeEnum.UNRECOGNIZED : result; } public static final int SERVICE_ENDPOINT_IDS_FIELD_NUMBER = 4; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.EndPointId> serviceEndpointIds_; /** @@ -28897,6 +27677,7 @@ public final class ContextOuterClass { public static final int SERVICE_CONSTRAINTS_FIELD_NUMBER = 5; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.Constraint> serviceConstraints_; /** @@ -28966,7 +27747,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.ServiceStatusOrBuilder getServiceStatusOrBuilder() { - return getServiceStatus(); + return serviceStatus_ == null ? context.ContextOuterClass.ServiceStatus.getDefaultInstance() : serviceStatus_; } public static final int SERVICE_CONFIG_FIELD_NUMBER = 7; @@ -28996,7 +27777,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.ServiceConfigOrBuilder getServiceConfigOrBuilder() { - return getServiceConfig(); + return serviceConfig_ == null ? context.ContextOuterClass.ServiceConfig.getDefaultInstance() : serviceConfig_; } public static final int TIMESTAMP_FIELD_NUMBER = 8; @@ -29026,7 +27807,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - return getTimestamp(); + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; } private byte memoizedIsInitialized = -1; @@ -29047,7 +27828,7 @@ public final class ContextOuterClass { if (serviceId_ != null) { output.writeMessage(1, getServiceId()); } - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); } if (serviceType_ != context.ContextOuterClass.ServiceTypeEnum.SERVICETYPE_UNKNOWN.getNumber()) { @@ -29068,7 +27849,7 @@ public final class ContextOuterClass { if (timestamp_ != null) { output.writeMessage(8, getTimestamp()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -29080,7 +27861,7 @@ public final class ContextOuterClass { if (serviceId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getServiceId()); } - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); } if (serviceType_ != context.ContextOuterClass.ServiceTypeEnum.SERVICETYPE_UNKNOWN.getNumber()) { @@ -29101,7 +27882,7 @@ public final class ContextOuterClass { if (timestamp_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getTimestamp()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -29147,7 +27928,7 @@ public final class ContextOuterClass { if (!getTimestamp().equals(other.getTimestamp())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -29187,7 +27968,7 @@ public final class ContextOuterClass { hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; hash = (53 * hash) + getTimestamp().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -29281,60 +28062,50 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.Service.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getServiceEndpointIdsFieldBuilder(); - getServiceConstraintsFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); - if (serviceIdBuilder_ == null) { - serviceId_ = null; - } else { - serviceId_ = null; + bitField0_ = 0; + serviceId_ = null; + if (serviceIdBuilder_ != null) { + serviceIdBuilder_.dispose(); serviceIdBuilder_ = null; } name_ = ""; serviceType_ = 0; if (serviceEndpointIdsBuilder_ == null) { serviceEndpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + serviceEndpointIds_ = null; serviceEndpointIdsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000008); if (serviceConstraintsBuilder_ == null) { serviceConstraints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + serviceConstraints_ = null; serviceConstraintsBuilder_.clear(); } - if (serviceStatusBuilder_ == null) { - serviceStatus_ = null; - } else { - serviceStatus_ = null; + bitField0_ = (bitField0_ & ~0x00000010); + serviceStatus_ = null; + if (serviceStatusBuilder_ != null) { + serviceStatusBuilder_.dispose(); serviceStatusBuilder_ = null; } - if (serviceConfigBuilder_ == null) { - serviceConfig_ = null; - } else { - serviceConfig_ = null; + serviceConfig_ = null; + if (serviceConfigBuilder_ != null) { + serviceConfigBuilder_.dispose(); serviceConfigBuilder_ = null; } - if (timestampBuilder_ == null) { - timestamp_ = null; - } else { - timestamp_ = null; + timestamp_ = null; + if (timestampBuilder_ != null) { + timestampBuilder_.dispose(); timestampBuilder_ = null; } return this; @@ -29362,79 +28133,55 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.Service buildPartial() { context.ContextOuterClass.Service result = new context.ContextOuterClass.Service(this); - int from_bitField0_ = bitField0_; - if (serviceIdBuilder_ == null) { - result.serviceId_ = serviceId_; - } else { - result.serviceId_ = serviceIdBuilder_.build(); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); } - result.name_ = name_; - result.serviceType_ = serviceType_; + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.Service result) { if (serviceEndpointIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000008) != 0)) { serviceEndpointIds_ = java.util.Collections.unmodifiableList(serviceEndpointIds_); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000008); } result.serviceEndpointIds_ = serviceEndpointIds_; } else { result.serviceEndpointIds_ = serviceEndpointIdsBuilder_.build(); } if (serviceConstraintsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000010) != 0)) { serviceConstraints_ = java.util.Collections.unmodifiableList(serviceConstraints_); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000010); } result.serviceConstraints_ = serviceConstraints_; } else { result.serviceConstraints_ = serviceConstraintsBuilder_.build(); } - if (serviceStatusBuilder_ == null) { - result.serviceStatus_ = serviceStatus_; - } else { - result.serviceStatus_ = serviceStatusBuilder_.build(); + } + + private void buildPartial0(context.ContextOuterClass.Service result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.serviceId_ = serviceIdBuilder_ == null ? serviceId_ : serviceIdBuilder_.build(); } - if (serviceConfigBuilder_ == null) { - result.serviceConfig_ = serviceConfig_; - } else { - result.serviceConfig_ = serviceConfigBuilder_.build(); + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; } - if (timestampBuilder_ == null) { - result.timestamp_ = timestamp_; - } else { - result.timestamp_ = timestampBuilder_.build(); + if (((from_bitField0_ & 0x00000004) != 0)) { + result.serviceType_ = serviceType_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.serviceStatus_ = serviceStatusBuilder_ == null ? serviceStatus_ : serviceStatusBuilder_.build(); + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.serviceConfig_ = serviceConfigBuilder_ == null ? serviceConfig_ : serviceConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.timestamp_ = timestampBuilder_ == null ? timestamp_ : timestampBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); } @java.lang.Override @@ -29455,6 +28202,7 @@ public final class ContextOuterClass { } if (!other.getName().isEmpty()) { name_ = other.name_; + bitField0_ |= 0x00000002; onChanged(); } if (other.serviceType_ != 0) { @@ -29464,7 +28212,7 @@ public final class ContextOuterClass { if (!other.serviceEndpointIds_.isEmpty()) { if (serviceEndpointIds_.isEmpty()) { serviceEndpointIds_ = other.serviceEndpointIds_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000008); } else { ensureServiceEndpointIdsIsMutable(); serviceEndpointIds_.addAll(other.serviceEndpointIds_); @@ -29477,7 +28225,7 @@ public final class ContextOuterClass { serviceEndpointIdsBuilder_.dispose(); serviceEndpointIdsBuilder_ = null; serviceEndpointIds_ = other.serviceEndpointIds_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000008); serviceEndpointIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getServiceEndpointIdsFieldBuilder() : null; } else { serviceEndpointIdsBuilder_.addAllMessages(other.serviceEndpointIds_); @@ -29488,7 +28236,7 @@ public final class ContextOuterClass { if (!other.serviceConstraints_.isEmpty()) { if (serviceConstraints_.isEmpty()) { serviceConstraints_ = other.serviceConstraints_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000010); } else { ensureServiceConstraintsIsMutable(); serviceConstraints_.addAll(other.serviceConstraints_); @@ -29501,7 +28249,7 @@ public final class ContextOuterClass { serviceConstraintsBuilder_.dispose(); serviceConstraintsBuilder_ = null; serviceConstraints_ = other.serviceConstraints_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000010); serviceConstraintsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getServiceConstraintsFieldBuilder() : null; } else { serviceConstraintsBuilder_.addAllMessages(other.serviceConstraints_); @@ -29517,7 +28265,7 @@ public final class ContextOuterClass { if (other.hasTimestamp()) { mergeTimestamp(other.getTimestamp()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -29529,17 +28277,101 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.Service parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getServiceIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 24: + { + serviceType_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } + // case 24 + case 34: + { + context.ContextOuterClass.EndPointId m = input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry); + if (serviceEndpointIdsBuilder_ == null) { + ensureServiceEndpointIdsIsMutable(); + serviceEndpointIds_.add(m); + } else { + serviceEndpointIdsBuilder_.addMessage(m); + } + break; + } + // case 34 + case 42: + { + context.ContextOuterClass.Constraint m = input.readMessage(context.ContextOuterClass.Constraint.parser(), extensionRegistry); + if (serviceConstraintsBuilder_ == null) { + ensureServiceConstraintsIsMutable(); + serviceConstraints_.add(m); + } else { + serviceConstraintsBuilder_.addMessage(m); + } + break; + } + // case 42 + case 50: + { + input.readMessage(getServiceStatusFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } + // case 50 + case 58: + { + input.readMessage(getServiceConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } + // case 58 + case 66: + { + input.readMessage(getTimestampFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } + // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Service) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -29554,7 +28386,7 @@ public final class ContextOuterClass { * @return Whether the serviceId field is set. */ public boolean hasServiceId() { - return serviceIdBuilder_ != null || serviceId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -29578,10 +28410,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } serviceId_ = value; - onChanged(); } else { serviceIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -29591,10 +28424,11 @@ public final class ContextOuterClass { public Builder setServiceId(context.ContextOuterClass.ServiceId.Builder builderForValue) { if (serviceIdBuilder_ == null) { serviceId_ = builderForValue.build(); - onChanged(); } else { serviceIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -29603,15 +28437,16 @@ public final class ContextOuterClass { */ public Builder mergeServiceId(context.ContextOuterClass.ServiceId value) { if (serviceIdBuilder_ == null) { - if (serviceId_ != null) { - serviceId_ = context.ContextOuterClass.ServiceId.newBuilder(serviceId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && serviceId_ != null && serviceId_ != context.ContextOuterClass.ServiceId.getDefaultInstance()) { + getServiceIdBuilder().mergeFrom(value); } else { serviceId_ = value; } - onChanged(); } else { serviceIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -29619,13 +28454,13 @@ public final class ContextOuterClass { * <code>.context.ServiceId service_id = 1;</code> */ public Builder clearServiceId() { - if (serviceIdBuilder_ == null) { - serviceId_ = null; - onChanged(); - } else { - serviceId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + serviceId_ = null; + if (serviceIdBuilder_ != null) { + serviceIdBuilder_.dispose(); serviceIdBuilder_ = null; } + onChanged(); return this; } @@ -29633,6 +28468,7 @@ public final class ContextOuterClass { * <code>.context.ServiceId service_id = 1;</code> */ public context.ContextOuterClass.ServiceId.Builder getServiceIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getServiceIdFieldBuilder().getBuilder(); } @@ -29702,6 +28538,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } name_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -29712,6 +28549,7 @@ public final class ContextOuterClass { */ public Builder clearName() { name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -29727,6 +28565,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); name_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -29749,6 +28588,7 @@ public final class ContextOuterClass { */ public Builder setServiceTypeValue(int value) { serviceType_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -29759,8 +28599,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.ServiceTypeEnum getServiceType() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.ServiceTypeEnum result = context.ContextOuterClass.ServiceTypeEnum.valueOf(serviceType_); + context.ContextOuterClass.ServiceTypeEnum result = context.ContextOuterClass.ServiceTypeEnum.forNumber(serviceType_); return result == null ? context.ContextOuterClass.ServiceTypeEnum.UNRECOGNIZED : result; } @@ -29773,6 +28612,7 @@ public final class ContextOuterClass { if (value == null) { throw new NullPointerException(); } + bitField0_ |= 0x00000004; serviceType_ = value.getNumber(); onChanged(); return this; @@ -29783,6 +28623,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearServiceType() { + bitField0_ = (bitField0_ & ~0x00000004); serviceType_ = 0; onChanged(); return this; @@ -29791,9 +28632,9 @@ public final class ContextOuterClass { private java.util.List<context.ContextOuterClass.EndPointId> serviceEndpointIds_ = java.util.Collections.emptyList(); private void ensureServiceEndpointIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!((bitField0_ & 0x00000008) != 0)) { serviceEndpointIds_ = new java.util.ArrayList<context.ContextOuterClass.EndPointId>(serviceEndpointIds_); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000008; } } @@ -29945,7 +28786,7 @@ public final class ContextOuterClass { public Builder clearServiceEndpointIds() { if (serviceEndpointIdsBuilder_ == null) { serviceEndpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { serviceEndpointIdsBuilder_.clear(); @@ -30019,7 +28860,7 @@ public final class ContextOuterClass { private com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> getServiceEndpointIdsFieldBuilder() { if (serviceEndpointIdsBuilder_ == null) { - serviceEndpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder>(serviceEndpointIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + serviceEndpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder>(serviceEndpointIds_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); serviceEndpointIds_ = null; } return serviceEndpointIdsBuilder_; @@ -30028,9 +28869,9 @@ public final class ContextOuterClass { private java.util.List<context.ContextOuterClass.Constraint> serviceConstraints_ = java.util.Collections.emptyList(); private void ensureServiceConstraintsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { + if (!((bitField0_ & 0x00000010) != 0)) { serviceConstraints_ = new java.util.ArrayList<context.ContextOuterClass.Constraint>(serviceConstraints_); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000010; } } @@ -30182,7 +29023,7 @@ public final class ContextOuterClass { public Builder clearServiceConstraints() { if (serviceConstraintsBuilder_ == null) { serviceConstraints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); } else { serviceConstraintsBuilder_.clear(); @@ -30256,7 +29097,7 @@ public final class ContextOuterClass { private com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.Constraint, context.ContextOuterClass.Constraint.Builder, context.ContextOuterClass.ConstraintOrBuilder> getServiceConstraintsFieldBuilder() { if (serviceConstraintsBuilder_ == null) { - serviceConstraintsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.Constraint, context.ContextOuterClass.Constraint.Builder, context.ContextOuterClass.ConstraintOrBuilder>(serviceConstraints_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + serviceConstraintsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.Constraint, context.ContextOuterClass.Constraint.Builder, context.ContextOuterClass.ConstraintOrBuilder>(serviceConstraints_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); serviceConstraints_ = null; } return serviceConstraintsBuilder_; @@ -30271,7 +29112,7 @@ public final class ContextOuterClass { * @return Whether the serviceStatus field is set. */ public boolean hasServiceStatus() { - return serviceStatusBuilder_ != null || serviceStatus_ != null; + return ((bitField0_ & 0x00000020) != 0); } /** @@ -30295,10 +29136,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } serviceStatus_ = value; - onChanged(); } else { serviceStatusBuilder_.setMessage(value); } + bitField0_ |= 0x00000020; + onChanged(); return this; } @@ -30308,10 +29150,11 @@ public final class ContextOuterClass { public Builder setServiceStatus(context.ContextOuterClass.ServiceStatus.Builder builderForValue) { if (serviceStatusBuilder_ == null) { serviceStatus_ = builderForValue.build(); - onChanged(); } else { serviceStatusBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000020; + onChanged(); return this; } @@ -30320,15 +29163,16 @@ public final class ContextOuterClass { */ public Builder mergeServiceStatus(context.ContextOuterClass.ServiceStatus value) { if (serviceStatusBuilder_ == null) { - if (serviceStatus_ != null) { - serviceStatus_ = context.ContextOuterClass.ServiceStatus.newBuilder(serviceStatus_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000020) != 0) && serviceStatus_ != null && serviceStatus_ != context.ContextOuterClass.ServiceStatus.getDefaultInstance()) { + getServiceStatusBuilder().mergeFrom(value); } else { serviceStatus_ = value; } - onChanged(); } else { serviceStatusBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000020; + onChanged(); return this; } @@ -30336,13 +29180,13 @@ public final class ContextOuterClass { * <code>.context.ServiceStatus service_status = 6;</code> */ public Builder clearServiceStatus() { - if (serviceStatusBuilder_ == null) { - serviceStatus_ = null; - onChanged(); - } else { - serviceStatus_ = null; + bitField0_ = (bitField0_ & ~0x00000020); + serviceStatus_ = null; + if (serviceStatusBuilder_ != null) { + serviceStatusBuilder_.dispose(); serviceStatusBuilder_ = null; } + onChanged(); return this; } @@ -30350,6 +29194,7 @@ public final class ContextOuterClass { * <code>.context.ServiceStatus service_status = 6;</code> */ public context.ContextOuterClass.ServiceStatus.Builder getServiceStatusBuilder() { + bitField0_ |= 0x00000020; onChanged(); return getServiceStatusFieldBuilder().getBuilder(); } @@ -30385,7 +29230,7 @@ public final class ContextOuterClass { * @return Whether the serviceConfig field is set. */ public boolean hasServiceConfig() { - return serviceConfigBuilder_ != null || serviceConfig_ != null; + return ((bitField0_ & 0x00000040) != 0); } /** @@ -30409,10 +29254,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } serviceConfig_ = value; - onChanged(); } else { serviceConfigBuilder_.setMessage(value); } + bitField0_ |= 0x00000040; + onChanged(); return this; } @@ -30422,10 +29268,11 @@ public final class ContextOuterClass { public Builder setServiceConfig(context.ContextOuterClass.ServiceConfig.Builder builderForValue) { if (serviceConfigBuilder_ == null) { serviceConfig_ = builderForValue.build(); - onChanged(); } else { serviceConfigBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000040; + onChanged(); return this; } @@ -30434,15 +29281,16 @@ public final class ContextOuterClass { */ public Builder mergeServiceConfig(context.ContextOuterClass.ServiceConfig value) { if (serviceConfigBuilder_ == null) { - if (serviceConfig_ != null) { - serviceConfig_ = context.ContextOuterClass.ServiceConfig.newBuilder(serviceConfig_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000040) != 0) && serviceConfig_ != null && serviceConfig_ != context.ContextOuterClass.ServiceConfig.getDefaultInstance()) { + getServiceConfigBuilder().mergeFrom(value); } else { serviceConfig_ = value; } - onChanged(); } else { serviceConfigBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000040; + onChanged(); return this; } @@ -30450,13 +29298,13 @@ public final class ContextOuterClass { * <code>.context.ServiceConfig service_config = 7;</code> */ public Builder clearServiceConfig() { - if (serviceConfigBuilder_ == null) { - serviceConfig_ = null; - onChanged(); - } else { - serviceConfig_ = null; + bitField0_ = (bitField0_ & ~0x00000040); + serviceConfig_ = null; + if (serviceConfigBuilder_ != null) { + serviceConfigBuilder_.dispose(); serviceConfigBuilder_ = null; } + onChanged(); return this; } @@ -30464,6 +29312,7 @@ public final class ContextOuterClass { * <code>.context.ServiceConfig service_config = 7;</code> */ public context.ContextOuterClass.ServiceConfig.Builder getServiceConfigBuilder() { + bitField0_ |= 0x00000040; onChanged(); return getServiceConfigFieldBuilder().getBuilder(); } @@ -30499,7 +29348,7 @@ public final class ContextOuterClass { * @return Whether the timestamp field is set. */ public boolean hasTimestamp() { - return timestampBuilder_ != null || timestamp_ != null; + return ((bitField0_ & 0x00000080) != 0); } /** @@ -30523,10 +29372,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } timestamp_ = value; - onChanged(); } else { timestampBuilder_.setMessage(value); } + bitField0_ |= 0x00000080; + onChanged(); return this; } @@ -30536,10 +29386,11 @@ public final class ContextOuterClass { public Builder setTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) { if (timestampBuilder_ == null) { timestamp_ = builderForValue.build(); - onChanged(); } else { timestampBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000080; + onChanged(); return this; } @@ -30548,15 +29399,16 @@ public final class ContextOuterClass { */ public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) { if (timestampBuilder_ == null) { - if (timestamp_ != null) { - timestamp_ = context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000080) != 0) && timestamp_ != null && timestamp_ != context.ContextOuterClass.Timestamp.getDefaultInstance()) { + getTimestampBuilder().mergeFrom(value); } else { timestamp_ = value; } - onChanged(); } else { timestampBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000080; + onChanged(); return this; } @@ -30564,13 +29416,13 @@ public final class ContextOuterClass { * <code>.context.Timestamp timestamp = 8;</code> */ public Builder clearTimestamp() { - if (timestampBuilder_ == null) { - timestamp_ = null; - onChanged(); - } else { - timestamp_ = null; + bitField0_ = (bitField0_ & ~0x00000080); + timestamp_ = null; + if (timestampBuilder_ != null) { + timestampBuilder_.dispose(); timestampBuilder_ = null; } + onChanged(); return this; } @@ -30578,6 +29430,7 @@ public final class ContextOuterClass { * <code>.context.Timestamp timestamp = 8;</code> */ public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() { + bitField0_ |= 0x00000080; onChanged(); return getTimestampFieldBuilder().getBuilder(); } @@ -30631,7 +29484,17 @@ public final class ContextOuterClass { @java.lang.Override public Service parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Service(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -30689,50 +29552,6 @@ public final class ContextOuterClass { return new ServiceStatus(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ServiceStatus(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 8: - { - int rawValue = input.readEnum(); - serviceStatus_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_ServiceStatus_descriptor; } @@ -30744,7 +29563,7 @@ public final class ContextOuterClass { public static final int SERVICE_STATUS_FIELD_NUMBER = 1; - private int serviceStatus_; + private int serviceStatus_ = 0; /** * <code>.context.ServiceStatusEnum service_status = 1;</code> @@ -30761,8 +29580,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.ServiceStatusEnum getServiceStatus() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.ServiceStatusEnum result = context.ContextOuterClass.ServiceStatusEnum.valueOf(serviceStatus_); + context.ContextOuterClass.ServiceStatusEnum result = context.ContextOuterClass.ServiceStatusEnum.forNumber(serviceStatus_); return result == null ? context.ContextOuterClass.ServiceStatusEnum.UNRECOGNIZED : result; } @@ -30784,7 +29602,7 @@ public final class ContextOuterClass { if (serviceStatus_ != context.ContextOuterClass.ServiceStatusEnum.SERVICESTATUS_UNDEFINED.getNumber()) { output.writeEnum(1, serviceStatus_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -30796,7 +29614,7 @@ public final class ContextOuterClass { if (serviceStatus_ != context.ContextOuterClass.ServiceStatusEnum.SERVICESTATUS_UNDEFINED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, serviceStatus_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -30812,7 +29630,7 @@ public final class ContextOuterClass { context.ContextOuterClass.ServiceStatus other = (context.ContextOuterClass.ServiceStatus) obj; if (serviceStatus_ != other.serviceStatus_) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -30826,7 +29644,7 @@ public final class ContextOuterClass { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + SERVICE_STATUS_FIELD_NUMBER; hash = (53 * hash) + serviceStatus_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -30920,22 +29738,16 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.ServiceStatus.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; serviceStatus_ = 0; return this; } @@ -30962,39 +29774,18 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.ServiceStatus buildPartial() { context.ContextOuterClass.ServiceStatus result = new context.ContextOuterClass.ServiceStatus(this); - result.serviceStatus_ = serviceStatus_; + if (bitField0_ != 0) { + buildPartial0(result); + } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.ServiceStatus result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.serviceStatus_ = serviceStatus_; + } } @java.lang.Override @@ -31013,7 +29804,7 @@ public final class ContextOuterClass { if (other.serviceStatus_ != 0) { setServiceStatusValue(other.getServiceStatusValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -31025,20 +29816,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.ServiceStatus parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 8: + { + serviceStatus_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } + // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ServiceStatus) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private int serviceStatus_ = 0; /** @@ -31057,6 +29875,7 @@ public final class ContextOuterClass { */ public Builder setServiceStatusValue(int value) { serviceStatus_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -31067,8 +29886,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.ServiceStatusEnum getServiceStatus() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.ServiceStatusEnum result = context.ContextOuterClass.ServiceStatusEnum.valueOf(serviceStatus_); + context.ContextOuterClass.ServiceStatusEnum result = context.ContextOuterClass.ServiceStatusEnum.forNumber(serviceStatus_); return result == null ? context.ContextOuterClass.ServiceStatusEnum.UNRECOGNIZED : result; } @@ -31081,6 +29899,7 @@ public final class ContextOuterClass { if (value == null) { throw new NullPointerException(); } + bitField0_ |= 0x00000001; serviceStatus_ = value.getNumber(); onChanged(); return this; @@ -31091,6 +29910,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearServiceStatus() { + bitField0_ = (bitField0_ & ~0x00000001); serviceStatus_ = 0; onChanged(); return this; @@ -31123,7 +29943,17 @@ public final class ContextOuterClass { @java.lang.Override public ServiceStatus parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ServiceStatus(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -31194,57 +30024,6 @@ public final class ContextOuterClass { return new ServiceConfig(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ServiceConfig(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - configRules_ = new java.util.ArrayList<context.ContextOuterClass.ConfigRule>(); - mutable_bitField0_ |= 0x00000001; - } - configRules_.add(input.readMessage(context.ContextOuterClass.ConfigRule.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - configRules_ = java.util.Collections.unmodifiableList(configRules_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_ServiceConfig_descriptor; } @@ -31256,6 +30035,7 @@ public final class ContextOuterClass { public static final int CONFIG_RULES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.ConfigRule> configRules_; /** @@ -31316,7 +30096,7 @@ public final class ContextOuterClass { for (int i = 0; i < configRules_.size(); i++) { output.writeMessage(1, configRules_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -31328,7 +30108,7 @@ public final class ContextOuterClass { for (int i = 0; i < configRules_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, configRules_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -31344,7 +30124,7 @@ public final class ContextOuterClass { context.ContextOuterClass.ServiceConfig other = (context.ContextOuterClass.ServiceConfig) obj; if (!getConfigRulesList().equals(other.getConfigRulesList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -31360,7 +30140,7 @@ public final class ContextOuterClass { hash = (37 * hash) + CONFIG_RULES_FIELD_NUMBER; hash = (53 * hash) + getConfigRulesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -31454,29 +30234,23 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.ServiceConfig.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getConfigRulesFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (configRulesBuilder_ == null) { configRules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + configRules_ = null; configRulesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -31502,7 +30276,15 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.ServiceConfig buildPartial() { context.ContextOuterClass.ServiceConfig result = new context.ContextOuterClass.ServiceConfig(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.ServiceConfig result) { if (configRulesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { configRules_ = java.util.Collections.unmodifiableList(configRules_); @@ -31512,38 +30294,10 @@ public final class ContextOuterClass { } else { result.configRules_ = configRulesBuilder_.build(); } - onBuilt(); - return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.ServiceConfig result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -31583,7 +30337,7 @@ public final class ContextOuterClass { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -31595,17 +30349,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.ServiceConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + context.ContextOuterClass.ConfigRule m = input.readMessage(context.ContextOuterClass.ConfigRule.parser(), extensionRegistry); + if (configRulesBuilder_ == null) { + ensureConfigRulesIsMutable(); + configRules_.add(m); + } else { + configRulesBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ServiceConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -31875,7 +30659,17 @@ public final class ContextOuterClass { @java.lang.Override public ServiceConfig parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ServiceConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -31946,57 +30740,6 @@ public final class ContextOuterClass { return new ServiceIdList(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ServiceIdList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - serviceIds_ = new java.util.ArrayList<context.ContextOuterClass.ServiceId>(); - mutable_bitField0_ |= 0x00000001; - } - serviceIds_.add(input.readMessage(context.ContextOuterClass.ServiceId.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - serviceIds_ = java.util.Collections.unmodifiableList(serviceIds_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_ServiceIdList_descriptor; } @@ -32008,6 +30751,7 @@ public final class ContextOuterClass { public static final int SERVICE_IDS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.ServiceId> serviceIds_; /** @@ -32068,7 +30812,7 @@ public final class ContextOuterClass { for (int i = 0; i < serviceIds_.size(); i++) { output.writeMessage(1, serviceIds_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -32080,7 +30824,7 @@ public final class ContextOuterClass { for (int i = 0; i < serviceIds_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, serviceIds_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -32096,7 +30840,7 @@ public final class ContextOuterClass { context.ContextOuterClass.ServiceIdList other = (context.ContextOuterClass.ServiceIdList) obj; if (!getServiceIdsList().equals(other.getServiceIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -32112,7 +30856,7 @@ public final class ContextOuterClass { hash = (37 * hash) + SERVICE_IDS_FIELD_NUMBER; hash = (53 * hash) + getServiceIdsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -32206,29 +30950,23 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.ServiceIdList.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getServiceIdsFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (serviceIdsBuilder_ == null) { serviceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + serviceIds_ = null; serviceIdsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -32254,7 +30992,15 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.ServiceIdList buildPartial() { context.ContextOuterClass.ServiceIdList result = new context.ContextOuterClass.ServiceIdList(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.ServiceIdList result) { if (serviceIdsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { serviceIds_ = java.util.Collections.unmodifiableList(serviceIds_); @@ -32264,38 +31010,10 @@ public final class ContextOuterClass { } else { result.serviceIds_ = serviceIdsBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); } - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.ServiceIdList result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -32335,7 +31053,7 @@ public final class ContextOuterClass { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -32347,17 +31065,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.ServiceIdList parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + context.ContextOuterClass.ServiceId m = input.readMessage(context.ContextOuterClass.ServiceId.parser(), extensionRegistry); + if (serviceIdsBuilder_ == null) { + ensureServiceIdsIsMutable(); + serviceIds_.add(m); + } else { + serviceIdsBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ServiceIdList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -32627,7 +31375,17 @@ public final class ContextOuterClass { @java.lang.Override public ServiceIdList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ServiceIdList(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -32698,57 +31456,6 @@ public final class ContextOuterClass { return new ServiceList(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ServiceList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - services_ = new java.util.ArrayList<context.ContextOuterClass.Service>(); - mutable_bitField0_ |= 0x00000001; - } - services_.add(input.readMessage(context.ContextOuterClass.Service.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - services_ = java.util.Collections.unmodifiableList(services_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_ServiceList_descriptor; } @@ -32760,6 +31467,7 @@ public final class ContextOuterClass { public static final int SERVICES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.Service> services_; /** @@ -32820,7 +31528,7 @@ public final class ContextOuterClass { for (int i = 0; i < services_.size(); i++) { output.writeMessage(1, services_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -32832,7 +31540,7 @@ public final class ContextOuterClass { for (int i = 0; i < services_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, services_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -32848,7 +31556,7 @@ public final class ContextOuterClass { context.ContextOuterClass.ServiceList other = (context.ContextOuterClass.ServiceList) obj; if (!getServicesList().equals(other.getServicesList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -32864,7 +31572,7 @@ public final class ContextOuterClass { hash = (37 * hash) + SERVICES_FIELD_NUMBER; hash = (53 * hash) + getServicesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -32958,29 +31666,23 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.ServiceList.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getServicesFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (servicesBuilder_ == null) { services_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + services_ = null; servicesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -33006,7 +31708,15 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.ServiceList buildPartial() { context.ContextOuterClass.ServiceList result = new context.ContextOuterClass.ServiceList(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.ServiceList result) { if (servicesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { services_ = java.util.Collections.unmodifiableList(services_); @@ -33016,38 +31726,10 @@ public final class ContextOuterClass { } else { result.services_ = servicesBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); } - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.ServiceList result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -33087,7 +31769,7 @@ public final class ContextOuterClass { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -33099,17 +31781,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.ServiceList parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + context.ContextOuterClass.Service m = input.readMessage(context.ContextOuterClass.Service.parser(), extensionRegistry); + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.add(m); + } else { + servicesBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ServiceList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -33379,7 +32091,17 @@ public final class ContextOuterClass { @java.lang.Override public ServiceList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ServiceList(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -33459,72 +32181,6 @@ public final class ContextOuterClass { return new ServiceFilter(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ServiceFilter(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.ServiceIdList.Builder subBuilder = null; - if (serviceIds_ != null) { - subBuilder = serviceIds_.toBuilder(); - } - serviceIds_ = input.readMessage(context.ContextOuterClass.ServiceIdList.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(serviceIds_); - serviceIds_ = subBuilder.buildPartial(); - } - break; - } - case 16: - { - includeEndpointIds_ = input.readBool(); - break; - } - case 24: - { - includeConstraints_ = input.readBool(); - break; - } - case 32: - { - includeConfigRules_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_ServiceFilter_descriptor; } @@ -33561,12 +32217,12 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.ServiceIdListOrBuilder getServiceIdsOrBuilder() { - return getServiceIds(); + return serviceIds_ == null ? context.ContextOuterClass.ServiceIdList.getDefaultInstance() : serviceIds_; } public static final int INCLUDE_ENDPOINT_IDS_FIELD_NUMBER = 2; - private boolean includeEndpointIds_; + private boolean includeEndpointIds_ = false; /** * <code>bool include_endpoint_ids = 2;</code> @@ -33579,7 +32235,7 @@ public final class ContextOuterClass { public static final int INCLUDE_CONSTRAINTS_FIELD_NUMBER = 3; - private boolean includeConstraints_; + private boolean includeConstraints_ = false; /** * <code>bool include_constraints = 3;</code> @@ -33592,7 +32248,7 @@ public final class ContextOuterClass { public static final int INCLUDE_CONFIG_RULES_FIELD_NUMBER = 4; - private boolean includeConfigRules_; + private boolean includeConfigRules_ = false; /** * <code>bool include_config_rules = 4;</code> @@ -33630,7 +32286,7 @@ public final class ContextOuterClass { if (includeConfigRules_ != false) { output.writeBool(4, includeConfigRules_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -33651,7 +32307,7 @@ public final class ContextOuterClass { if (includeConfigRules_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, includeConfigRules_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -33677,7 +32333,7 @@ public final class ContextOuterClass { return false; if (getIncludeConfigRules() != other.getIncludeConfigRules()) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -33699,7 +32355,7 @@ public final class ContextOuterClass { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeConstraints()); hash = (37 * hash) + INCLUDE_CONFIG_RULES_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeConfigRules()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -33793,26 +32449,19 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.ServiceFilter.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (serviceIdsBuilder_ == null) { - serviceIds_ = null; - } else { - serviceIds_ = null; + bitField0_ = 0; + serviceIds_ = null; + if (serviceIdsBuilder_ != null) { + serviceIdsBuilder_.dispose(); serviceIdsBuilder_ = null; } includeEndpointIds_ = false; @@ -33843,46 +32492,27 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.ServiceFilter buildPartial() { context.ContextOuterClass.ServiceFilter result = new context.ContextOuterClass.ServiceFilter(this); - if (serviceIdsBuilder_ == null) { - result.serviceIds_ = serviceIds_; - } else { - result.serviceIds_ = serviceIdsBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } - result.includeEndpointIds_ = includeEndpointIds_; - result.includeConstraints_ = includeConstraints_; - result.includeConfigRules_ = includeConfigRules_; onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.ServiceFilter result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.serviceIds_ = serviceIdsBuilder_ == null ? serviceIds_ : serviceIdsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.includeEndpointIds_ = includeEndpointIds_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.includeConstraints_ = includeConstraints_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.includeConfigRules_ = includeConfigRules_; + } } @java.lang.Override @@ -33910,7 +32540,7 @@ public final class ContextOuterClass { if (other.getIncludeConfigRules() != false) { setIncludeConfigRules(other.getIncludeConfigRules()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -33922,20 +32552,68 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.ServiceFilter parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getServiceIdsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 16: + { + includeEndpointIds_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } + // case 16 + case 24: + { + includeConstraints_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } + // case 24 + case 32: + { + includeConfigRules_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } + // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ServiceFilter) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.ServiceIdList serviceIds_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.ServiceIdList, context.ContextOuterClass.ServiceIdList.Builder, context.ContextOuterClass.ServiceIdListOrBuilder> serviceIdsBuilder_; @@ -33945,7 +32623,7 @@ public final class ContextOuterClass { * @return Whether the serviceIds field is set. */ public boolean hasServiceIds() { - return serviceIdsBuilder_ != null || serviceIds_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -33969,10 +32647,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } serviceIds_ = value; - onChanged(); } else { serviceIdsBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -33982,10 +32661,11 @@ public final class ContextOuterClass { public Builder setServiceIds(context.ContextOuterClass.ServiceIdList.Builder builderForValue) { if (serviceIdsBuilder_ == null) { serviceIds_ = builderForValue.build(); - onChanged(); } else { serviceIdsBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -33994,15 +32674,16 @@ public final class ContextOuterClass { */ public Builder mergeServiceIds(context.ContextOuterClass.ServiceIdList value) { if (serviceIdsBuilder_ == null) { - if (serviceIds_ != null) { - serviceIds_ = context.ContextOuterClass.ServiceIdList.newBuilder(serviceIds_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && serviceIds_ != null && serviceIds_ != context.ContextOuterClass.ServiceIdList.getDefaultInstance()) { + getServiceIdsBuilder().mergeFrom(value); } else { serviceIds_ = value; } - onChanged(); } else { serviceIdsBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -34010,13 +32691,13 @@ public final class ContextOuterClass { * <code>.context.ServiceIdList service_ids = 1;</code> */ public Builder clearServiceIds() { - if (serviceIdsBuilder_ == null) { - serviceIds_ = null; - onChanged(); - } else { - serviceIds_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + serviceIds_ = null; + if (serviceIdsBuilder_ != null) { + serviceIdsBuilder_.dispose(); serviceIdsBuilder_ = null; } + onChanged(); return this; } @@ -34024,6 +32705,7 @@ public final class ContextOuterClass { * <code>.context.ServiceIdList service_ids = 1;</code> */ public context.ContextOuterClass.ServiceIdList.Builder getServiceIdsBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getServiceIdsFieldBuilder().getBuilder(); } @@ -34068,6 +32750,7 @@ public final class ContextOuterClass { */ public Builder setIncludeEndpointIds(boolean value) { includeEndpointIds_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -34077,6 +32760,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearIncludeEndpointIds() { + bitField0_ = (bitField0_ & ~0x00000002); includeEndpointIds_ = false; onChanged(); return this; @@ -34100,6 +32784,7 @@ public final class ContextOuterClass { */ public Builder setIncludeConstraints(boolean value) { includeConstraints_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -34109,6 +32794,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearIncludeConstraints() { + bitField0_ = (bitField0_ & ~0x00000004); includeConstraints_ = false; onChanged(); return this; @@ -34132,6 +32818,7 @@ public final class ContextOuterClass { */ public Builder setIncludeConfigRules(boolean value) { includeConfigRules_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -34141,6 +32828,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearIncludeConfigRules() { + bitField0_ = (bitField0_ & ~0x00000008); includeConfigRules_ = false; onChanged(); return this; @@ -34173,7 +32861,17 @@ public final class ContextOuterClass { @java.lang.Override public ServiceFilter parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ServiceFilter(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -34252,70 +32950,6 @@ public final class ContextOuterClass { return new ServiceEvent(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ServiceEvent(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.Event.Builder subBuilder = null; - if (event_ != null) { - subBuilder = event_.toBuilder(); - } - event_ = input.readMessage(context.ContextOuterClass.Event.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(event_); - event_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - context.ContextOuterClass.ServiceId.Builder subBuilder = null; - if (serviceId_ != null) { - subBuilder = serviceId_.toBuilder(); - } - serviceId_ = input.readMessage(context.ContextOuterClass.ServiceId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(serviceId_); - serviceId_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_ServiceEvent_descriptor; } @@ -34352,7 +32986,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - return getEvent(); + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; } public static final int SERVICE_ID_FIELD_NUMBER = 2; @@ -34382,7 +33016,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { - return getServiceId(); + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; } private byte memoizedIsInitialized = -1; @@ -34406,7 +33040,7 @@ public final class ContextOuterClass { if (serviceId_ != null) { output.writeMessage(2, getServiceId()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -34421,7 +33055,7 @@ public final class ContextOuterClass { if (serviceId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getServiceId()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -34447,7 +33081,7 @@ public final class ContextOuterClass { if (!getServiceId().equals(other.getServiceId())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -34467,7 +33101,7 @@ public final class ContextOuterClass { hash = (37 * hash) + SERVICE_ID_FIELD_NUMBER; hash = (53 * hash) + getServiceId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -34561,32 +33195,24 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.ServiceEvent.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (eventBuilder_ == null) { - event_ = null; - } else { - event_ = null; + bitField0_ = 0; + event_ = null; + if (eventBuilder_ != null) { + eventBuilder_.dispose(); eventBuilder_ = null; } - if (serviceIdBuilder_ == null) { - serviceId_ = null; - } else { - serviceId_ = null; + serviceId_ = null; + if (serviceIdBuilder_ != null) { + serviceIdBuilder_.dispose(); serviceIdBuilder_ = null; } return this; @@ -34614,48 +33240,21 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.ServiceEvent buildPartial() { context.ContextOuterClass.ServiceEvent result = new context.ContextOuterClass.ServiceEvent(this); - if (eventBuilder_ == null) { - result.event_ = event_; - } else { - result.event_ = eventBuilder_.build(); - } - if (serviceIdBuilder_ == null) { - result.serviceId_ = serviceId_; - } else { - result.serviceId_ = serviceIdBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.ServiceEvent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.event_ = eventBuilder_ == null ? event_ : eventBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.serviceId_ = serviceIdBuilder_ == null ? serviceId_ : serviceIdBuilder_.build(); + } } @java.lang.Override @@ -34677,7 +33276,7 @@ public final class ContextOuterClass { if (other.hasServiceId()) { mergeServiceId(other.getServiceId()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -34689,20 +33288,54 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.ServiceEvent parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getEventFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + input.readMessage(getServiceIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } + // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ServiceEvent) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.Event event_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> eventBuilder_; @@ -34712,7 +33345,7 @@ public final class ContextOuterClass { * @return Whether the event field is set. */ public boolean hasEvent() { - return eventBuilder_ != null || event_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -34736,10 +33369,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } event_ = value; - onChanged(); } else { eventBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -34749,10 +33383,11 @@ public final class ContextOuterClass { public Builder setEvent(context.ContextOuterClass.Event.Builder builderForValue) { if (eventBuilder_ == null) { event_ = builderForValue.build(); - onChanged(); } else { eventBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -34761,15 +33396,16 @@ public final class ContextOuterClass { */ public Builder mergeEvent(context.ContextOuterClass.Event value) { if (eventBuilder_ == null) { - if (event_ != null) { - event_ = context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && event_ != null && event_ != context.ContextOuterClass.Event.getDefaultInstance()) { + getEventBuilder().mergeFrom(value); } else { event_ = value; } - onChanged(); } else { eventBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -34777,13 +33413,13 @@ public final class ContextOuterClass { * <code>.context.Event event = 1;</code> */ public Builder clearEvent() { - if (eventBuilder_ == null) { - event_ = null; - onChanged(); - } else { - event_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + event_ = null; + if (eventBuilder_ != null) { + eventBuilder_.dispose(); eventBuilder_ = null; } + onChanged(); return this; } @@ -34791,6 +33427,7 @@ public final class ContextOuterClass { * <code>.context.Event event = 1;</code> */ public context.ContextOuterClass.Event.Builder getEventBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getEventFieldBuilder().getBuilder(); } @@ -34826,7 +33463,7 @@ public final class ContextOuterClass { * @return Whether the serviceId field is set. */ public boolean hasServiceId() { - return serviceIdBuilder_ != null || serviceId_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** @@ -34850,10 +33487,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } serviceId_ = value; - onChanged(); } else { serviceIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -34863,10 +33501,11 @@ public final class ContextOuterClass { public Builder setServiceId(context.ContextOuterClass.ServiceId.Builder builderForValue) { if (serviceIdBuilder_ == null) { serviceId_ = builderForValue.build(); - onChanged(); } else { serviceIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -34875,15 +33514,16 @@ public final class ContextOuterClass { */ public Builder mergeServiceId(context.ContextOuterClass.ServiceId value) { if (serviceIdBuilder_ == null) { - if (serviceId_ != null) { - serviceId_ = context.ContextOuterClass.ServiceId.newBuilder(serviceId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000002) != 0) && serviceId_ != null && serviceId_ != context.ContextOuterClass.ServiceId.getDefaultInstance()) { + getServiceIdBuilder().mergeFrom(value); } else { serviceId_ = value; } - onChanged(); } else { serviceIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -34891,13 +33531,13 @@ public final class ContextOuterClass { * <code>.context.ServiceId service_id = 2;</code> */ public Builder clearServiceId() { - if (serviceIdBuilder_ == null) { - serviceId_ = null; - onChanged(); - } else { - serviceId_ = null; + bitField0_ = (bitField0_ & ~0x00000002); + serviceId_ = null; + if (serviceIdBuilder_ != null) { + serviceIdBuilder_.dispose(); serviceIdBuilder_ = null; } + onChanged(); return this; } @@ -34905,6 +33545,7 @@ public final class ContextOuterClass { * <code>.context.ServiceId service_id = 2;</code> */ public context.ContextOuterClass.ServiceId.Builder getServiceIdBuilder() { + bitField0_ |= 0x00000002; onChanged(); return getServiceIdFieldBuilder().getBuilder(); } @@ -34958,7 +33599,17 @@ public final class ContextOuterClass { @java.lang.Override public ServiceEvent parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ServiceEvent(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -35041,70 +33692,6 @@ public final class ContextOuterClass { return new SliceId(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private SliceId(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.ContextId.Builder subBuilder = null; - if (contextId_ != null) { - subBuilder = contextId_.toBuilder(); - } - contextId_ = input.readMessage(context.ContextOuterClass.ContextId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(contextId_); - contextId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - context.ContextOuterClass.Uuid.Builder subBuilder = null; - if (sliceUuid_ != null) { - subBuilder = sliceUuid_.toBuilder(); - } - sliceUuid_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sliceUuid_); - sliceUuid_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_SliceId_descriptor; } @@ -35141,7 +33728,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - return getContextId(); + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; } public static final int SLICE_UUID_FIELD_NUMBER = 2; @@ -35171,7 +33758,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.UuidOrBuilder getSliceUuidOrBuilder() { - return getSliceUuid(); + return sliceUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : sliceUuid_; } private byte memoizedIsInitialized = -1; @@ -35195,7 +33782,7 @@ public final class ContextOuterClass { if (sliceUuid_ != null) { output.writeMessage(2, getSliceUuid()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -35210,7 +33797,7 @@ public final class ContextOuterClass { if (sliceUuid_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSliceUuid()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -35236,7 +33823,7 @@ public final class ContextOuterClass { if (!getSliceUuid().equals(other.getSliceUuid())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -35256,7 +33843,7 @@ public final class ContextOuterClass { hash = (37 * hash) + SLICE_UUID_FIELD_NUMBER; hash = (53 * hash) + getSliceUuid().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -35354,32 +33941,24 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.SliceId.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (contextIdBuilder_ == null) { - contextId_ = null; - } else { - contextId_ = null; + bitField0_ = 0; + contextId_ = null; + if (contextIdBuilder_ != null) { + contextIdBuilder_.dispose(); contextIdBuilder_ = null; } - if (sliceUuidBuilder_ == null) { - sliceUuid_ = null; - } else { - sliceUuid_ = null; + sliceUuid_ = null; + if (sliceUuidBuilder_ != null) { + sliceUuidBuilder_.dispose(); sliceUuidBuilder_ = null; } return this; @@ -35407,48 +33986,21 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.SliceId buildPartial() { context.ContextOuterClass.SliceId result = new context.ContextOuterClass.SliceId(this); - if (contextIdBuilder_ == null) { - result.contextId_ = contextId_; - } else { - result.contextId_ = contextIdBuilder_.build(); - } - if (sliceUuidBuilder_ == null) { - result.sliceUuid_ = sliceUuid_; - } else { - result.sliceUuid_ = sliceUuidBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.SliceId result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.contextId_ = contextIdBuilder_ == null ? contextId_ : contextIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.sliceUuid_ = sliceUuidBuilder_ == null ? sliceUuid_ : sliceUuidBuilder_.build(); + } } @java.lang.Override @@ -35470,7 +34022,7 @@ public final class ContextOuterClass { if (other.hasSliceUuid()) { mergeSliceUuid(other.getSliceUuid()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -35482,20 +34034,54 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.SliceId parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getContextIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + input.readMessage(getSliceUuidFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } + // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.SliceId) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.ContextId contextId_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> contextIdBuilder_; @@ -35505,7 +34091,7 @@ public final class ContextOuterClass { * @return Whether the contextId field is set. */ public boolean hasContextId() { - return contextIdBuilder_ != null || contextId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -35529,10 +34115,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } contextId_ = value; - onChanged(); } else { contextIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -35542,10 +34129,11 @@ public final class ContextOuterClass { public Builder setContextId(context.ContextOuterClass.ContextId.Builder builderForValue) { if (contextIdBuilder_ == null) { contextId_ = builderForValue.build(); - onChanged(); } else { contextIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -35554,15 +34142,16 @@ public final class ContextOuterClass { */ public Builder mergeContextId(context.ContextOuterClass.ContextId value) { if (contextIdBuilder_ == null) { - if (contextId_ != null) { - contextId_ = context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && contextId_ != null && contextId_ != context.ContextOuterClass.ContextId.getDefaultInstance()) { + getContextIdBuilder().mergeFrom(value); } else { contextId_ = value; } - onChanged(); } else { contextIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -35570,13 +34159,13 @@ public final class ContextOuterClass { * <code>.context.ContextId context_id = 1;</code> */ public Builder clearContextId() { - if (contextIdBuilder_ == null) { - contextId_ = null; - onChanged(); - } else { - contextId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + contextId_ = null; + if (contextIdBuilder_ != null) { + contextIdBuilder_.dispose(); contextIdBuilder_ = null; } + onChanged(); return this; } @@ -35584,6 +34173,7 @@ public final class ContextOuterClass { * <code>.context.ContextId context_id = 1;</code> */ public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getContextIdFieldBuilder().getBuilder(); } @@ -35619,7 +34209,7 @@ public final class ContextOuterClass { * @return Whether the sliceUuid field is set. */ public boolean hasSliceUuid() { - return sliceUuidBuilder_ != null || sliceUuid_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** @@ -35643,10 +34233,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } sliceUuid_ = value; - onChanged(); } else { sliceUuidBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -35656,10 +34247,11 @@ public final class ContextOuterClass { public Builder setSliceUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { if (sliceUuidBuilder_ == null) { sliceUuid_ = builderForValue.build(); - onChanged(); } else { sliceUuidBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -35668,15 +34260,16 @@ public final class ContextOuterClass { */ public Builder mergeSliceUuid(context.ContextOuterClass.Uuid value) { if (sliceUuidBuilder_ == null) { - if (sliceUuid_ != null) { - sliceUuid_ = context.ContextOuterClass.Uuid.newBuilder(sliceUuid_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000002) != 0) && sliceUuid_ != null && sliceUuid_ != context.ContextOuterClass.Uuid.getDefaultInstance()) { + getSliceUuidBuilder().mergeFrom(value); } else { sliceUuid_ = value; } - onChanged(); } else { sliceUuidBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -35684,13 +34277,13 @@ public final class ContextOuterClass { * <code>.context.Uuid slice_uuid = 2;</code> */ public Builder clearSliceUuid() { - if (sliceUuidBuilder_ == null) { - sliceUuid_ = null; - onChanged(); - } else { - sliceUuid_ = null; + bitField0_ = (bitField0_ & ~0x00000002); + sliceUuid_ = null; + if (sliceUuidBuilder_ != null) { + sliceUuidBuilder_.dispose(); sliceUuidBuilder_ = null; } + onChanged(); return this; } @@ -35698,6 +34291,7 @@ public final class ContextOuterClass { * <code>.context.Uuid slice_uuid = 2;</code> */ public context.ContextOuterClass.Uuid.Builder getSliceUuidBuilder() { + bitField0_ |= 0x00000002; onChanged(); return getSliceUuidFieldBuilder().getBuilder(); } @@ -35751,7 +34345,17 @@ public final class ContextOuterClass { @java.lang.Override public SliceId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SliceId(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -35998,164 +34602,6 @@ public final class ContextOuterClass { return new Slice(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Slice(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.SliceId.Builder subBuilder = null; - if (sliceId_ != null) { - subBuilder = sliceId_.toBuilder(); - } - sliceId_ = input.readMessage(context.ContextOuterClass.SliceId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sliceId_); - sliceId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - name_ = s; - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - sliceEndpointIds_ = new java.util.ArrayList<context.ContextOuterClass.EndPointId>(); - mutable_bitField0_ |= 0x00000001; - } - sliceEndpointIds_.add(input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry)); - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - sliceConstraints_ = new java.util.ArrayList<context.ContextOuterClass.Constraint>(); - mutable_bitField0_ |= 0x00000002; - } - sliceConstraints_.add(input.readMessage(context.ContextOuterClass.Constraint.parser(), extensionRegistry)); - break; - } - case 42: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - sliceServiceIds_ = new java.util.ArrayList<context.ContextOuterClass.ServiceId>(); - mutable_bitField0_ |= 0x00000004; - } - sliceServiceIds_.add(input.readMessage(context.ContextOuterClass.ServiceId.parser(), extensionRegistry)); - break; - } - case 50: - { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - sliceSubsliceIds_ = new java.util.ArrayList<context.ContextOuterClass.SliceId>(); - mutable_bitField0_ |= 0x00000008; - } - sliceSubsliceIds_.add(input.readMessage(context.ContextOuterClass.SliceId.parser(), extensionRegistry)); - break; - } - case 58: - { - context.ContextOuterClass.SliceStatus.Builder subBuilder = null; - if (sliceStatus_ != null) { - subBuilder = sliceStatus_.toBuilder(); - } - sliceStatus_ = input.readMessage(context.ContextOuterClass.SliceStatus.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sliceStatus_); - sliceStatus_ = subBuilder.buildPartial(); - } - break; - } - case 66: - { - context.ContextOuterClass.SliceConfig.Builder subBuilder = null; - if (sliceConfig_ != null) { - subBuilder = sliceConfig_.toBuilder(); - } - sliceConfig_ = input.readMessage(context.ContextOuterClass.SliceConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sliceConfig_); - sliceConfig_ = subBuilder.buildPartial(); - } - break; - } - case 74: - { - context.ContextOuterClass.SliceOwner.Builder subBuilder = null; - if (sliceOwner_ != null) { - subBuilder = sliceOwner_.toBuilder(); - } - sliceOwner_ = input.readMessage(context.ContextOuterClass.SliceOwner.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sliceOwner_); - sliceOwner_ = subBuilder.buildPartial(); - } - break; - } - case 82: - { - context.ContextOuterClass.Timestamp.Builder subBuilder = null; - if (timestamp_ != null) { - subBuilder = timestamp_.toBuilder(); - } - timestamp_ = input.readMessage(context.ContextOuterClass.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(timestamp_); - timestamp_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - sliceEndpointIds_ = java.util.Collections.unmodifiableList(sliceEndpointIds_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - sliceConstraints_ = java.util.Collections.unmodifiableList(sliceConstraints_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - sliceServiceIds_ = java.util.Collections.unmodifiableList(sliceServiceIds_); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - sliceSubsliceIds_ = java.util.Collections.unmodifiableList(sliceSubsliceIds_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_Slice_descriptor; } @@ -36192,12 +34638,13 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder() { - return getSliceId(); + return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; } public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** * <code>string name = 2;</code> @@ -36234,6 +34681,7 @@ public final class ContextOuterClass { public static final int SLICE_ENDPOINT_IDS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.EndPointId> sliceEndpointIds_; /** @@ -36278,6 +34726,7 @@ public final class ContextOuterClass { public static final int SLICE_CONSTRAINTS_FIELD_NUMBER = 4; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.Constraint> sliceConstraints_; /** @@ -36322,6 +34771,7 @@ public final class ContextOuterClass { public static final int SLICE_SERVICE_IDS_FIELD_NUMBER = 5; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.ServiceId> sliceServiceIds_; /** @@ -36366,6 +34816,7 @@ public final class ContextOuterClass { public static final int SLICE_SUBSLICE_IDS_FIELD_NUMBER = 6; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.SliceId> sliceSubsliceIds_; /** @@ -36435,7 +34886,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.SliceStatusOrBuilder getSliceStatusOrBuilder() { - return getSliceStatus(); + return sliceStatus_ == null ? context.ContextOuterClass.SliceStatus.getDefaultInstance() : sliceStatus_; } public static final int SLICE_CONFIG_FIELD_NUMBER = 8; @@ -36465,7 +34916,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.SliceConfigOrBuilder getSliceConfigOrBuilder() { - return getSliceConfig(); + return sliceConfig_ == null ? context.ContextOuterClass.SliceConfig.getDefaultInstance() : sliceConfig_; } public static final int SLICE_OWNER_FIELD_NUMBER = 9; @@ -36495,7 +34946,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.SliceOwnerOrBuilder getSliceOwnerOrBuilder() { - return getSliceOwner(); + return sliceOwner_ == null ? context.ContextOuterClass.SliceOwner.getDefaultInstance() : sliceOwner_; } public static final int TIMESTAMP_FIELD_NUMBER = 10; @@ -36525,7 +34976,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - return getTimestamp(); + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; } private byte memoizedIsInitialized = -1; @@ -36546,7 +34997,7 @@ public final class ContextOuterClass { if (sliceId_ != null) { output.writeMessage(1, getSliceId()); } - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); } for (int i = 0; i < sliceEndpointIds_.size(); i++) { @@ -36573,7 +35024,7 @@ public final class ContextOuterClass { if (timestamp_ != null) { output.writeMessage(10, getTimestamp()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -36585,7 +35036,7 @@ public final class ContextOuterClass { if (sliceId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSliceId()); } - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); } for (int i = 0; i < sliceEndpointIds_.size(); i++) { @@ -36612,7 +35063,7 @@ public final class ContextOuterClass { if (timestamp_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getTimestamp()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -36666,7 +35117,7 @@ public final class ContextOuterClass { if (!getTimestamp().equals(other.getTimestamp())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -36716,7 +35167,7 @@ public final class ContextOuterClass { hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; hash = (53 * hash) + getTimestamp().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -36810,79 +35261,68 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.Slice.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getSliceEndpointIdsFieldBuilder(); - getSliceConstraintsFieldBuilder(); - getSliceServiceIdsFieldBuilder(); - getSliceSubsliceIdsFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); - if (sliceIdBuilder_ == null) { - sliceId_ = null; - } else { - sliceId_ = null; + bitField0_ = 0; + sliceId_ = null; + if (sliceIdBuilder_ != null) { + sliceIdBuilder_.dispose(); sliceIdBuilder_ = null; } name_ = ""; if (sliceEndpointIdsBuilder_ == null) { sliceEndpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + sliceEndpointIds_ = null; sliceEndpointIdsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); if (sliceConstraintsBuilder_ == null) { sliceConstraints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + sliceConstraints_ = null; sliceConstraintsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000008); if (sliceServiceIdsBuilder_ == null) { sliceServiceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + sliceServiceIds_ = null; sliceServiceIdsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000010); if (sliceSubsliceIdsBuilder_ == null) { sliceSubsliceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); } else { + sliceSubsliceIds_ = null; sliceSubsliceIdsBuilder_.clear(); } - if (sliceStatusBuilder_ == null) { - sliceStatus_ = null; - } else { - sliceStatus_ = null; + bitField0_ = (bitField0_ & ~0x00000020); + sliceStatus_ = null; + if (sliceStatusBuilder_ != null) { + sliceStatusBuilder_.dispose(); sliceStatusBuilder_ = null; } - if (sliceConfigBuilder_ == null) { - sliceConfig_ = null; - } else { - sliceConfig_ = null; + sliceConfig_ = null; + if (sliceConfigBuilder_ != null) { + sliceConfigBuilder_.dispose(); sliceConfigBuilder_ = null; } - if (sliceOwnerBuilder_ == null) { - sliceOwner_ = null; - } else { - sliceOwner_ = null; + sliceOwner_ = null; + if (sliceOwnerBuilder_ != null) { + sliceOwnerBuilder_.dispose(); sliceOwnerBuilder_ = null; } - if (timestampBuilder_ == null) { - timestamp_ = null; - } else { - timestamp_ = null; + timestamp_ = null; + if (timestampBuilder_ != null) { + timestampBuilder_.dispose(); timestampBuilder_ = null; } return this; @@ -36910,101 +35350,73 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.Slice buildPartial() { context.ContextOuterClass.Slice result = new context.ContextOuterClass.Slice(this); - int from_bitField0_ = bitField0_; - if (sliceIdBuilder_ == null) { - result.sliceId_ = sliceId_; - } else { - result.sliceId_ = sliceIdBuilder_.build(); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); } - result.name_ = name_; + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.Slice result) { if (sliceEndpointIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { sliceEndpointIds_ = java.util.Collections.unmodifiableList(sliceEndpointIds_); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); } result.sliceEndpointIds_ = sliceEndpointIds_; } else { result.sliceEndpointIds_ = sliceEndpointIdsBuilder_.build(); } if (sliceConstraintsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000008) != 0)) { sliceConstraints_ = java.util.Collections.unmodifiableList(sliceConstraints_); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); } result.sliceConstraints_ = sliceConstraints_; } else { result.sliceConstraints_ = sliceConstraintsBuilder_.build(); } if (sliceServiceIdsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { + if (((bitField0_ & 0x00000010) != 0)) { sliceServiceIds_ = java.util.Collections.unmodifiableList(sliceServiceIds_); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000010); } result.sliceServiceIds_ = sliceServiceIds_; } else { result.sliceServiceIds_ = sliceServiceIdsBuilder_.build(); } if (sliceSubsliceIdsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { + if (((bitField0_ & 0x00000020) != 0)) { sliceSubsliceIds_ = java.util.Collections.unmodifiableList(sliceSubsliceIds_); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000020); } result.sliceSubsliceIds_ = sliceSubsliceIds_; } else { result.sliceSubsliceIds_ = sliceSubsliceIdsBuilder_.build(); } - if (sliceStatusBuilder_ == null) { - result.sliceStatus_ = sliceStatus_; - } else { - result.sliceStatus_ = sliceStatusBuilder_.build(); + } + + private void buildPartial0(context.ContextOuterClass.Slice result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sliceId_ = sliceIdBuilder_ == null ? sliceId_ : sliceIdBuilder_.build(); } - if (sliceConfigBuilder_ == null) { - result.sliceConfig_ = sliceConfig_; - } else { - result.sliceConfig_ = sliceConfigBuilder_.build(); + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; } - if (sliceOwnerBuilder_ == null) { - result.sliceOwner_ = sliceOwner_; - } else { - result.sliceOwner_ = sliceOwnerBuilder_.build(); + if (((from_bitField0_ & 0x00000040) != 0)) { + result.sliceStatus_ = sliceStatusBuilder_ == null ? sliceStatus_ : sliceStatusBuilder_.build(); } - if (timestampBuilder_ == null) { - result.timestamp_ = timestamp_; - } else { - result.timestamp_ = timestampBuilder_.build(); + if (((from_bitField0_ & 0x00000080) != 0)) { + result.sliceConfig_ = sliceConfigBuilder_ == null ? sliceConfig_ : sliceConfigBuilder_.build(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.sliceOwner_ = sliceOwnerBuilder_ == null ? sliceOwner_ : sliceOwnerBuilder_.build(); + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.timestamp_ = timestampBuilder_ == null ? timestamp_ : timestampBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); } @java.lang.Override @@ -37025,13 +35437,14 @@ public final class ContextOuterClass { } if (!other.getName().isEmpty()) { name_ = other.name_; + bitField0_ |= 0x00000002; onChanged(); } if (sliceEndpointIdsBuilder_ == null) { if (!other.sliceEndpointIds_.isEmpty()) { if (sliceEndpointIds_.isEmpty()) { sliceEndpointIds_ = other.sliceEndpointIds_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); } else { ensureSliceEndpointIdsIsMutable(); sliceEndpointIds_.addAll(other.sliceEndpointIds_); @@ -37044,7 +35457,7 @@ public final class ContextOuterClass { sliceEndpointIdsBuilder_.dispose(); sliceEndpointIdsBuilder_ = null; sliceEndpointIds_ = other.sliceEndpointIds_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); sliceEndpointIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSliceEndpointIdsFieldBuilder() : null; } else { sliceEndpointIdsBuilder_.addAllMessages(other.sliceEndpointIds_); @@ -37055,7 +35468,7 @@ public final class ContextOuterClass { if (!other.sliceConstraints_.isEmpty()) { if (sliceConstraints_.isEmpty()) { sliceConstraints_ = other.sliceConstraints_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); } else { ensureSliceConstraintsIsMutable(); sliceConstraints_.addAll(other.sliceConstraints_); @@ -37068,7 +35481,7 @@ public final class ContextOuterClass { sliceConstraintsBuilder_.dispose(); sliceConstraintsBuilder_ = null; sliceConstraints_ = other.sliceConstraints_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); sliceConstraintsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSliceConstraintsFieldBuilder() : null; } else { sliceConstraintsBuilder_.addAllMessages(other.sliceConstraints_); @@ -37079,7 +35492,7 @@ public final class ContextOuterClass { if (!other.sliceServiceIds_.isEmpty()) { if (sliceServiceIds_.isEmpty()) { sliceServiceIds_ = other.sliceServiceIds_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000010); } else { ensureSliceServiceIdsIsMutable(); sliceServiceIds_.addAll(other.sliceServiceIds_); @@ -37092,7 +35505,7 @@ public final class ContextOuterClass { sliceServiceIdsBuilder_.dispose(); sliceServiceIdsBuilder_ = null; sliceServiceIds_ = other.sliceServiceIds_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000010); sliceServiceIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSliceServiceIdsFieldBuilder() : null; } else { sliceServiceIdsBuilder_.addAllMessages(other.sliceServiceIds_); @@ -37103,7 +35516,7 @@ public final class ContextOuterClass { if (!other.sliceSubsliceIds_.isEmpty()) { if (sliceSubsliceIds_.isEmpty()) { sliceSubsliceIds_ = other.sliceSubsliceIds_; - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000020); } else { ensureSliceSubsliceIdsIsMutable(); sliceSubsliceIds_.addAll(other.sliceSubsliceIds_); @@ -37116,7 +35529,7 @@ public final class ContextOuterClass { sliceSubsliceIdsBuilder_.dispose(); sliceSubsliceIdsBuilder_ = null; sliceSubsliceIds_ = other.sliceSubsliceIds_; - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000020); sliceSubsliceIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSliceSubsliceIdsFieldBuilder() : null; } else { sliceSubsliceIdsBuilder_.addAllMessages(other.sliceSubsliceIds_); @@ -37135,7 +35548,7 @@ public final class ContextOuterClass { if (other.hasTimestamp()) { mergeTimestamp(other.getTimestamp()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -37147,17 +35560,125 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.Slice parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getSliceIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 26: + { + context.ContextOuterClass.EndPointId m = input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry); + if (sliceEndpointIdsBuilder_ == null) { + ensureSliceEndpointIdsIsMutable(); + sliceEndpointIds_.add(m); + } else { + sliceEndpointIdsBuilder_.addMessage(m); + } + break; + } + // case 26 + case 34: + { + context.ContextOuterClass.Constraint m = input.readMessage(context.ContextOuterClass.Constraint.parser(), extensionRegistry); + if (sliceConstraintsBuilder_ == null) { + ensureSliceConstraintsIsMutable(); + sliceConstraints_.add(m); + } else { + sliceConstraintsBuilder_.addMessage(m); + } + break; + } + // case 34 + case 42: + { + context.ContextOuterClass.ServiceId m = input.readMessage(context.ContextOuterClass.ServiceId.parser(), extensionRegistry); + if (sliceServiceIdsBuilder_ == null) { + ensureSliceServiceIdsIsMutable(); + sliceServiceIds_.add(m); + } else { + sliceServiceIdsBuilder_.addMessage(m); + } + break; + } + // case 42 + case 50: + { + context.ContextOuterClass.SliceId m = input.readMessage(context.ContextOuterClass.SliceId.parser(), extensionRegistry); + if (sliceSubsliceIdsBuilder_ == null) { + ensureSliceSubsliceIdsIsMutable(); + sliceSubsliceIds_.add(m); + } else { + sliceSubsliceIdsBuilder_.addMessage(m); + } + break; + } + // case 50 + case 58: + { + input.readMessage(getSliceStatusFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } + // case 58 + case 66: + { + input.readMessage(getSliceConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } + // case 66 + case 74: + { + input.readMessage(getSliceOwnerFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } + // case 74 + case 82: + { + input.readMessage(getTimestampFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } + // case 82 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Slice) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -37172,7 +35693,7 @@ public final class ContextOuterClass { * @return Whether the sliceId field is set. */ public boolean hasSliceId() { - return sliceIdBuilder_ != null || sliceId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -37196,10 +35717,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } sliceId_ = value; - onChanged(); } else { sliceIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -37209,10 +35731,11 @@ public final class ContextOuterClass { public Builder setSliceId(context.ContextOuterClass.SliceId.Builder builderForValue) { if (sliceIdBuilder_ == null) { sliceId_ = builderForValue.build(); - onChanged(); } else { sliceIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -37221,15 +35744,16 @@ public final class ContextOuterClass { */ public Builder mergeSliceId(context.ContextOuterClass.SliceId value) { if (sliceIdBuilder_ == null) { - if (sliceId_ != null) { - sliceId_ = context.ContextOuterClass.SliceId.newBuilder(sliceId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && sliceId_ != null && sliceId_ != context.ContextOuterClass.SliceId.getDefaultInstance()) { + getSliceIdBuilder().mergeFrom(value); } else { sliceId_ = value; } - onChanged(); } else { sliceIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -37237,13 +35761,13 @@ public final class ContextOuterClass { * <code>.context.SliceId slice_id = 1;</code> */ public Builder clearSliceId() { - if (sliceIdBuilder_ == null) { - sliceId_ = null; - onChanged(); - } else { - sliceId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + sliceId_ = null; + if (sliceIdBuilder_ != null) { + sliceIdBuilder_.dispose(); sliceIdBuilder_ = null; } + onChanged(); return this; } @@ -37251,6 +35775,7 @@ public final class ContextOuterClass { * <code>.context.SliceId slice_id = 1;</code> */ public context.ContextOuterClass.SliceId.Builder getSliceIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getSliceIdFieldBuilder().getBuilder(); } @@ -37320,6 +35845,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } name_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -37330,6 +35856,7 @@ public final class ContextOuterClass { */ public Builder clearName() { name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -37345,6 +35872,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); name_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -37352,9 +35880,9 @@ public final class ContextOuterClass { private java.util.List<context.ContextOuterClass.EndPointId> sliceEndpointIds_ = java.util.Collections.emptyList(); private void ensureSliceEndpointIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!((bitField0_ & 0x00000004) != 0)) { sliceEndpointIds_ = new java.util.ArrayList<context.ContextOuterClass.EndPointId>(sliceEndpointIds_); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000004; } } @@ -37506,7 +36034,7 @@ public final class ContextOuterClass { public Builder clearSliceEndpointIds() { if (sliceEndpointIdsBuilder_ == null) { sliceEndpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { sliceEndpointIdsBuilder_.clear(); @@ -37580,7 +36108,7 @@ public final class ContextOuterClass { private com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> getSliceEndpointIdsFieldBuilder() { if (sliceEndpointIdsBuilder_ == null) { - sliceEndpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder>(sliceEndpointIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + sliceEndpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder>(sliceEndpointIds_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); sliceEndpointIds_ = null; } return sliceEndpointIdsBuilder_; @@ -37589,9 +36117,9 @@ public final class ContextOuterClass { private java.util.List<context.ContextOuterClass.Constraint> sliceConstraints_ = java.util.Collections.emptyList(); private void ensureSliceConstraintsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { + if (!((bitField0_ & 0x00000008) != 0)) { sliceConstraints_ = new java.util.ArrayList<context.ContextOuterClass.Constraint>(sliceConstraints_); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000008; } } @@ -37743,7 +36271,7 @@ public final class ContextOuterClass { public Builder clearSliceConstraints() { if (sliceConstraintsBuilder_ == null) { sliceConstraints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { sliceConstraintsBuilder_.clear(); @@ -37817,7 +36345,7 @@ public final class ContextOuterClass { private com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.Constraint, context.ContextOuterClass.Constraint.Builder, context.ContextOuterClass.ConstraintOrBuilder> getSliceConstraintsFieldBuilder() { if (sliceConstraintsBuilder_ == null) { - sliceConstraintsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.Constraint, context.ContextOuterClass.Constraint.Builder, context.ContextOuterClass.ConstraintOrBuilder>(sliceConstraints_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + sliceConstraintsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.Constraint, context.ContextOuterClass.Constraint.Builder, context.ContextOuterClass.ConstraintOrBuilder>(sliceConstraints_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); sliceConstraints_ = null; } return sliceConstraintsBuilder_; @@ -37826,9 +36354,9 @@ public final class ContextOuterClass { private java.util.List<context.ContextOuterClass.ServiceId> sliceServiceIds_ = java.util.Collections.emptyList(); private void ensureSliceServiceIdsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { + if (!((bitField0_ & 0x00000010) != 0)) { sliceServiceIds_ = new java.util.ArrayList<context.ContextOuterClass.ServiceId>(sliceServiceIds_); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000010; } } @@ -37980,7 +36508,7 @@ public final class ContextOuterClass { public Builder clearSliceServiceIds() { if (sliceServiceIdsBuilder_ == null) { sliceServiceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); } else { sliceServiceIdsBuilder_.clear(); @@ -38054,7 +36582,7 @@ public final class ContextOuterClass { private com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder> getSliceServiceIdsFieldBuilder() { if (sliceServiceIdsBuilder_ == null) { - sliceServiceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder>(sliceServiceIds_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + sliceServiceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder>(sliceServiceIds_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); sliceServiceIds_ = null; } return sliceServiceIdsBuilder_; @@ -38063,9 +36591,9 @@ public final class ContextOuterClass { private java.util.List<context.ContextOuterClass.SliceId> sliceSubsliceIds_ = java.util.Collections.emptyList(); private void ensureSliceSubsliceIdsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { + if (!((bitField0_ & 0x00000020) != 0)) { sliceSubsliceIds_ = new java.util.ArrayList<context.ContextOuterClass.SliceId>(sliceSubsliceIds_); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000020; } } @@ -38217,7 +36745,7 @@ public final class ContextOuterClass { public Builder clearSliceSubsliceIds() { if (sliceSubsliceIdsBuilder_ == null) { sliceSubsliceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000020); onChanged(); } else { sliceSubsliceIdsBuilder_.clear(); @@ -38291,7 +36819,7 @@ public final class ContextOuterClass { private com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.SliceId, context.ContextOuterClass.SliceId.Builder, context.ContextOuterClass.SliceIdOrBuilder> getSliceSubsliceIdsFieldBuilder() { if (sliceSubsliceIdsBuilder_ == null) { - sliceSubsliceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.SliceId, context.ContextOuterClass.SliceId.Builder, context.ContextOuterClass.SliceIdOrBuilder>(sliceSubsliceIds_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); + sliceSubsliceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.SliceId, context.ContextOuterClass.SliceId.Builder, context.ContextOuterClass.SliceIdOrBuilder>(sliceSubsliceIds_, ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); sliceSubsliceIds_ = null; } return sliceSubsliceIdsBuilder_; @@ -38306,7 +36834,7 @@ public final class ContextOuterClass { * @return Whether the sliceStatus field is set. */ public boolean hasSliceStatus() { - return sliceStatusBuilder_ != null || sliceStatus_ != null; + return ((bitField0_ & 0x00000040) != 0); } /** @@ -38330,10 +36858,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } sliceStatus_ = value; - onChanged(); } else { sliceStatusBuilder_.setMessage(value); } + bitField0_ |= 0x00000040; + onChanged(); return this; } @@ -38343,10 +36872,11 @@ public final class ContextOuterClass { public Builder setSliceStatus(context.ContextOuterClass.SliceStatus.Builder builderForValue) { if (sliceStatusBuilder_ == null) { sliceStatus_ = builderForValue.build(); - onChanged(); } else { sliceStatusBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000040; + onChanged(); return this; } @@ -38355,15 +36885,16 @@ public final class ContextOuterClass { */ public Builder mergeSliceStatus(context.ContextOuterClass.SliceStatus value) { if (sliceStatusBuilder_ == null) { - if (sliceStatus_ != null) { - sliceStatus_ = context.ContextOuterClass.SliceStatus.newBuilder(sliceStatus_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000040) != 0) && sliceStatus_ != null && sliceStatus_ != context.ContextOuterClass.SliceStatus.getDefaultInstance()) { + getSliceStatusBuilder().mergeFrom(value); } else { sliceStatus_ = value; } - onChanged(); } else { sliceStatusBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000040; + onChanged(); return this; } @@ -38371,13 +36902,13 @@ public final class ContextOuterClass { * <code>.context.SliceStatus slice_status = 7;</code> */ public Builder clearSliceStatus() { - if (sliceStatusBuilder_ == null) { - sliceStatus_ = null; - onChanged(); - } else { - sliceStatus_ = null; + bitField0_ = (bitField0_ & ~0x00000040); + sliceStatus_ = null; + if (sliceStatusBuilder_ != null) { + sliceStatusBuilder_.dispose(); sliceStatusBuilder_ = null; } + onChanged(); return this; } @@ -38385,6 +36916,7 @@ public final class ContextOuterClass { * <code>.context.SliceStatus slice_status = 7;</code> */ public context.ContextOuterClass.SliceStatus.Builder getSliceStatusBuilder() { + bitField0_ |= 0x00000040; onChanged(); return getSliceStatusFieldBuilder().getBuilder(); } @@ -38420,7 +36952,7 @@ public final class ContextOuterClass { * @return Whether the sliceConfig field is set. */ public boolean hasSliceConfig() { - return sliceConfigBuilder_ != null || sliceConfig_ != null; + return ((bitField0_ & 0x00000080) != 0); } /** @@ -38444,10 +36976,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } sliceConfig_ = value; - onChanged(); } else { sliceConfigBuilder_.setMessage(value); } + bitField0_ |= 0x00000080; + onChanged(); return this; } @@ -38457,10 +36990,11 @@ public final class ContextOuterClass { public Builder setSliceConfig(context.ContextOuterClass.SliceConfig.Builder builderForValue) { if (sliceConfigBuilder_ == null) { sliceConfig_ = builderForValue.build(); - onChanged(); } else { sliceConfigBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000080; + onChanged(); return this; } @@ -38469,15 +37003,16 @@ public final class ContextOuterClass { */ public Builder mergeSliceConfig(context.ContextOuterClass.SliceConfig value) { if (sliceConfigBuilder_ == null) { - if (sliceConfig_ != null) { - sliceConfig_ = context.ContextOuterClass.SliceConfig.newBuilder(sliceConfig_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000080) != 0) && sliceConfig_ != null && sliceConfig_ != context.ContextOuterClass.SliceConfig.getDefaultInstance()) { + getSliceConfigBuilder().mergeFrom(value); } else { sliceConfig_ = value; } - onChanged(); } else { sliceConfigBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000080; + onChanged(); return this; } @@ -38485,13 +37020,13 @@ public final class ContextOuterClass { * <code>.context.SliceConfig slice_config = 8;</code> */ public Builder clearSliceConfig() { - if (sliceConfigBuilder_ == null) { - sliceConfig_ = null; - onChanged(); - } else { - sliceConfig_ = null; + bitField0_ = (bitField0_ & ~0x00000080); + sliceConfig_ = null; + if (sliceConfigBuilder_ != null) { + sliceConfigBuilder_.dispose(); sliceConfigBuilder_ = null; } + onChanged(); return this; } @@ -38499,6 +37034,7 @@ public final class ContextOuterClass { * <code>.context.SliceConfig slice_config = 8;</code> */ public context.ContextOuterClass.SliceConfig.Builder getSliceConfigBuilder() { + bitField0_ |= 0x00000080; onChanged(); return getSliceConfigFieldBuilder().getBuilder(); } @@ -38534,7 +37070,7 @@ public final class ContextOuterClass { * @return Whether the sliceOwner field is set. */ public boolean hasSliceOwner() { - return sliceOwnerBuilder_ != null || sliceOwner_ != null; + return ((bitField0_ & 0x00000100) != 0); } /** @@ -38558,10 +37094,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } sliceOwner_ = value; - onChanged(); } else { sliceOwnerBuilder_.setMessage(value); } + bitField0_ |= 0x00000100; + onChanged(); return this; } @@ -38571,10 +37108,11 @@ public final class ContextOuterClass { public Builder setSliceOwner(context.ContextOuterClass.SliceOwner.Builder builderForValue) { if (sliceOwnerBuilder_ == null) { sliceOwner_ = builderForValue.build(); - onChanged(); } else { sliceOwnerBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000100; + onChanged(); return this; } @@ -38583,15 +37121,16 @@ public final class ContextOuterClass { */ public Builder mergeSliceOwner(context.ContextOuterClass.SliceOwner value) { if (sliceOwnerBuilder_ == null) { - if (sliceOwner_ != null) { - sliceOwner_ = context.ContextOuterClass.SliceOwner.newBuilder(sliceOwner_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000100) != 0) && sliceOwner_ != null && sliceOwner_ != context.ContextOuterClass.SliceOwner.getDefaultInstance()) { + getSliceOwnerBuilder().mergeFrom(value); } else { sliceOwner_ = value; } - onChanged(); } else { sliceOwnerBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000100; + onChanged(); return this; } @@ -38599,13 +37138,13 @@ public final class ContextOuterClass { * <code>.context.SliceOwner slice_owner = 9;</code> */ public Builder clearSliceOwner() { - if (sliceOwnerBuilder_ == null) { - sliceOwner_ = null; - onChanged(); - } else { - sliceOwner_ = null; + bitField0_ = (bitField0_ & ~0x00000100); + sliceOwner_ = null; + if (sliceOwnerBuilder_ != null) { + sliceOwnerBuilder_.dispose(); sliceOwnerBuilder_ = null; } + onChanged(); return this; } @@ -38613,6 +37152,7 @@ public final class ContextOuterClass { * <code>.context.SliceOwner slice_owner = 9;</code> */ public context.ContextOuterClass.SliceOwner.Builder getSliceOwnerBuilder() { + bitField0_ |= 0x00000100; onChanged(); return getSliceOwnerFieldBuilder().getBuilder(); } @@ -38648,7 +37188,7 @@ public final class ContextOuterClass { * @return Whether the timestamp field is set. */ public boolean hasTimestamp() { - return timestampBuilder_ != null || timestamp_ != null; + return ((bitField0_ & 0x00000200) != 0); } /** @@ -38672,10 +37212,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } timestamp_ = value; - onChanged(); } else { timestampBuilder_.setMessage(value); } + bitField0_ |= 0x00000200; + onChanged(); return this; } @@ -38685,10 +37226,11 @@ public final class ContextOuterClass { public Builder setTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) { if (timestampBuilder_ == null) { timestamp_ = builderForValue.build(); - onChanged(); } else { timestampBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000200; + onChanged(); return this; } @@ -38697,15 +37239,16 @@ public final class ContextOuterClass { */ public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) { if (timestampBuilder_ == null) { - if (timestamp_ != null) { - timestamp_ = context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000200) != 0) && timestamp_ != null && timestamp_ != context.ContextOuterClass.Timestamp.getDefaultInstance()) { + getTimestampBuilder().mergeFrom(value); } else { timestamp_ = value; } - onChanged(); } else { timestampBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000200; + onChanged(); return this; } @@ -38713,13 +37256,13 @@ public final class ContextOuterClass { * <code>.context.Timestamp timestamp = 10;</code> */ public Builder clearTimestamp() { - if (timestampBuilder_ == null) { - timestamp_ = null; - onChanged(); - } else { - timestamp_ = null; + bitField0_ = (bitField0_ & ~0x00000200); + timestamp_ = null; + if (timestampBuilder_ != null) { + timestampBuilder_.dispose(); timestampBuilder_ = null; } + onChanged(); return this; } @@ -38727,6 +37270,7 @@ public final class ContextOuterClass { * <code>.context.Timestamp timestamp = 10;</code> */ public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() { + bitField0_ |= 0x00000200; onChanged(); return getTimestampFieldBuilder().getBuilder(); } @@ -38780,7 +37324,17 @@ public final class ContextOuterClass { @java.lang.Override public Slice parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Slice(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -38855,63 +37409,6 @@ public final class ContextOuterClass { return new SliceOwner(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private SliceOwner(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.Uuid.Builder subBuilder = null; - if (ownerUuid_ != null) { - subBuilder = ownerUuid_.toBuilder(); - } - ownerUuid_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(ownerUuid_); - ownerUuid_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - ownerString_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_SliceOwner_descriptor; } @@ -38948,12 +37445,13 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.UuidOrBuilder getOwnerUuidOrBuilder() { - return getOwnerUuid(); + return ownerUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : ownerUuid_; } public static final int OWNER_STRING_FIELD_NUMBER = 2; - private volatile java.lang.Object ownerString_; + @SuppressWarnings("serial") + private volatile java.lang.Object ownerString_ = ""; /** * <code>string owner_string = 2;</code> @@ -39006,10 +37504,10 @@ public final class ContextOuterClass { if (ownerUuid_ != null) { output.writeMessage(1, getOwnerUuid()); } - if (!getOwnerStringBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ownerString_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ownerString_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -39021,10 +37519,10 @@ public final class ContextOuterClass { if (ownerUuid_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOwnerUuid()); } - if (!getOwnerStringBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ownerString_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ownerString_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -39046,7 +37544,7 @@ public final class ContextOuterClass { } if (!getOwnerString().equals(other.getOwnerString())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -39064,7 +37562,7 @@ public final class ContextOuterClass { } hash = (37 * hash) + OWNER_STRING_FIELD_NUMBER; hash = (53 * hash) + getOwnerString().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -39158,26 +37656,19 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.SliceOwner.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (ownerUuidBuilder_ == null) { - ownerUuid_ = null; - } else { - ownerUuid_ = null; + bitField0_ = 0; + ownerUuid_ = null; + if (ownerUuidBuilder_ != null) { + ownerUuidBuilder_.dispose(); ownerUuidBuilder_ = null; } ownerString_ = ""; @@ -39206,44 +37697,21 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.SliceOwner buildPartial() { context.ContextOuterClass.SliceOwner result = new context.ContextOuterClass.SliceOwner(this); - if (ownerUuidBuilder_ == null) { - result.ownerUuid_ = ownerUuid_; - } else { - result.ownerUuid_ = ownerUuidBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } - result.ownerString_ = ownerString_; onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.SliceOwner result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.ownerUuid_ = ownerUuidBuilder_ == null ? ownerUuid_ : ownerUuidBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.ownerString_ = ownerString_; + } } @java.lang.Override @@ -39264,9 +37732,10 @@ public final class ContextOuterClass { } if (!other.getOwnerString().isEmpty()) { ownerString_ = other.ownerString_; + bitField0_ |= 0x00000002; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -39278,20 +37747,54 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.SliceOwner parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getOwnerUuidFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + ownerString_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.SliceOwner) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.Uuid ownerUuid_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> ownerUuidBuilder_; @@ -39301,7 +37804,7 @@ public final class ContextOuterClass { * @return Whether the ownerUuid field is set. */ public boolean hasOwnerUuid() { - return ownerUuidBuilder_ != null || ownerUuid_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -39325,10 +37828,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } ownerUuid_ = value; - onChanged(); } else { ownerUuidBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -39338,10 +37842,11 @@ public final class ContextOuterClass { public Builder setOwnerUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { if (ownerUuidBuilder_ == null) { ownerUuid_ = builderForValue.build(); - onChanged(); } else { ownerUuidBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -39350,15 +37855,16 @@ public final class ContextOuterClass { */ public Builder mergeOwnerUuid(context.ContextOuterClass.Uuid value) { if (ownerUuidBuilder_ == null) { - if (ownerUuid_ != null) { - ownerUuid_ = context.ContextOuterClass.Uuid.newBuilder(ownerUuid_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && ownerUuid_ != null && ownerUuid_ != context.ContextOuterClass.Uuid.getDefaultInstance()) { + getOwnerUuidBuilder().mergeFrom(value); } else { ownerUuid_ = value; } - onChanged(); } else { ownerUuidBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -39366,13 +37872,13 @@ public final class ContextOuterClass { * <code>.context.Uuid owner_uuid = 1;</code> */ public Builder clearOwnerUuid() { - if (ownerUuidBuilder_ == null) { - ownerUuid_ = null; - onChanged(); - } else { - ownerUuid_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + ownerUuid_ = null; + if (ownerUuidBuilder_ != null) { + ownerUuidBuilder_.dispose(); ownerUuidBuilder_ = null; } + onChanged(); return this; } @@ -39380,6 +37886,7 @@ public final class ContextOuterClass { * <code>.context.Uuid owner_uuid = 1;</code> */ public context.ContextOuterClass.Uuid.Builder getOwnerUuidBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getOwnerUuidFieldBuilder().getBuilder(); } @@ -39449,6 +37956,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } ownerString_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -39459,6 +37967,7 @@ public final class ContextOuterClass { */ public Builder clearOwnerString() { ownerString_ = getDefaultInstance().getOwnerString(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -39474,6 +37983,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); ownerString_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -39505,7 +38015,17 @@ public final class ContextOuterClass { @java.lang.Override public SliceOwner parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SliceOwner(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -39563,50 +38083,6 @@ public final class ContextOuterClass { return new SliceStatus(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private SliceStatus(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 8: - { - int rawValue = input.readEnum(); - sliceStatus_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_SliceStatus_descriptor; } @@ -39618,7 +38094,7 @@ public final class ContextOuterClass { public static final int SLICE_STATUS_FIELD_NUMBER = 1; - private int sliceStatus_; + private int sliceStatus_ = 0; /** * <code>.context.SliceStatusEnum slice_status = 1;</code> @@ -39635,8 +38111,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.SliceStatusEnum getSliceStatus() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.SliceStatusEnum result = context.ContextOuterClass.SliceStatusEnum.valueOf(sliceStatus_); + context.ContextOuterClass.SliceStatusEnum result = context.ContextOuterClass.SliceStatusEnum.forNumber(sliceStatus_); return result == null ? context.ContextOuterClass.SliceStatusEnum.UNRECOGNIZED : result; } @@ -39658,7 +38133,7 @@ public final class ContextOuterClass { if (sliceStatus_ != context.ContextOuterClass.SliceStatusEnum.SLICESTATUS_UNDEFINED.getNumber()) { output.writeEnum(1, sliceStatus_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -39670,7 +38145,7 @@ public final class ContextOuterClass { if (sliceStatus_ != context.ContextOuterClass.SliceStatusEnum.SLICESTATUS_UNDEFINED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, sliceStatus_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -39686,7 +38161,7 @@ public final class ContextOuterClass { context.ContextOuterClass.SliceStatus other = (context.ContextOuterClass.SliceStatus) obj; if (sliceStatus_ != other.sliceStatus_) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -39700,7 +38175,7 @@ public final class ContextOuterClass { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + SLICE_STATUS_FIELD_NUMBER; hash = (53 * hash) + sliceStatus_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -39794,22 +38269,16 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.SliceStatus.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; sliceStatus_ = 0; return this; } @@ -39836,39 +38305,18 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.SliceStatus buildPartial() { context.ContextOuterClass.SliceStatus result = new context.ContextOuterClass.SliceStatus(this); - result.sliceStatus_ = sliceStatus_; + if (bitField0_ != 0) { + buildPartial0(result); + } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.SliceStatus result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sliceStatus_ = sliceStatus_; + } } @java.lang.Override @@ -39887,7 +38335,7 @@ public final class ContextOuterClass { if (other.sliceStatus_ != 0) { setSliceStatusValue(other.getSliceStatusValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -39899,20 +38347,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.SliceStatus parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 8: + { + sliceStatus_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } + // case 8 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.SliceStatus) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private int sliceStatus_ = 0; /** @@ -39931,6 +38406,7 @@ public final class ContextOuterClass { */ public Builder setSliceStatusValue(int value) { sliceStatus_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -39941,8 +38417,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.SliceStatusEnum getSliceStatus() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.SliceStatusEnum result = context.ContextOuterClass.SliceStatusEnum.valueOf(sliceStatus_); + context.ContextOuterClass.SliceStatusEnum result = context.ContextOuterClass.SliceStatusEnum.forNumber(sliceStatus_); return result == null ? context.ContextOuterClass.SliceStatusEnum.UNRECOGNIZED : result; } @@ -39955,6 +38430,7 @@ public final class ContextOuterClass { if (value == null) { throw new NullPointerException(); } + bitField0_ |= 0x00000001; sliceStatus_ = value.getNumber(); onChanged(); return this; @@ -39965,6 +38441,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearSliceStatus() { + bitField0_ = (bitField0_ & ~0x00000001); sliceStatus_ = 0; onChanged(); return this; @@ -39997,7 +38474,17 @@ public final class ContextOuterClass { @java.lang.Override public SliceStatus parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SliceStatus(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -40068,57 +38555,6 @@ public final class ContextOuterClass { return new SliceConfig(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private SliceConfig(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - configRules_ = new java.util.ArrayList<context.ContextOuterClass.ConfigRule>(); - mutable_bitField0_ |= 0x00000001; - } - configRules_.add(input.readMessage(context.ContextOuterClass.ConfigRule.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - configRules_ = java.util.Collections.unmodifiableList(configRules_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_SliceConfig_descriptor; } @@ -40130,6 +38566,7 @@ public final class ContextOuterClass { public static final int CONFIG_RULES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.ConfigRule> configRules_; /** @@ -40190,7 +38627,7 @@ public final class ContextOuterClass { for (int i = 0; i < configRules_.size(); i++) { output.writeMessage(1, configRules_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -40202,7 +38639,7 @@ public final class ContextOuterClass { for (int i = 0; i < configRules_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, configRules_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -40218,7 +38655,7 @@ public final class ContextOuterClass { context.ContextOuterClass.SliceConfig other = (context.ContextOuterClass.SliceConfig) obj; if (!getConfigRulesList().equals(other.getConfigRulesList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -40234,7 +38671,7 @@ public final class ContextOuterClass { hash = (37 * hash) + CONFIG_RULES_FIELD_NUMBER; hash = (53 * hash) + getConfigRulesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -40328,29 +38765,23 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.SliceConfig.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getConfigRulesFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (configRulesBuilder_ == null) { configRules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + configRules_ = null; configRulesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -40376,7 +38807,15 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.SliceConfig buildPartial() { context.ContextOuterClass.SliceConfig result = new context.ContextOuterClass.SliceConfig(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.SliceConfig result) { if (configRulesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { configRules_ = java.util.Collections.unmodifiableList(configRules_); @@ -40386,38 +38825,10 @@ public final class ContextOuterClass { } else { result.configRules_ = configRulesBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); } - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.SliceConfig result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -40457,7 +38868,7 @@ public final class ContextOuterClass { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -40469,17 +38880,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.SliceConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + context.ContextOuterClass.ConfigRule m = input.readMessage(context.ContextOuterClass.ConfigRule.parser(), extensionRegistry); + if (configRulesBuilder_ == null) { + ensureConfigRulesIsMutable(); + configRules_.add(m); + } else { + configRulesBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.SliceConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -40749,7 +39190,17 @@ public final class ContextOuterClass { @java.lang.Override public SliceConfig parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SliceConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -40820,57 +39271,6 @@ public final class ContextOuterClass { return new SliceIdList(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private SliceIdList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - sliceIds_ = new java.util.ArrayList<context.ContextOuterClass.SliceId>(); - mutable_bitField0_ |= 0x00000001; - } - sliceIds_.add(input.readMessage(context.ContextOuterClass.SliceId.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - sliceIds_ = java.util.Collections.unmodifiableList(sliceIds_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_SliceIdList_descriptor; } @@ -40882,6 +39282,7 @@ public final class ContextOuterClass { public static final int SLICE_IDS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.SliceId> sliceIds_; /** @@ -40942,7 +39343,7 @@ public final class ContextOuterClass { for (int i = 0; i < sliceIds_.size(); i++) { output.writeMessage(1, sliceIds_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -40954,7 +39355,7 @@ public final class ContextOuterClass { for (int i = 0; i < sliceIds_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, sliceIds_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -40970,7 +39371,7 @@ public final class ContextOuterClass { context.ContextOuterClass.SliceIdList other = (context.ContextOuterClass.SliceIdList) obj; if (!getSliceIdsList().equals(other.getSliceIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -40986,7 +39387,7 @@ public final class ContextOuterClass { hash = (37 * hash) + SLICE_IDS_FIELD_NUMBER; hash = (53 * hash) + getSliceIdsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -41080,29 +39481,23 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.SliceIdList.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getSliceIdsFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (sliceIdsBuilder_ == null) { sliceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + sliceIds_ = null; sliceIdsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -41128,7 +39523,15 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.SliceIdList buildPartial() { context.ContextOuterClass.SliceIdList result = new context.ContextOuterClass.SliceIdList(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.SliceIdList result) { if (sliceIdsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { sliceIds_ = java.util.Collections.unmodifiableList(sliceIds_); @@ -41138,38 +39541,10 @@ public final class ContextOuterClass { } else { result.sliceIds_ = sliceIdsBuilder_.build(); } - onBuilt(); - return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.SliceIdList result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -41209,7 +39584,7 @@ public final class ContextOuterClass { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -41221,17 +39596,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.SliceIdList parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + context.ContextOuterClass.SliceId m = input.readMessage(context.ContextOuterClass.SliceId.parser(), extensionRegistry); + if (sliceIdsBuilder_ == null) { + ensureSliceIdsIsMutable(); + sliceIds_.add(m); + } else { + sliceIdsBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.SliceIdList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -41501,7 +39906,17 @@ public final class ContextOuterClass { @java.lang.Override public SliceIdList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SliceIdList(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -41572,57 +39987,6 @@ public final class ContextOuterClass { return new SliceList(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private SliceList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - slices_ = new java.util.ArrayList<context.ContextOuterClass.Slice>(); - mutable_bitField0_ |= 0x00000001; - } - slices_.add(input.readMessage(context.ContextOuterClass.Slice.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - slices_ = java.util.Collections.unmodifiableList(slices_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_SliceList_descriptor; } @@ -41634,6 +39998,7 @@ public final class ContextOuterClass { public static final int SLICES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.Slice> slices_; /** @@ -41694,7 +40059,7 @@ public final class ContextOuterClass { for (int i = 0; i < slices_.size(); i++) { output.writeMessage(1, slices_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -41706,7 +40071,7 @@ public final class ContextOuterClass { for (int i = 0; i < slices_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, slices_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -41722,7 +40087,7 @@ public final class ContextOuterClass { context.ContextOuterClass.SliceList other = (context.ContextOuterClass.SliceList) obj; if (!getSlicesList().equals(other.getSlicesList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -41738,7 +40103,7 @@ public final class ContextOuterClass { hash = (37 * hash) + SLICES_FIELD_NUMBER; hash = (53 * hash) + getSlicesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -41832,29 +40197,23 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.SliceList.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getSlicesFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (slicesBuilder_ == null) { slices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + slices_ = null; slicesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -41880,7 +40239,15 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.SliceList buildPartial() { context.ContextOuterClass.SliceList result = new context.ContextOuterClass.SliceList(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.SliceList result) { if (slicesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { slices_ = java.util.Collections.unmodifiableList(slices_); @@ -41890,38 +40257,10 @@ public final class ContextOuterClass { } else { result.slices_ = slicesBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); } - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.SliceList result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -41961,7 +40300,7 @@ public final class ContextOuterClass { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -41973,17 +40312,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.SliceList parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + context.ContextOuterClass.Slice m = input.readMessage(context.ContextOuterClass.Slice.parser(), extensionRegistry); + if (slicesBuilder_ == null) { + ensureSlicesIsMutable(); + slices_.add(m); + } else { + slicesBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.SliceList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -42253,7 +40622,17 @@ public final class ContextOuterClass { @java.lang.Override public SliceList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SliceList(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -42345,82 +40724,6 @@ public final class ContextOuterClass { return new SliceFilter(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private SliceFilter(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.SliceIdList.Builder subBuilder = null; - if (sliceIds_ != null) { - subBuilder = sliceIds_.toBuilder(); - } - sliceIds_ = input.readMessage(context.ContextOuterClass.SliceIdList.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sliceIds_); - sliceIds_ = subBuilder.buildPartial(); - } - break; - } - case 16: - { - includeEndpointIds_ = input.readBool(); - break; - } - case 24: - { - includeConstraints_ = input.readBool(); - break; - } - case 32: - { - includeServiceIds_ = input.readBool(); - break; - } - case 40: - { - includeSubsliceIds_ = input.readBool(); - break; - } - case 48: - { - includeConfigRules_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_SliceFilter_descriptor; } @@ -42457,12 +40760,12 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.SliceIdListOrBuilder getSliceIdsOrBuilder() { - return getSliceIds(); + return sliceIds_ == null ? context.ContextOuterClass.SliceIdList.getDefaultInstance() : sliceIds_; } public static final int INCLUDE_ENDPOINT_IDS_FIELD_NUMBER = 2; - private boolean includeEndpointIds_; + private boolean includeEndpointIds_ = false; /** * <code>bool include_endpoint_ids = 2;</code> @@ -42475,7 +40778,7 @@ public final class ContextOuterClass { public static final int INCLUDE_CONSTRAINTS_FIELD_NUMBER = 3; - private boolean includeConstraints_; + private boolean includeConstraints_ = false; /** * <code>bool include_constraints = 3;</code> @@ -42488,7 +40791,7 @@ public final class ContextOuterClass { public static final int INCLUDE_SERVICE_IDS_FIELD_NUMBER = 4; - private boolean includeServiceIds_; + private boolean includeServiceIds_ = false; /** * <code>bool include_service_ids = 4;</code> @@ -42501,7 +40804,7 @@ public final class ContextOuterClass { public static final int INCLUDE_SUBSLICE_IDS_FIELD_NUMBER = 5; - private boolean includeSubsliceIds_; + private boolean includeSubsliceIds_ = false; /** * <code>bool include_subslice_ids = 5;</code> @@ -42514,7 +40817,7 @@ public final class ContextOuterClass { public static final int INCLUDE_CONFIG_RULES_FIELD_NUMBER = 6; - private boolean includeConfigRules_; + private boolean includeConfigRules_ = false; /** * <code>bool include_config_rules = 6;</code> @@ -42558,7 +40861,7 @@ public final class ContextOuterClass { if (includeConfigRules_ != false) { output.writeBool(6, includeConfigRules_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -42585,7 +40888,7 @@ public final class ContextOuterClass { if (includeConfigRules_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, includeConfigRules_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -42615,7 +40918,7 @@ public final class ContextOuterClass { return false; if (getIncludeConfigRules() != other.getIncludeConfigRules()) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -42641,7 +40944,7 @@ public final class ContextOuterClass { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeSubsliceIds()); hash = (37 * hash) + INCLUDE_CONFIG_RULES_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeConfigRules()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -42735,26 +41038,19 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.SliceFilter.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (sliceIdsBuilder_ == null) { - sliceIds_ = null; - } else { - sliceIds_ = null; + bitField0_ = 0; + sliceIds_ = null; + if (sliceIdsBuilder_ != null) { + sliceIdsBuilder_.dispose(); sliceIdsBuilder_ = null; } includeEndpointIds_ = false; @@ -42787,48 +41083,33 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.SliceFilter buildPartial() { context.ContextOuterClass.SliceFilter result = new context.ContextOuterClass.SliceFilter(this); - if (sliceIdsBuilder_ == null) { - result.sliceIds_ = sliceIds_; - } else { - result.sliceIds_ = sliceIdsBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } - result.includeEndpointIds_ = includeEndpointIds_; - result.includeConstraints_ = includeConstraints_; - result.includeServiceIds_ = includeServiceIds_; - result.includeSubsliceIds_ = includeSubsliceIds_; - result.includeConfigRules_ = includeConfigRules_; onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.SliceFilter result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.sliceIds_ = sliceIdsBuilder_ == null ? sliceIds_ : sliceIdsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.includeEndpointIds_ = includeEndpointIds_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.includeConstraints_ = includeConstraints_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.includeServiceIds_ = includeServiceIds_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.includeSubsliceIds_ = includeSubsliceIds_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.includeConfigRules_ = includeConfigRules_; + } } @java.lang.Override @@ -42862,7 +41143,7 @@ public final class ContextOuterClass { if (other.getIncludeConfigRules() != false) { setIncludeConfigRules(other.getIncludeConfigRules()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -42874,20 +41155,82 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.SliceFilter parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getSliceIdsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 16: + { + includeEndpointIds_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } + // case 16 + case 24: + { + includeConstraints_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } + // case 24 + case 32: + { + includeServiceIds_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } + // case 32 + case 40: + { + includeSubsliceIds_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } + // case 40 + case 48: + { + includeConfigRules_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } + // case 48 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.SliceFilter) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.SliceIdList sliceIds_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.SliceIdList, context.ContextOuterClass.SliceIdList.Builder, context.ContextOuterClass.SliceIdListOrBuilder> sliceIdsBuilder_; @@ -42897,7 +41240,7 @@ public final class ContextOuterClass { * @return Whether the sliceIds field is set. */ public boolean hasSliceIds() { - return sliceIdsBuilder_ != null || sliceIds_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -42921,10 +41264,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } sliceIds_ = value; - onChanged(); } else { sliceIdsBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -42934,10 +41278,11 @@ public final class ContextOuterClass { public Builder setSliceIds(context.ContextOuterClass.SliceIdList.Builder builderForValue) { if (sliceIdsBuilder_ == null) { sliceIds_ = builderForValue.build(); - onChanged(); } else { sliceIdsBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -42946,15 +41291,16 @@ public final class ContextOuterClass { */ public Builder mergeSliceIds(context.ContextOuterClass.SliceIdList value) { if (sliceIdsBuilder_ == null) { - if (sliceIds_ != null) { - sliceIds_ = context.ContextOuterClass.SliceIdList.newBuilder(sliceIds_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && sliceIds_ != null && sliceIds_ != context.ContextOuterClass.SliceIdList.getDefaultInstance()) { + getSliceIdsBuilder().mergeFrom(value); } else { sliceIds_ = value; } - onChanged(); } else { sliceIdsBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -42962,13 +41308,13 @@ public final class ContextOuterClass { * <code>.context.SliceIdList slice_ids = 1;</code> */ public Builder clearSliceIds() { - if (sliceIdsBuilder_ == null) { - sliceIds_ = null; - onChanged(); - } else { - sliceIds_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + sliceIds_ = null; + if (sliceIdsBuilder_ != null) { + sliceIdsBuilder_.dispose(); sliceIdsBuilder_ = null; } + onChanged(); return this; } @@ -42976,6 +41322,7 @@ public final class ContextOuterClass { * <code>.context.SliceIdList slice_ids = 1;</code> */ public context.ContextOuterClass.SliceIdList.Builder getSliceIdsBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getSliceIdsFieldBuilder().getBuilder(); } @@ -43020,6 +41367,7 @@ public final class ContextOuterClass { */ public Builder setIncludeEndpointIds(boolean value) { includeEndpointIds_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -43029,6 +41377,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearIncludeEndpointIds() { + bitField0_ = (bitField0_ & ~0x00000002); includeEndpointIds_ = false; onChanged(); return this; @@ -43052,6 +41401,7 @@ public final class ContextOuterClass { */ public Builder setIncludeConstraints(boolean value) { includeConstraints_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -43061,6 +41411,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearIncludeConstraints() { + bitField0_ = (bitField0_ & ~0x00000004); includeConstraints_ = false; onChanged(); return this; @@ -43084,6 +41435,7 @@ public final class ContextOuterClass { */ public Builder setIncludeServiceIds(boolean value) { includeServiceIds_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -43093,6 +41445,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearIncludeServiceIds() { + bitField0_ = (bitField0_ & ~0x00000008); includeServiceIds_ = false; onChanged(); return this; @@ -43116,6 +41469,7 @@ public final class ContextOuterClass { */ public Builder setIncludeSubsliceIds(boolean value) { includeSubsliceIds_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -43125,6 +41479,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearIncludeSubsliceIds() { + bitField0_ = (bitField0_ & ~0x00000010); includeSubsliceIds_ = false; onChanged(); return this; @@ -43148,6 +41503,7 @@ public final class ContextOuterClass { */ public Builder setIncludeConfigRules(boolean value) { includeConfigRules_ = value; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -43157,6 +41513,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearIncludeConfigRules() { + bitField0_ = (bitField0_ & ~0x00000020); includeConfigRules_ = false; onChanged(); return this; @@ -43189,7 +41546,17 @@ public final class ContextOuterClass { @java.lang.Override public SliceFilter parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SliceFilter(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -43268,70 +41635,6 @@ public final class ContextOuterClass { return new SliceEvent(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private SliceEvent(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.Event.Builder subBuilder = null; - if (event_ != null) { - subBuilder = event_.toBuilder(); - } - event_ = input.readMessage(context.ContextOuterClass.Event.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(event_); - event_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - context.ContextOuterClass.SliceId.Builder subBuilder = null; - if (sliceId_ != null) { - subBuilder = sliceId_.toBuilder(); - } - sliceId_ = input.readMessage(context.ContextOuterClass.SliceId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sliceId_); - sliceId_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_SliceEvent_descriptor; } @@ -43368,7 +41671,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - return getEvent(); + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; } public static final int SLICE_ID_FIELD_NUMBER = 2; @@ -43398,7 +41701,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder() { - return getSliceId(); + return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; } private byte memoizedIsInitialized = -1; @@ -43422,7 +41725,7 @@ public final class ContextOuterClass { if (sliceId_ != null) { output.writeMessage(2, getSliceId()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -43437,7 +41740,7 @@ public final class ContextOuterClass { if (sliceId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSliceId()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -43463,7 +41766,7 @@ public final class ContextOuterClass { if (!getSliceId().equals(other.getSliceId())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -43483,7 +41786,7 @@ public final class ContextOuterClass { hash = (37 * hash) + SLICE_ID_FIELD_NUMBER; hash = (53 * hash) + getSliceId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -43577,32 +41880,24 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.SliceEvent.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (eventBuilder_ == null) { - event_ = null; - } else { - event_ = null; + bitField0_ = 0; + event_ = null; + if (eventBuilder_ != null) { + eventBuilder_.dispose(); eventBuilder_ = null; } - if (sliceIdBuilder_ == null) { - sliceId_ = null; - } else { - sliceId_ = null; + sliceId_ = null; + if (sliceIdBuilder_ != null) { + sliceIdBuilder_.dispose(); sliceIdBuilder_ = null; } return this; @@ -43630,48 +41925,21 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.SliceEvent buildPartial() { context.ContextOuterClass.SliceEvent result = new context.ContextOuterClass.SliceEvent(this); - if (eventBuilder_ == null) { - result.event_ = event_; - } else { - result.event_ = eventBuilder_.build(); - } - if (sliceIdBuilder_ == null) { - result.sliceId_ = sliceId_; - } else { - result.sliceId_ = sliceIdBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.SliceEvent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.event_ = eventBuilder_ == null ? event_ : eventBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.sliceId_ = sliceIdBuilder_ == null ? sliceId_ : sliceIdBuilder_.build(); + } } @java.lang.Override @@ -43693,7 +41961,7 @@ public final class ContextOuterClass { if (other.hasSliceId()) { mergeSliceId(other.getSliceId()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -43705,20 +41973,54 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.SliceEvent parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getEventFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + input.readMessage(getSliceIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } + // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.SliceEvent) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.Event event_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> eventBuilder_; @@ -43728,7 +42030,7 @@ public final class ContextOuterClass { * @return Whether the event field is set. */ public boolean hasEvent() { - return eventBuilder_ != null || event_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -43752,10 +42054,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } event_ = value; - onChanged(); } else { eventBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -43765,10 +42068,11 @@ public final class ContextOuterClass { public Builder setEvent(context.ContextOuterClass.Event.Builder builderForValue) { if (eventBuilder_ == null) { event_ = builderForValue.build(); - onChanged(); } else { eventBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -43777,15 +42081,16 @@ public final class ContextOuterClass { */ public Builder mergeEvent(context.ContextOuterClass.Event value) { if (eventBuilder_ == null) { - if (event_ != null) { - event_ = context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && event_ != null && event_ != context.ContextOuterClass.Event.getDefaultInstance()) { + getEventBuilder().mergeFrom(value); } else { event_ = value; } - onChanged(); } else { eventBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -43793,13 +42098,13 @@ public final class ContextOuterClass { * <code>.context.Event event = 1;</code> */ public Builder clearEvent() { - if (eventBuilder_ == null) { - event_ = null; - onChanged(); - } else { - event_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + event_ = null; + if (eventBuilder_ != null) { + eventBuilder_.dispose(); eventBuilder_ = null; } + onChanged(); return this; } @@ -43807,6 +42112,7 @@ public final class ContextOuterClass { * <code>.context.Event event = 1;</code> */ public context.ContextOuterClass.Event.Builder getEventBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getEventFieldBuilder().getBuilder(); } @@ -43842,7 +42148,7 @@ public final class ContextOuterClass { * @return Whether the sliceId field is set. */ public boolean hasSliceId() { - return sliceIdBuilder_ != null || sliceId_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** @@ -43866,10 +42172,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } sliceId_ = value; - onChanged(); } else { sliceIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -43879,10 +42186,11 @@ public final class ContextOuterClass { public Builder setSliceId(context.ContextOuterClass.SliceId.Builder builderForValue) { if (sliceIdBuilder_ == null) { sliceId_ = builderForValue.build(); - onChanged(); } else { sliceIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -43891,15 +42199,16 @@ public final class ContextOuterClass { */ public Builder mergeSliceId(context.ContextOuterClass.SliceId value) { if (sliceIdBuilder_ == null) { - if (sliceId_ != null) { - sliceId_ = context.ContextOuterClass.SliceId.newBuilder(sliceId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000002) != 0) && sliceId_ != null && sliceId_ != context.ContextOuterClass.SliceId.getDefaultInstance()) { + getSliceIdBuilder().mergeFrom(value); } else { sliceId_ = value; } - onChanged(); } else { sliceIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -43907,13 +42216,13 @@ public final class ContextOuterClass { * <code>.context.SliceId slice_id = 2;</code> */ public Builder clearSliceId() { - if (sliceIdBuilder_ == null) { - sliceId_ = null; - onChanged(); - } else { - sliceId_ = null; + bitField0_ = (bitField0_ & ~0x00000002); + sliceId_ = null; + if (sliceIdBuilder_ != null) { + sliceIdBuilder_.dispose(); sliceIdBuilder_ = null; } + onChanged(); return this; } @@ -43921,6 +42230,7 @@ public final class ContextOuterClass { * <code>.context.SliceId slice_id = 2;</code> */ public context.ContextOuterClass.SliceId.Builder getSliceIdBuilder() { + bitField0_ |= 0x00000002; onChanged(); return getSliceIdFieldBuilder().getBuilder(); } @@ -43974,7 +42284,17 @@ public final class ContextOuterClass { @java.lang.Override public SliceEvent parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SliceEvent(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -44040,57 +42360,6 @@ public final class ContextOuterClass { return new ConnectionId(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ConnectionId(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.Uuid.Builder subBuilder = null; - if (connectionUuid_ != null) { - subBuilder = connectionUuid_.toBuilder(); - } - connectionUuid_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(connectionUuid_); - connectionUuid_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_ConnectionId_descriptor; } @@ -44127,7 +42396,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.UuidOrBuilder getConnectionUuidOrBuilder() { - return getConnectionUuid(); + return connectionUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : connectionUuid_; } private byte memoizedIsInitialized = -1; @@ -44148,7 +42417,7 @@ public final class ContextOuterClass { if (connectionUuid_ != null) { output.writeMessage(1, getConnectionUuid()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -44160,7 +42429,7 @@ public final class ContextOuterClass { if (connectionUuid_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getConnectionUuid()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -44180,7 +42449,7 @@ public final class ContextOuterClass { if (!getConnectionUuid().equals(other.getConnectionUuid())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -44196,7 +42465,7 @@ public final class ContextOuterClass { hash = (37 * hash) + CONNECTION_UUID_FIELD_NUMBER; hash = (53 * hash) + getConnectionUuid().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -44294,26 +42563,19 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.ConnectionId.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (connectionUuidBuilder_ == null) { - connectionUuid_ = null; - } else { - connectionUuid_ = null; + bitField0_ = 0; + connectionUuid_ = null; + if (connectionUuidBuilder_ != null) { + connectionUuidBuilder_.dispose(); connectionUuidBuilder_ = null; } return this; @@ -44341,43 +42603,18 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.ConnectionId buildPartial() { context.ContextOuterClass.ConnectionId result = new context.ContextOuterClass.ConnectionId(this); - if (connectionUuidBuilder_ == null) { - result.connectionUuid_ = connectionUuid_; - } else { - result.connectionUuid_ = connectionUuidBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.ConnectionId result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.connectionUuid_ = connectionUuidBuilder_ == null ? connectionUuid_ : connectionUuidBuilder_.build(); + } } @java.lang.Override @@ -44396,7 +42633,7 @@ public final class ContextOuterClass { if (other.hasConnectionUuid()) { mergeConnectionUuid(other.getConnectionUuid()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -44408,20 +42645,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.ConnectionId parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getConnectionUuidFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConnectionId) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.Uuid connectionUuid_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> connectionUuidBuilder_; @@ -44431,7 +42695,7 @@ public final class ContextOuterClass { * @return Whether the connectionUuid field is set. */ public boolean hasConnectionUuid() { - return connectionUuidBuilder_ != null || connectionUuid_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -44455,10 +42719,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } connectionUuid_ = value; - onChanged(); } else { connectionUuidBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -44468,10 +42733,11 @@ public final class ContextOuterClass { public Builder setConnectionUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { if (connectionUuidBuilder_ == null) { connectionUuid_ = builderForValue.build(); - onChanged(); } else { connectionUuidBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -44480,15 +42746,16 @@ public final class ContextOuterClass { */ public Builder mergeConnectionUuid(context.ContextOuterClass.Uuid value) { if (connectionUuidBuilder_ == null) { - if (connectionUuid_ != null) { - connectionUuid_ = context.ContextOuterClass.Uuid.newBuilder(connectionUuid_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && connectionUuid_ != null && connectionUuid_ != context.ContextOuterClass.Uuid.getDefaultInstance()) { + getConnectionUuidBuilder().mergeFrom(value); } else { connectionUuid_ = value; } - onChanged(); } else { connectionUuidBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -44496,13 +42763,13 @@ public final class ContextOuterClass { * <code>.context.Uuid connection_uuid = 1;</code> */ public Builder clearConnectionUuid() { - if (connectionUuidBuilder_ == null) { - connectionUuid_ = null; - onChanged(); - } else { - connectionUuid_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + connectionUuid_ = null; + if (connectionUuidBuilder_ != null) { + connectionUuidBuilder_.dispose(); connectionUuidBuilder_ = null; } + onChanged(); return this; } @@ -44510,6 +42777,7 @@ public final class ContextOuterClass { * <code>.context.Uuid connection_uuid = 1;</code> */ public context.ContextOuterClass.Uuid.Builder getConnectionUuidBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getConnectionUuidFieldBuilder().getBuilder(); } @@ -44563,7 +42831,17 @@ public final class ContextOuterClass { @java.lang.Override public ConnectionId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ConnectionId(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -44621,50 +42899,6 @@ public final class ContextOuterClass { return new ConnectionSettings_L0(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ConnectionSettings_L0(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - lspSymbolicName_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_ConnectionSettings_L0_descriptor; } @@ -44676,7 +42910,8 @@ public final class ContextOuterClass { public static final int LSP_SYMBOLIC_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object lspSymbolicName_; + @SuppressWarnings("serial") + private volatile java.lang.Object lspSymbolicName_ = ""; /** * <code>string lsp_symbolic_name = 1;</code> @@ -44726,10 +42961,10 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getLspSymbolicNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lspSymbolicName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, lspSymbolicName_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -44738,10 +42973,10 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (!getLspSymbolicNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lspSymbolicName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, lspSymbolicName_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -44757,7 +42992,7 @@ public final class ContextOuterClass { context.ContextOuterClass.ConnectionSettings_L0 other = (context.ContextOuterClass.ConnectionSettings_L0) obj; if (!getLspSymbolicName().equals(other.getLspSymbolicName())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -44771,7 +43006,7 @@ public final class ContextOuterClass { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + LSP_SYMBOLIC_NAME_FIELD_NUMBER; hash = (53 * hash) + getLspSymbolicName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -44865,22 +43100,16 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.ConnectionSettings_L0.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; lspSymbolicName_ = ""; return this; } @@ -44907,39 +43136,18 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.ConnectionSettings_L0 buildPartial() { context.ContextOuterClass.ConnectionSettings_L0 result = new context.ContextOuterClass.ConnectionSettings_L0(this); - result.lspSymbolicName_ = lspSymbolicName_; + if (bitField0_ != 0) { + buildPartial0(result); + } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.ConnectionSettings_L0 result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.lspSymbolicName_ = lspSymbolicName_; + } } @java.lang.Override @@ -44957,9 +43165,10 @@ public final class ContextOuterClass { return this; if (!other.getLspSymbolicName().isEmpty()) { lspSymbolicName_ = other.lspSymbolicName_; + bitField0_ |= 0x00000001; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -44971,20 +43180,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.ConnectionSettings_L0 parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + lspSymbolicName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConnectionSettings_L0) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private java.lang.Object lspSymbolicName_ = ""; /** @@ -45028,6 +43264,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } lspSymbolicName_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -45038,6 +43275,7 @@ public final class ContextOuterClass { */ public Builder clearLspSymbolicName() { lspSymbolicName_ = getDefaultInstance().getLspSymbolicName(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -45053,6 +43291,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); lspSymbolicName_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -45084,7 +43323,17 @@ public final class ContextOuterClass { @java.lang.Override public ConnectionSettings_L0 parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ConnectionSettings_L0(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -45179,76 +43428,6 @@ public final class ContextOuterClass { return new ConnectionSettings_L2(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ConnectionSettings_L2(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - srcMacAddress_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - dstMacAddress_ = s; - break; - } - case 24: - { - etherType_ = input.readUInt32(); - break; - } - case 32: - { - vlanId_ = input.readUInt32(); - break; - } - case 40: - { - mplsLabel_ = input.readUInt32(); - break; - } - case 48: - { - mplsTrafficClass_ = input.readUInt32(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_ConnectionSettings_L2_descriptor; } @@ -45260,7 +43439,8 @@ public final class ContextOuterClass { public static final int SRC_MAC_ADDRESS_FIELD_NUMBER = 1; - private volatile java.lang.Object srcMacAddress_; + @SuppressWarnings("serial") + private volatile java.lang.Object srcMacAddress_ = ""; /** * <code>string src_mac_address = 1;</code> @@ -45297,7 +43477,8 @@ public final class ContextOuterClass { public static final int DST_MAC_ADDRESS_FIELD_NUMBER = 2; - private volatile java.lang.Object dstMacAddress_; + @SuppressWarnings("serial") + private volatile java.lang.Object dstMacAddress_ = ""; /** * <code>string dst_mac_address = 2;</code> @@ -45334,7 +43515,7 @@ public final class ContextOuterClass { public static final int ETHER_TYPE_FIELD_NUMBER = 3; - private int etherType_; + private int etherType_ = 0; /** * <code>uint32 ether_type = 3;</code> @@ -45347,7 +43528,7 @@ public final class ContextOuterClass { public static final int VLAN_ID_FIELD_NUMBER = 4; - private int vlanId_; + private int vlanId_ = 0; /** * <code>uint32 vlan_id = 4;</code> @@ -45360,7 +43541,7 @@ public final class ContextOuterClass { public static final int MPLS_LABEL_FIELD_NUMBER = 5; - private int mplsLabel_; + private int mplsLabel_ = 0; /** * <code>uint32 mpls_label = 5;</code> @@ -45373,7 +43554,7 @@ public final class ContextOuterClass { public static final int MPLS_TRAFFIC_CLASS_FIELD_NUMBER = 6; - private int mplsTrafficClass_; + private int mplsTrafficClass_ = 0; /** * <code>uint32 mpls_traffic_class = 6;</code> @@ -45399,10 +43580,10 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getSrcMacAddressBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(srcMacAddress_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, srcMacAddress_); } - if (!getDstMacAddressBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dstMacAddress_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dstMacAddress_); } if (etherType_ != 0) { @@ -45417,7 +43598,7 @@ public final class ContextOuterClass { if (mplsTrafficClass_ != 0) { output.writeUInt32(6, mplsTrafficClass_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -45426,10 +43607,10 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (!getSrcMacAddressBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(srcMacAddress_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, srcMacAddress_); } - if (!getDstMacAddressBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dstMacAddress_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dstMacAddress_); } if (etherType_ != 0) { @@ -45444,7 +43625,7 @@ public final class ContextOuterClass { if (mplsTrafficClass_ != 0) { size += com.google.protobuf.CodedOutputStream.computeUInt32Size(6, mplsTrafficClass_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -45470,7 +43651,7 @@ public final class ContextOuterClass { return false; if (getMplsTrafficClass() != other.getMplsTrafficClass()) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -45494,7 +43675,7 @@ public final class ContextOuterClass { hash = (53 * hash) + getMplsLabel(); hash = (37 * hash) + MPLS_TRAFFIC_CLASS_FIELD_NUMBER; hash = (53 * hash) + getMplsTrafficClass(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -45588,22 +43769,16 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.ConnectionSettings_L2.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; srcMacAddress_ = ""; dstMacAddress_ = ""; etherType_ = 0; @@ -45635,44 +43810,33 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.ConnectionSettings_L2 buildPartial() { context.ContextOuterClass.ConnectionSettings_L2 result = new context.ContextOuterClass.ConnectionSettings_L2(this); - result.srcMacAddress_ = srcMacAddress_; - result.dstMacAddress_ = dstMacAddress_; - result.etherType_ = etherType_; - result.vlanId_ = vlanId_; - result.mplsLabel_ = mplsLabel_; - result.mplsTrafficClass_ = mplsTrafficClass_; + if (bitField0_ != 0) { + buildPartial0(result); + } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.ConnectionSettings_L2 result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.srcMacAddress_ = srcMacAddress_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dstMacAddress_ = dstMacAddress_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.etherType_ = etherType_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.vlanId_ = vlanId_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.mplsLabel_ = mplsLabel_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.mplsTrafficClass_ = mplsTrafficClass_; + } } @java.lang.Override @@ -45690,10 +43854,12 @@ public final class ContextOuterClass { return this; if (!other.getSrcMacAddress().isEmpty()) { srcMacAddress_ = other.srcMacAddress_; + bitField0_ |= 0x00000001; onChanged(); } if (!other.getDstMacAddress().isEmpty()) { dstMacAddress_ = other.dstMacAddress_; + bitField0_ |= 0x00000002; onChanged(); } if (other.getEtherType() != 0) { @@ -45708,7 +43874,7 @@ public final class ContextOuterClass { if (other.getMplsTrafficClass() != 0) { setMplsTrafficClass(other.getMplsTrafficClass()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -45720,20 +43886,82 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.ConnectionSettings_L2 parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + srcMacAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + dstMacAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 24: + { + etherType_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } + // case 24 + case 32: + { + vlanId_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } + // case 32 + case 40: + { + mplsLabel_ = input.readUInt32(); + bitField0_ |= 0x00000010; + break; + } + // case 40 + case 48: + { + mplsTrafficClass_ = input.readUInt32(); + bitField0_ |= 0x00000020; + break; + } + // case 48 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConnectionSettings_L2) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private java.lang.Object srcMacAddress_ = ""; /** @@ -45777,6 +44005,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } srcMacAddress_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -45787,6 +44016,7 @@ public final class ContextOuterClass { */ public Builder clearSrcMacAddress() { srcMacAddress_ = getDefaultInstance().getSrcMacAddress(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -45802,6 +44032,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); srcMacAddress_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -45849,6 +44080,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } dstMacAddress_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -45859,6 +44091,7 @@ public final class ContextOuterClass { */ public Builder clearDstMacAddress() { dstMacAddress_ = getDefaultInstance().getDstMacAddress(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -45874,6 +44107,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); dstMacAddress_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -45896,6 +44130,7 @@ public final class ContextOuterClass { */ public Builder setEtherType(int value) { etherType_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -45905,6 +44140,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearEtherType() { + bitField0_ = (bitField0_ & ~0x00000004); etherType_ = 0; onChanged(); return this; @@ -45928,6 +44164,7 @@ public final class ContextOuterClass { */ public Builder setVlanId(int value) { vlanId_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -45937,6 +44174,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearVlanId() { + bitField0_ = (bitField0_ & ~0x00000008); vlanId_ = 0; onChanged(); return this; @@ -45960,6 +44198,7 @@ public final class ContextOuterClass { */ public Builder setMplsLabel(int value) { mplsLabel_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -45969,6 +44208,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearMplsLabel() { + bitField0_ = (bitField0_ & ~0x00000010); mplsLabel_ = 0; onChanged(); return this; @@ -45992,6 +44232,7 @@ public final class ContextOuterClass { */ public Builder setMplsTrafficClass(int value) { mplsTrafficClass_ = value; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -46001,6 +44242,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearMplsTrafficClass() { + bitField0_ = (bitField0_ & ~0x00000020); mplsTrafficClass_ = 0; onChanged(); return this; @@ -46033,7 +44275,17 @@ public final class ContextOuterClass { @java.lang.Override public ConnectionSettings_L2 parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ConnectionSettings_L2(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -46122,71 +44374,6 @@ public final class ContextOuterClass { return new ConnectionSettings_L3(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ConnectionSettings_L3(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - srcIpAddress_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - dstIpAddress_ = s; - break; - } - case 24: - { - dscp_ = input.readUInt32(); - break; - } - case 32: - { - protocol_ = input.readUInt32(); - break; - } - case 40: - { - ttl_ = input.readUInt32(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_ConnectionSettings_L3_descriptor; } @@ -46198,7 +44385,8 @@ public final class ContextOuterClass { public static final int SRC_IP_ADDRESS_FIELD_NUMBER = 1; - private volatile java.lang.Object srcIpAddress_; + @SuppressWarnings("serial") + private volatile java.lang.Object srcIpAddress_ = ""; /** * <code>string src_ip_address = 1;</code> @@ -46235,7 +44423,8 @@ public final class ContextOuterClass { public static final int DST_IP_ADDRESS_FIELD_NUMBER = 2; - private volatile java.lang.Object dstIpAddress_; + @SuppressWarnings("serial") + private volatile java.lang.Object dstIpAddress_ = ""; /** * <code>string dst_ip_address = 2;</code> @@ -46272,7 +44461,7 @@ public final class ContextOuterClass { public static final int DSCP_FIELD_NUMBER = 3; - private int dscp_; + private int dscp_ = 0; /** * <code>uint32 dscp = 3;</code> @@ -46285,7 +44474,7 @@ public final class ContextOuterClass { public static final int PROTOCOL_FIELD_NUMBER = 4; - private int protocol_; + private int protocol_ = 0; /** * <code>uint32 protocol = 4;</code> @@ -46298,7 +44487,7 @@ public final class ContextOuterClass { public static final int TTL_FIELD_NUMBER = 5; - private int ttl_; + private int ttl_ = 0; /** * <code>uint32 ttl = 5;</code> @@ -46324,10 +44513,10 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getSrcIpAddressBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(srcIpAddress_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, srcIpAddress_); } - if (!getDstIpAddressBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dstIpAddress_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dstIpAddress_); } if (dscp_ != 0) { @@ -46339,7 +44528,7 @@ public final class ContextOuterClass { if (ttl_ != 0) { output.writeUInt32(5, ttl_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -46348,10 +44537,10 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (!getSrcIpAddressBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(srcIpAddress_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, srcIpAddress_); } - if (!getDstIpAddressBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dstIpAddress_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dstIpAddress_); } if (dscp_ != 0) { @@ -46363,7 +44552,7 @@ public final class ContextOuterClass { if (ttl_ != 0) { size += com.google.protobuf.CodedOutputStream.computeUInt32Size(5, ttl_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -46387,7 +44576,7 @@ public final class ContextOuterClass { return false; if (getTtl() != other.getTtl()) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -46409,7 +44598,7 @@ public final class ContextOuterClass { hash = (53 * hash) + getProtocol(); hash = (37 * hash) + TTL_FIELD_NUMBER; hash = (53 * hash) + getTtl(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -46503,22 +44692,16 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.ConnectionSettings_L3.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; srcIpAddress_ = ""; dstIpAddress_ = ""; dscp_ = 0; @@ -46549,43 +44732,30 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.ConnectionSettings_L3 buildPartial() { context.ContextOuterClass.ConnectionSettings_L3 result = new context.ContextOuterClass.ConnectionSettings_L3(this); - result.srcIpAddress_ = srcIpAddress_; - result.dstIpAddress_ = dstIpAddress_; - result.dscp_ = dscp_; - result.protocol_ = protocol_; - result.ttl_ = ttl_; + if (bitField0_ != 0) { + buildPartial0(result); + } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.ConnectionSettings_L3 result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.srcIpAddress_ = srcIpAddress_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dstIpAddress_ = dstIpAddress_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.dscp_ = dscp_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.protocol_ = protocol_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.ttl_ = ttl_; + } } @java.lang.Override @@ -46603,10 +44773,12 @@ public final class ContextOuterClass { return this; if (!other.getSrcIpAddress().isEmpty()) { srcIpAddress_ = other.srcIpAddress_; + bitField0_ |= 0x00000001; onChanged(); } if (!other.getDstIpAddress().isEmpty()) { dstIpAddress_ = other.dstIpAddress_; + bitField0_ |= 0x00000002; onChanged(); } if (other.getDscp() != 0) { @@ -46618,7 +44790,7 @@ public final class ContextOuterClass { if (other.getTtl() != 0) { setTtl(other.getTtl()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -46630,20 +44802,75 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.ConnectionSettings_L3 parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + srcIpAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + dstIpAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 24: + { + dscp_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } + // case 24 + case 32: + { + protocol_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } + // case 32 + case 40: + { + ttl_ = input.readUInt32(); + bitField0_ |= 0x00000010; + break; + } + // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConnectionSettings_L3) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private java.lang.Object srcIpAddress_ = ""; /** @@ -46687,6 +44914,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } srcIpAddress_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -46697,6 +44925,7 @@ public final class ContextOuterClass { */ public Builder clearSrcIpAddress() { srcIpAddress_ = getDefaultInstance().getSrcIpAddress(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -46712,6 +44941,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); srcIpAddress_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -46759,6 +44989,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } dstIpAddress_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -46769,6 +45000,7 @@ public final class ContextOuterClass { */ public Builder clearDstIpAddress() { dstIpAddress_ = getDefaultInstance().getDstIpAddress(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -46784,6 +45016,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); dstIpAddress_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -46806,6 +45039,7 @@ public final class ContextOuterClass { */ public Builder setDscp(int value) { dscp_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -46815,6 +45049,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearDscp() { + bitField0_ = (bitField0_ & ~0x00000004); dscp_ = 0; onChanged(); return this; @@ -46838,6 +45073,7 @@ public final class ContextOuterClass { */ public Builder setProtocol(int value) { protocol_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -46847,6 +45083,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearProtocol() { + bitField0_ = (bitField0_ & ~0x00000008); protocol_ = 0; onChanged(); return this; @@ -46870,6 +45107,7 @@ public final class ContextOuterClass { */ public Builder setTtl(int value) { ttl_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -46879,6 +45117,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearTtl() { + bitField0_ = (bitField0_ & ~0x00000010); ttl_ = 0; onChanged(); return this; @@ -46911,7 +45150,17 @@ public final class ContextOuterClass { @java.lang.Override public ConnectionSettings_L3 parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ConnectionSettings_L3(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -46980,64 +45229,6 @@ public final class ContextOuterClass { return new ConnectionSettings_L4(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ConnectionSettings_L4(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 8: - { - srcPort_ = input.readUInt32(); - break; - } - case 16: - { - dstPort_ = input.readUInt32(); - break; - } - case 24: - { - tcpFlags_ = input.readUInt32(); - break; - } - case 32: - { - ttl_ = input.readUInt32(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_ConnectionSettings_L4_descriptor; } @@ -47049,7 +45240,7 @@ public final class ContextOuterClass { public static final int SRC_PORT_FIELD_NUMBER = 1; - private int srcPort_; + private int srcPort_ = 0; /** * <code>uint32 src_port = 1;</code> @@ -47062,7 +45253,7 @@ public final class ContextOuterClass { public static final int DST_PORT_FIELD_NUMBER = 2; - private int dstPort_; + private int dstPort_ = 0; /** * <code>uint32 dst_port = 2;</code> @@ -47075,7 +45266,7 @@ public final class ContextOuterClass { public static final int TCP_FLAGS_FIELD_NUMBER = 3; - private int tcpFlags_; + private int tcpFlags_ = 0; /** * <code>uint32 tcp_flags = 3;</code> @@ -47088,7 +45279,7 @@ public final class ContextOuterClass { public static final int TTL_FIELD_NUMBER = 4; - private int ttl_; + private int ttl_ = 0; /** * <code>uint32 ttl = 4;</code> @@ -47126,7 +45317,7 @@ public final class ContextOuterClass { if (ttl_ != 0) { output.writeUInt32(4, ttl_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -47147,7 +45338,7 @@ public final class ContextOuterClass { if (ttl_ != 0) { size += com.google.protobuf.CodedOutputStream.computeUInt32Size(4, ttl_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -47169,7 +45360,7 @@ public final class ContextOuterClass { return false; if (getTtl() != other.getTtl()) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -47189,7 +45380,7 @@ public final class ContextOuterClass { hash = (53 * hash) + getTcpFlags(); hash = (37 * hash) + TTL_FIELD_NUMBER; hash = (53 * hash) + getTtl(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -47283,22 +45474,16 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.ConnectionSettings_L4.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; srcPort_ = 0; dstPort_ = 0; tcpFlags_ = 0; @@ -47328,42 +45513,27 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.ConnectionSettings_L4 buildPartial() { context.ContextOuterClass.ConnectionSettings_L4 result = new context.ContextOuterClass.ConnectionSettings_L4(this); - result.srcPort_ = srcPort_; - result.dstPort_ = dstPort_; - result.tcpFlags_ = tcpFlags_; - result.ttl_ = ttl_; + if (bitField0_ != 0) { + buildPartial0(result); + } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.ConnectionSettings_L4 result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.srcPort_ = srcPort_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.dstPort_ = dstPort_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.tcpFlags_ = tcpFlags_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.ttl_ = ttl_; + } } @java.lang.Override @@ -47391,7 +45561,7 @@ public final class ContextOuterClass { if (other.getTtl() != 0) { setTtl(other.getTtl()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -47403,20 +45573,68 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.ConnectionSettings_L4 parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 8: + { + srcPort_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } + // case 8 + case 16: + { + dstPort_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } + // case 16 + case 24: + { + tcpFlags_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } + // case 24 + case 32: + { + ttl_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } + // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConnectionSettings_L4) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private int srcPort_; /** @@ -47435,6 +45653,7 @@ public final class ContextOuterClass { */ public Builder setSrcPort(int value) { srcPort_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -47444,6 +45663,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearSrcPort() { + bitField0_ = (bitField0_ & ~0x00000001); srcPort_ = 0; onChanged(); return this; @@ -47467,6 +45687,7 @@ public final class ContextOuterClass { */ public Builder setDstPort(int value) { dstPort_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -47476,6 +45697,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearDstPort() { + bitField0_ = (bitField0_ & ~0x00000002); dstPort_ = 0; onChanged(); return this; @@ -47499,6 +45721,7 @@ public final class ContextOuterClass { */ public Builder setTcpFlags(int value) { tcpFlags_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -47508,6 +45731,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearTcpFlags() { + bitField0_ = (bitField0_ & ~0x00000004); tcpFlags_ = 0; onChanged(); return this; @@ -47531,6 +45755,7 @@ public final class ContextOuterClass { */ public Builder setTtl(int value) { ttl_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -47540,6 +45765,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearTtl() { + bitField0_ = (bitField0_ & ~0x00000008); ttl_ = 0; onChanged(); return this; @@ -47572,7 +45798,17 @@ public final class ContextOuterClass { @java.lang.Override public ConnectionSettings_L4 parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ConnectionSettings_L4(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -47685,96 +45921,6 @@ public final class ContextOuterClass { return new ConnectionSettings(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ConnectionSettings(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.ConnectionSettings_L0.Builder subBuilder = null; - if (l0_ != null) { - subBuilder = l0_.toBuilder(); - } - l0_ = input.readMessage(context.ContextOuterClass.ConnectionSettings_L0.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(l0_); - l0_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - context.ContextOuterClass.ConnectionSettings_L2.Builder subBuilder = null; - if (l2_ != null) { - subBuilder = l2_.toBuilder(); - } - l2_ = input.readMessage(context.ContextOuterClass.ConnectionSettings_L2.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(l2_); - l2_ = subBuilder.buildPartial(); - } - break; - } - case 26: - { - context.ContextOuterClass.ConnectionSettings_L3.Builder subBuilder = null; - if (l3_ != null) { - subBuilder = l3_.toBuilder(); - } - l3_ = input.readMessage(context.ContextOuterClass.ConnectionSettings_L3.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(l3_); - l3_ = subBuilder.buildPartial(); - } - break; - } - case 34: - { - context.ContextOuterClass.ConnectionSettings_L4.Builder subBuilder = null; - if (l4_ != null) { - subBuilder = l4_.toBuilder(); - } - l4_ = input.readMessage(context.ContextOuterClass.ConnectionSettings_L4.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(l4_); - l4_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_ConnectionSettings_descriptor; } @@ -47811,7 +45957,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.ConnectionSettings_L0OrBuilder getL0OrBuilder() { - return getL0(); + return l0_ == null ? context.ContextOuterClass.ConnectionSettings_L0.getDefaultInstance() : l0_; } public static final int L2_FIELD_NUMBER = 2; @@ -47841,7 +45987,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.ConnectionSettings_L2OrBuilder getL2OrBuilder() { - return getL2(); + return l2_ == null ? context.ContextOuterClass.ConnectionSettings_L2.getDefaultInstance() : l2_; } public static final int L3_FIELD_NUMBER = 3; @@ -47871,7 +46017,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.ConnectionSettings_L3OrBuilder getL3OrBuilder() { - return getL3(); + return l3_ == null ? context.ContextOuterClass.ConnectionSettings_L3.getDefaultInstance() : l3_; } public static final int L4_FIELD_NUMBER = 4; @@ -47901,7 +46047,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.ConnectionSettings_L4OrBuilder getL4OrBuilder() { - return getL4(); + return l4_ == null ? context.ContextOuterClass.ConnectionSettings_L4.getDefaultInstance() : l4_; } private byte memoizedIsInitialized = -1; @@ -47931,7 +46077,7 @@ public final class ContextOuterClass { if (l4_ != null) { output.writeMessage(4, getL4()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -47952,7 +46098,7 @@ public final class ContextOuterClass { if (l4_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getL4()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -47990,7 +46136,7 @@ public final class ContextOuterClass { if (!getL4().equals(other.getL4())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -48018,7 +46164,7 @@ public final class ContextOuterClass { hash = (37 * hash) + L4_FIELD_NUMBER; hash = (53 * hash) + getL4().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -48112,44 +46258,34 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.ConnectionSettings.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (l0Builder_ == null) { - l0_ = null; - } else { - l0_ = null; + bitField0_ = 0; + l0_ = null; + if (l0Builder_ != null) { + l0Builder_.dispose(); l0Builder_ = null; } - if (l2Builder_ == null) { - l2_ = null; - } else { - l2_ = null; + l2_ = null; + if (l2Builder_ != null) { + l2Builder_.dispose(); l2Builder_ = null; } - if (l3Builder_ == null) { - l3_ = null; - } else { - l3_ = null; + l3_ = null; + if (l3Builder_ != null) { + l3Builder_.dispose(); l3Builder_ = null; } - if (l4Builder_ == null) { - l4_ = null; - } else { - l4_ = null; + l4_ = null; + if (l4Builder_ != null) { + l4Builder_.dispose(); l4Builder_ = null; } return this; @@ -48177,58 +46313,27 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.ConnectionSettings buildPartial() { context.ContextOuterClass.ConnectionSettings result = new context.ContextOuterClass.ConnectionSettings(this); - if (l0Builder_ == null) { - result.l0_ = l0_; - } else { - result.l0_ = l0Builder_.build(); - } - if (l2Builder_ == null) { - result.l2_ = l2_; - } else { - result.l2_ = l2Builder_.build(); - } - if (l3Builder_ == null) { - result.l3_ = l3_; - } else { - result.l3_ = l3Builder_.build(); - } - if (l4Builder_ == null) { - result.l4_ = l4_; - } else { - result.l4_ = l4Builder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.ConnectionSettings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.l0_ = l0Builder_ == null ? l0_ : l0Builder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.l2_ = l2Builder_ == null ? l2_ : l2Builder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.l3_ = l3Builder_ == null ? l3_ : l3Builder_.build(); + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.l4_ = l4Builder_ == null ? l4_ : l4Builder_.build(); + } } @java.lang.Override @@ -48256,7 +46361,7 @@ public final class ContextOuterClass { if (other.hasL4()) { mergeL4(other.getL4()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -48268,20 +46373,68 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.ConnectionSettings parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getL0FieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + input.readMessage(getL2FieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 26: + { + input.readMessage(getL3FieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } + // case 26 + case 34: + { + input.readMessage(getL4FieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } + // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConnectionSettings) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.ConnectionSettings_L0 l0_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.ConnectionSettings_L0, context.ContextOuterClass.ConnectionSettings_L0.Builder, context.ContextOuterClass.ConnectionSettings_L0OrBuilder> l0Builder_; @@ -48291,7 +46444,7 @@ public final class ContextOuterClass { * @return Whether the l0 field is set. */ public boolean hasL0() { - return l0Builder_ != null || l0_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -48315,10 +46468,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } l0_ = value; - onChanged(); } else { l0Builder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -48328,10 +46482,11 @@ public final class ContextOuterClass { public Builder setL0(context.ContextOuterClass.ConnectionSettings_L0.Builder builderForValue) { if (l0Builder_ == null) { l0_ = builderForValue.build(); - onChanged(); } else { l0Builder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -48340,15 +46495,16 @@ public final class ContextOuterClass { */ public Builder mergeL0(context.ContextOuterClass.ConnectionSettings_L0 value) { if (l0Builder_ == null) { - if (l0_ != null) { - l0_ = context.ContextOuterClass.ConnectionSettings_L0.newBuilder(l0_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && l0_ != null && l0_ != context.ContextOuterClass.ConnectionSettings_L0.getDefaultInstance()) { + getL0Builder().mergeFrom(value); } else { l0_ = value; } - onChanged(); } else { l0Builder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -48356,13 +46512,13 @@ public final class ContextOuterClass { * <code>.context.ConnectionSettings_L0 l0 = 1;</code> */ public Builder clearL0() { - if (l0Builder_ == null) { - l0_ = null; - onChanged(); - } else { - l0_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + l0_ = null; + if (l0Builder_ != null) { + l0Builder_.dispose(); l0Builder_ = null; } + onChanged(); return this; } @@ -48370,6 +46526,7 @@ public final class ContextOuterClass { * <code>.context.ConnectionSettings_L0 l0 = 1;</code> */ public context.ContextOuterClass.ConnectionSettings_L0.Builder getL0Builder() { + bitField0_ |= 0x00000001; onChanged(); return getL0FieldBuilder().getBuilder(); } @@ -48405,7 +46562,7 @@ public final class ContextOuterClass { * @return Whether the l2 field is set. */ public boolean hasL2() { - return l2Builder_ != null || l2_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** @@ -48429,10 +46586,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } l2_ = value; - onChanged(); } else { l2Builder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -48442,10 +46600,11 @@ public final class ContextOuterClass { public Builder setL2(context.ContextOuterClass.ConnectionSettings_L2.Builder builderForValue) { if (l2Builder_ == null) { l2_ = builderForValue.build(); - onChanged(); } else { l2Builder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -48454,15 +46613,16 @@ public final class ContextOuterClass { */ public Builder mergeL2(context.ContextOuterClass.ConnectionSettings_L2 value) { if (l2Builder_ == null) { - if (l2_ != null) { - l2_ = context.ContextOuterClass.ConnectionSettings_L2.newBuilder(l2_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000002) != 0) && l2_ != null && l2_ != context.ContextOuterClass.ConnectionSettings_L2.getDefaultInstance()) { + getL2Builder().mergeFrom(value); } else { l2_ = value; } - onChanged(); } else { l2Builder_.mergeFrom(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -48470,13 +46630,13 @@ public final class ContextOuterClass { * <code>.context.ConnectionSettings_L2 l2 = 2;</code> */ public Builder clearL2() { - if (l2Builder_ == null) { - l2_ = null; - onChanged(); - } else { - l2_ = null; + bitField0_ = (bitField0_ & ~0x00000002); + l2_ = null; + if (l2Builder_ != null) { + l2Builder_.dispose(); l2Builder_ = null; } + onChanged(); return this; } @@ -48484,6 +46644,7 @@ public final class ContextOuterClass { * <code>.context.ConnectionSettings_L2 l2 = 2;</code> */ public context.ContextOuterClass.ConnectionSettings_L2.Builder getL2Builder() { + bitField0_ |= 0x00000002; onChanged(); return getL2FieldBuilder().getBuilder(); } @@ -48519,7 +46680,7 @@ public final class ContextOuterClass { * @return Whether the l3 field is set. */ public boolean hasL3() { - return l3Builder_ != null || l3_ != null; + return ((bitField0_ & 0x00000004) != 0); } /** @@ -48543,10 +46704,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } l3_ = value; - onChanged(); } else { l3Builder_.setMessage(value); } + bitField0_ |= 0x00000004; + onChanged(); return this; } @@ -48556,10 +46718,11 @@ public final class ContextOuterClass { public Builder setL3(context.ContextOuterClass.ConnectionSettings_L3.Builder builderForValue) { if (l3Builder_ == null) { l3_ = builderForValue.build(); - onChanged(); } else { l3Builder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000004; + onChanged(); return this; } @@ -48568,15 +46731,16 @@ public final class ContextOuterClass { */ public Builder mergeL3(context.ContextOuterClass.ConnectionSettings_L3 value) { if (l3Builder_ == null) { - if (l3_ != null) { - l3_ = context.ContextOuterClass.ConnectionSettings_L3.newBuilder(l3_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000004) != 0) && l3_ != null && l3_ != context.ContextOuterClass.ConnectionSettings_L3.getDefaultInstance()) { + getL3Builder().mergeFrom(value); } else { l3_ = value; } - onChanged(); } else { l3Builder_.mergeFrom(value); } + bitField0_ |= 0x00000004; + onChanged(); return this; } @@ -48584,13 +46748,13 @@ public final class ContextOuterClass { * <code>.context.ConnectionSettings_L3 l3 = 3;</code> */ public Builder clearL3() { - if (l3Builder_ == null) { - l3_ = null; - onChanged(); - } else { - l3_ = null; + bitField0_ = (bitField0_ & ~0x00000004); + l3_ = null; + if (l3Builder_ != null) { + l3Builder_.dispose(); l3Builder_ = null; } + onChanged(); return this; } @@ -48598,6 +46762,7 @@ public final class ContextOuterClass { * <code>.context.ConnectionSettings_L3 l3 = 3;</code> */ public context.ContextOuterClass.ConnectionSettings_L3.Builder getL3Builder() { + bitField0_ |= 0x00000004; onChanged(); return getL3FieldBuilder().getBuilder(); } @@ -48633,7 +46798,7 @@ public final class ContextOuterClass { * @return Whether the l4 field is set. */ public boolean hasL4() { - return l4Builder_ != null || l4_ != null; + return ((bitField0_ & 0x00000008) != 0); } /** @@ -48657,10 +46822,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } l4_ = value; - onChanged(); } else { l4Builder_.setMessage(value); } + bitField0_ |= 0x00000008; + onChanged(); return this; } @@ -48670,10 +46836,11 @@ public final class ContextOuterClass { public Builder setL4(context.ContextOuterClass.ConnectionSettings_L4.Builder builderForValue) { if (l4Builder_ == null) { l4_ = builderForValue.build(); - onChanged(); } else { l4Builder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000008; + onChanged(); return this; } @@ -48682,15 +46849,16 @@ public final class ContextOuterClass { */ public Builder mergeL4(context.ContextOuterClass.ConnectionSettings_L4 value) { if (l4Builder_ == null) { - if (l4_ != null) { - l4_ = context.ContextOuterClass.ConnectionSettings_L4.newBuilder(l4_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000008) != 0) && l4_ != null && l4_ != context.ContextOuterClass.ConnectionSettings_L4.getDefaultInstance()) { + getL4Builder().mergeFrom(value); } else { l4_ = value; } - onChanged(); } else { l4Builder_.mergeFrom(value); } + bitField0_ |= 0x00000008; + onChanged(); return this; } @@ -48698,13 +46866,13 @@ public final class ContextOuterClass { * <code>.context.ConnectionSettings_L4 l4 = 4;</code> */ public Builder clearL4() { - if (l4Builder_ == null) { - l4_ = null; - onChanged(); - } else { - l4_ = null; + bitField0_ = (bitField0_ & ~0x00000008); + l4_ = null; + if (l4Builder_ != null) { + l4Builder_.dispose(); l4Builder_ = null; } + onChanged(); return this; } @@ -48712,6 +46880,7 @@ public final class ContextOuterClass { * <code>.context.ConnectionSettings_L4 l4 = 4;</code> */ public context.ContextOuterClass.ConnectionSettings_L4.Builder getL4Builder() { + bitField0_ |= 0x00000008; onChanged(); return getL4FieldBuilder().getBuilder(); } @@ -48765,7 +46934,17 @@ public final class ContextOuterClass { @java.lang.Override public ConnectionSettings parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ConnectionSettings(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -48913,108 +47092,6 @@ public final class ContextOuterClass { return new Connection(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Connection(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.ConnectionId.Builder subBuilder = null; - if (connectionId_ != null) { - subBuilder = connectionId_.toBuilder(); - } - connectionId_ = input.readMessage(context.ContextOuterClass.ConnectionId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(connectionId_); - connectionId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - context.ContextOuterClass.ServiceId.Builder subBuilder = null; - if (serviceId_ != null) { - subBuilder = serviceId_.toBuilder(); - } - serviceId_ = input.readMessage(context.ContextOuterClass.ServiceId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(serviceId_); - serviceId_ = subBuilder.buildPartial(); - } - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - pathHopsEndpointIds_ = new java.util.ArrayList<context.ContextOuterClass.EndPointId>(); - mutable_bitField0_ |= 0x00000001; - } - pathHopsEndpointIds_.add(input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry)); - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - subServiceIds_ = new java.util.ArrayList<context.ContextOuterClass.ServiceId>(); - mutable_bitField0_ |= 0x00000002; - } - subServiceIds_.add(input.readMessage(context.ContextOuterClass.ServiceId.parser(), extensionRegistry)); - break; - } - case 42: - { - context.ContextOuterClass.ConnectionSettings.Builder subBuilder = null; - if (settings_ != null) { - subBuilder = settings_.toBuilder(); - } - settings_ = input.readMessage(context.ContextOuterClass.ConnectionSettings.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(settings_); - settings_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - pathHopsEndpointIds_ = java.util.Collections.unmodifiableList(pathHopsEndpointIds_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - subServiceIds_ = java.util.Collections.unmodifiableList(subServiceIds_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_Connection_descriptor; } @@ -49051,7 +47128,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder() { - return getConnectionId(); + return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; } public static final int SERVICE_ID_FIELD_NUMBER = 2; @@ -49081,11 +47158,12 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { - return getServiceId(); + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; } public static final int PATH_HOPS_ENDPOINT_IDS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.EndPointId> pathHopsEndpointIds_; /** @@ -49130,6 +47208,7 @@ public final class ContextOuterClass { public static final int SUB_SERVICE_IDS_FIELD_NUMBER = 4; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.ServiceId> subServiceIds_; /** @@ -49199,7 +47278,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.ConnectionSettingsOrBuilder getSettingsOrBuilder() { - return getSettings(); + return settings_ == null ? context.ContextOuterClass.ConnectionSettings.getDefaultInstance() : settings_; } private byte memoizedIsInitialized = -1; @@ -49232,7 +47311,7 @@ public final class ContextOuterClass { if (settings_ != null) { output.writeMessage(5, getSettings()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -49256,7 +47335,7 @@ public final class ContextOuterClass { if (settings_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getSettings()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -49292,7 +47371,7 @@ public final class ContextOuterClass { if (!getSettings().equals(other.getSettings())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -49324,7 +47403,7 @@ public final class ContextOuterClass { hash = (37 * hash) + SETTINGS_FIELD_NUMBER; hash = (53 * hash) + getSettings().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -49418,52 +47497,43 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.Connection.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getPathHopsEndpointIdsFieldBuilder(); - getSubServiceIdsFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); - if (connectionIdBuilder_ == null) { - connectionId_ = null; - } else { - connectionId_ = null; + bitField0_ = 0; + connectionId_ = null; + if (connectionIdBuilder_ != null) { + connectionIdBuilder_.dispose(); connectionIdBuilder_ = null; } - if (serviceIdBuilder_ == null) { - serviceId_ = null; - } else { - serviceId_ = null; + serviceId_ = null; + if (serviceIdBuilder_ != null) { + serviceIdBuilder_.dispose(); serviceIdBuilder_ = null; } if (pathHopsEndpointIdsBuilder_ == null) { pathHopsEndpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + pathHopsEndpointIds_ = null; pathHopsEndpointIdsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); if (subServiceIdsBuilder_ == null) { subServiceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + subServiceIds_ = null; subServiceIdsBuilder_.clear(); } - if (settingsBuilder_ == null) { - settings_ = null; - } else { - settings_ = null; + bitField0_ = (bitField0_ & ~0x00000008); + settings_ = null; + if (settingsBuilder_ != null) { + settingsBuilder_.dispose(); settingsBuilder_ = null; } return this; @@ -49491,72 +47561,46 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.Connection buildPartial() { context.ContextOuterClass.Connection result = new context.ContextOuterClass.Connection(this); - int from_bitField0_ = bitField0_; - if (connectionIdBuilder_ == null) { - result.connectionId_ = connectionId_; - } else { - result.connectionId_ = connectionIdBuilder_.build(); - } - if (serviceIdBuilder_ == null) { - result.serviceId_ = serviceId_; - } else { - result.serviceId_ = serviceIdBuilder_.build(); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.Connection result) { if (pathHopsEndpointIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { pathHopsEndpointIds_ = java.util.Collections.unmodifiableList(pathHopsEndpointIds_); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); } result.pathHopsEndpointIds_ = pathHopsEndpointIds_; } else { result.pathHopsEndpointIds_ = pathHopsEndpointIdsBuilder_.build(); } if (subServiceIdsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000008) != 0)) { subServiceIds_ = java.util.Collections.unmodifiableList(subServiceIds_); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); } result.subServiceIds_ = subServiceIds_; } else { result.subServiceIds_ = subServiceIdsBuilder_.build(); } - if (settingsBuilder_ == null) { - result.settings_ = settings_; - } else { - result.settings_ = settingsBuilder_.build(); - } - onBuilt(); - return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.Connection result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.connectionId_ = connectionIdBuilder_ == null ? connectionId_ : connectionIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.serviceId_ = serviceIdBuilder_ == null ? serviceId_ : serviceIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.settings_ = settingsBuilder_ == null ? settings_ : settingsBuilder_.build(); + } } @java.lang.Override @@ -49582,7 +47626,7 @@ public final class ContextOuterClass { if (!other.pathHopsEndpointIds_.isEmpty()) { if (pathHopsEndpointIds_.isEmpty()) { pathHopsEndpointIds_ = other.pathHopsEndpointIds_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); } else { ensurePathHopsEndpointIdsIsMutable(); pathHopsEndpointIds_.addAll(other.pathHopsEndpointIds_); @@ -49595,7 +47639,7 @@ public final class ContextOuterClass { pathHopsEndpointIdsBuilder_.dispose(); pathHopsEndpointIdsBuilder_ = null; pathHopsEndpointIds_ = other.pathHopsEndpointIds_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); pathHopsEndpointIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getPathHopsEndpointIdsFieldBuilder() : null; } else { pathHopsEndpointIdsBuilder_.addAllMessages(other.pathHopsEndpointIds_); @@ -49606,7 +47650,7 @@ public final class ContextOuterClass { if (!other.subServiceIds_.isEmpty()) { if (subServiceIds_.isEmpty()) { subServiceIds_ = other.subServiceIds_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); } else { ensureSubServiceIdsIsMutable(); subServiceIds_.addAll(other.subServiceIds_); @@ -49619,7 +47663,7 @@ public final class ContextOuterClass { subServiceIdsBuilder_.dispose(); subServiceIdsBuilder_ = null; subServiceIds_ = other.subServiceIds_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); subServiceIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSubServiceIdsFieldBuilder() : null; } else { subServiceIdsBuilder_.addAllMessages(other.subServiceIds_); @@ -49629,7 +47673,7 @@ public final class ContextOuterClass { if (other.hasSettings()) { mergeSettings(other.getSettings()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -49641,17 +47685,80 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.Connection parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getConnectionIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + input.readMessage(getServiceIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 26: + { + context.ContextOuterClass.EndPointId m = input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry); + if (pathHopsEndpointIdsBuilder_ == null) { + ensurePathHopsEndpointIdsIsMutable(); + pathHopsEndpointIds_.add(m); + } else { + pathHopsEndpointIdsBuilder_.addMessage(m); + } + break; + } + // case 26 + case 34: + { + context.ContextOuterClass.ServiceId m = input.readMessage(context.ContextOuterClass.ServiceId.parser(), extensionRegistry); + if (subServiceIdsBuilder_ == null) { + ensureSubServiceIdsIsMutable(); + subServiceIds_.add(m); + } else { + subServiceIdsBuilder_.addMessage(m); + } + break; + } + // case 34 + case 42: + { + input.readMessage(getSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } + // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Connection) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -49666,7 +47773,7 @@ public final class ContextOuterClass { * @return Whether the connectionId field is set. */ public boolean hasConnectionId() { - return connectionIdBuilder_ != null || connectionId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -49690,10 +47797,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } connectionId_ = value; - onChanged(); } else { connectionIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -49703,10 +47811,11 @@ public final class ContextOuterClass { public Builder setConnectionId(context.ContextOuterClass.ConnectionId.Builder builderForValue) { if (connectionIdBuilder_ == null) { connectionId_ = builderForValue.build(); - onChanged(); } else { connectionIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -49715,15 +47824,16 @@ public final class ContextOuterClass { */ public Builder mergeConnectionId(context.ContextOuterClass.ConnectionId value) { if (connectionIdBuilder_ == null) { - if (connectionId_ != null) { - connectionId_ = context.ContextOuterClass.ConnectionId.newBuilder(connectionId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && connectionId_ != null && connectionId_ != context.ContextOuterClass.ConnectionId.getDefaultInstance()) { + getConnectionIdBuilder().mergeFrom(value); } else { connectionId_ = value; } - onChanged(); } else { connectionIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -49731,13 +47841,13 @@ public final class ContextOuterClass { * <code>.context.ConnectionId connection_id = 1;</code> */ public Builder clearConnectionId() { - if (connectionIdBuilder_ == null) { - connectionId_ = null; - onChanged(); - } else { - connectionId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + connectionId_ = null; + if (connectionIdBuilder_ != null) { + connectionIdBuilder_.dispose(); connectionIdBuilder_ = null; } + onChanged(); return this; } @@ -49745,6 +47855,7 @@ public final class ContextOuterClass { * <code>.context.ConnectionId connection_id = 1;</code> */ public context.ContextOuterClass.ConnectionId.Builder getConnectionIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getConnectionIdFieldBuilder().getBuilder(); } @@ -49780,7 +47891,7 @@ public final class ContextOuterClass { * @return Whether the serviceId field is set. */ public boolean hasServiceId() { - return serviceIdBuilder_ != null || serviceId_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** @@ -49804,10 +47915,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } serviceId_ = value; - onChanged(); } else { serviceIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -49817,10 +47929,11 @@ public final class ContextOuterClass { public Builder setServiceId(context.ContextOuterClass.ServiceId.Builder builderForValue) { if (serviceIdBuilder_ == null) { serviceId_ = builderForValue.build(); - onChanged(); } else { serviceIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -49829,15 +47942,16 @@ public final class ContextOuterClass { */ public Builder mergeServiceId(context.ContextOuterClass.ServiceId value) { if (serviceIdBuilder_ == null) { - if (serviceId_ != null) { - serviceId_ = context.ContextOuterClass.ServiceId.newBuilder(serviceId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000002) != 0) && serviceId_ != null && serviceId_ != context.ContextOuterClass.ServiceId.getDefaultInstance()) { + getServiceIdBuilder().mergeFrom(value); } else { serviceId_ = value; } - onChanged(); } else { serviceIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -49845,13 +47959,13 @@ public final class ContextOuterClass { * <code>.context.ServiceId service_id = 2;</code> */ public Builder clearServiceId() { - if (serviceIdBuilder_ == null) { - serviceId_ = null; - onChanged(); - } else { - serviceId_ = null; + bitField0_ = (bitField0_ & ~0x00000002); + serviceId_ = null; + if (serviceIdBuilder_ != null) { + serviceIdBuilder_.dispose(); serviceIdBuilder_ = null; } + onChanged(); return this; } @@ -49859,6 +47973,7 @@ public final class ContextOuterClass { * <code>.context.ServiceId service_id = 2;</code> */ public context.ContextOuterClass.ServiceId.Builder getServiceIdBuilder() { + bitField0_ |= 0x00000002; onChanged(); return getServiceIdFieldBuilder().getBuilder(); } @@ -49888,9 +48003,9 @@ public final class ContextOuterClass { private java.util.List<context.ContextOuterClass.EndPointId> pathHopsEndpointIds_ = java.util.Collections.emptyList(); private void ensurePathHopsEndpointIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!((bitField0_ & 0x00000004) != 0)) { pathHopsEndpointIds_ = new java.util.ArrayList<context.ContextOuterClass.EndPointId>(pathHopsEndpointIds_); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000004; } } @@ -50042,7 +48157,7 @@ public final class ContextOuterClass { public Builder clearPathHopsEndpointIds() { if (pathHopsEndpointIdsBuilder_ == null) { pathHopsEndpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { pathHopsEndpointIdsBuilder_.clear(); @@ -50116,7 +48231,7 @@ public final class ContextOuterClass { private com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> getPathHopsEndpointIdsFieldBuilder() { if (pathHopsEndpointIdsBuilder_ == null) { - pathHopsEndpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder>(pathHopsEndpointIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + pathHopsEndpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder>(pathHopsEndpointIds_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); pathHopsEndpointIds_ = null; } return pathHopsEndpointIdsBuilder_; @@ -50125,9 +48240,9 @@ public final class ContextOuterClass { private java.util.List<context.ContextOuterClass.ServiceId> subServiceIds_ = java.util.Collections.emptyList(); private void ensureSubServiceIdsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { + if (!((bitField0_ & 0x00000008) != 0)) { subServiceIds_ = new java.util.ArrayList<context.ContextOuterClass.ServiceId>(subServiceIds_); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000008; } } @@ -50279,7 +48394,7 @@ public final class ContextOuterClass { public Builder clearSubServiceIds() { if (subServiceIdsBuilder_ == null) { subServiceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { subServiceIdsBuilder_.clear(); @@ -50353,7 +48468,7 @@ public final class ContextOuterClass { private com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder> getSubServiceIdsFieldBuilder() { if (subServiceIdsBuilder_ == null) { - subServiceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder>(subServiceIds_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + subServiceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.ServiceId, context.ContextOuterClass.ServiceId.Builder, context.ContextOuterClass.ServiceIdOrBuilder>(subServiceIds_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); subServiceIds_ = null; } return subServiceIdsBuilder_; @@ -50368,7 +48483,7 @@ public final class ContextOuterClass { * @return Whether the settings field is set. */ public boolean hasSettings() { - return settingsBuilder_ != null || settings_ != null; + return ((bitField0_ & 0x00000010) != 0); } /** @@ -50392,10 +48507,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } settings_ = value; - onChanged(); } else { settingsBuilder_.setMessage(value); } + bitField0_ |= 0x00000010; + onChanged(); return this; } @@ -50405,10 +48521,11 @@ public final class ContextOuterClass { public Builder setSettings(context.ContextOuterClass.ConnectionSettings.Builder builderForValue) { if (settingsBuilder_ == null) { settings_ = builderForValue.build(); - onChanged(); } else { settingsBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000010; + onChanged(); return this; } @@ -50417,15 +48534,16 @@ public final class ContextOuterClass { */ public Builder mergeSettings(context.ContextOuterClass.ConnectionSettings value) { if (settingsBuilder_ == null) { - if (settings_ != null) { - settings_ = context.ContextOuterClass.ConnectionSettings.newBuilder(settings_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000010) != 0) && settings_ != null && settings_ != context.ContextOuterClass.ConnectionSettings.getDefaultInstance()) { + getSettingsBuilder().mergeFrom(value); } else { settings_ = value; } - onChanged(); } else { settingsBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000010; + onChanged(); return this; } @@ -50433,13 +48551,13 @@ public final class ContextOuterClass { * <code>.context.ConnectionSettings settings = 5;</code> */ public Builder clearSettings() { - if (settingsBuilder_ == null) { - settings_ = null; - onChanged(); - } else { - settings_ = null; + bitField0_ = (bitField0_ & ~0x00000010); + settings_ = null; + if (settingsBuilder_ != null) { + settingsBuilder_.dispose(); settingsBuilder_ = null; } + onChanged(); return this; } @@ -50447,6 +48565,7 @@ public final class ContextOuterClass { * <code>.context.ConnectionSettings settings = 5;</code> */ public context.ContextOuterClass.ConnectionSettings.Builder getSettingsBuilder() { + bitField0_ |= 0x00000010; onChanged(); return getSettingsFieldBuilder().getBuilder(); } @@ -50500,7 +48619,17 @@ public final class ContextOuterClass { @java.lang.Override public Connection parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Connection(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -50571,57 +48700,6 @@ public final class ContextOuterClass { return new ConnectionIdList(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ConnectionIdList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - connectionIds_ = new java.util.ArrayList<context.ContextOuterClass.ConnectionId>(); - mutable_bitField0_ |= 0x00000001; - } - connectionIds_.add(input.readMessage(context.ContextOuterClass.ConnectionId.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - connectionIds_ = java.util.Collections.unmodifiableList(connectionIds_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_ConnectionIdList_descriptor; } @@ -50633,6 +48711,7 @@ public final class ContextOuterClass { public static final int CONNECTION_IDS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.ConnectionId> connectionIds_; /** @@ -50693,7 +48772,7 @@ public final class ContextOuterClass { for (int i = 0; i < connectionIds_.size(); i++) { output.writeMessage(1, connectionIds_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -50705,7 +48784,7 @@ public final class ContextOuterClass { for (int i = 0; i < connectionIds_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, connectionIds_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -50721,7 +48800,7 @@ public final class ContextOuterClass { context.ContextOuterClass.ConnectionIdList other = (context.ContextOuterClass.ConnectionIdList) obj; if (!getConnectionIdsList().equals(other.getConnectionIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -50737,7 +48816,7 @@ public final class ContextOuterClass { hash = (37 * hash) + CONNECTION_IDS_FIELD_NUMBER; hash = (53 * hash) + getConnectionIdsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -50831,29 +48910,23 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.ConnectionIdList.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getConnectionIdsFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (connectionIdsBuilder_ == null) { connectionIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + connectionIds_ = null; connectionIdsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -50879,7 +48952,15 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.ConnectionIdList buildPartial() { context.ContextOuterClass.ConnectionIdList result = new context.ContextOuterClass.ConnectionIdList(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.ConnectionIdList result) { if (connectionIdsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { connectionIds_ = java.util.Collections.unmodifiableList(connectionIds_); @@ -50889,38 +48970,10 @@ public final class ContextOuterClass { } else { result.connectionIds_ = connectionIdsBuilder_.build(); } - onBuilt(); - return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.ConnectionIdList result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -50960,7 +49013,7 @@ public final class ContextOuterClass { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -50972,17 +49025,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.ConnectionIdList parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + context.ContextOuterClass.ConnectionId m = input.readMessage(context.ContextOuterClass.ConnectionId.parser(), extensionRegistry); + if (connectionIdsBuilder_ == null) { + ensureConnectionIdsIsMutable(); + connectionIds_.add(m); + } else { + connectionIdsBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConnectionIdList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -51252,7 +49335,17 @@ public final class ContextOuterClass { @java.lang.Override public ConnectionIdList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ConnectionIdList(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -51323,57 +49416,6 @@ public final class ContextOuterClass { return new ConnectionList(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ConnectionList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - connections_ = new java.util.ArrayList<context.ContextOuterClass.Connection>(); - mutable_bitField0_ |= 0x00000001; - } - connections_.add(input.readMessage(context.ContextOuterClass.Connection.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - connections_ = java.util.Collections.unmodifiableList(connections_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_ConnectionList_descriptor; } @@ -51385,6 +49427,7 @@ public final class ContextOuterClass { public static final int CONNECTIONS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.Connection> connections_; /** @@ -51445,7 +49488,7 @@ public final class ContextOuterClass { for (int i = 0; i < connections_.size(); i++) { output.writeMessage(1, connections_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -51457,7 +49500,7 @@ public final class ContextOuterClass { for (int i = 0; i < connections_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, connections_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -51473,7 +49516,7 @@ public final class ContextOuterClass { context.ContextOuterClass.ConnectionList other = (context.ContextOuterClass.ConnectionList) obj; if (!getConnectionsList().equals(other.getConnectionsList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -51489,7 +49532,7 @@ public final class ContextOuterClass { hash = (37 * hash) + CONNECTIONS_FIELD_NUMBER; hash = (53 * hash) + getConnectionsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -51583,29 +49626,23 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.ConnectionList.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getConnectionsFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (connectionsBuilder_ == null) { connections_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + connections_ = null; connectionsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -51631,7 +49668,15 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.ConnectionList buildPartial() { context.ContextOuterClass.ConnectionList result = new context.ContextOuterClass.ConnectionList(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.ConnectionList result) { if (connectionsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { connections_ = java.util.Collections.unmodifiableList(connections_); @@ -51641,38 +49686,10 @@ public final class ContextOuterClass { } else { result.connections_ = connectionsBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.ConnectionList result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -51712,7 +49729,7 @@ public final class ContextOuterClass { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -51724,17 +49741,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.ConnectionList parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + context.ContextOuterClass.Connection m = input.readMessage(context.ContextOuterClass.Connection.parser(), extensionRegistry); + if (connectionsBuilder_ == null) { + ensureConnectionsIsMutable(); + connections_.add(m); + } else { + connectionsBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConnectionList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -52004,7 +50051,17 @@ public final class ContextOuterClass { @java.lang.Override public ConnectionList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ConnectionList(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -52083,70 +50140,6 @@ public final class ContextOuterClass { return new ConnectionEvent(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ConnectionEvent(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.Event.Builder subBuilder = null; - if (event_ != null) { - subBuilder = event_.toBuilder(); - } - event_ = input.readMessage(context.ContextOuterClass.Event.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(event_); - event_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - context.ContextOuterClass.ConnectionId.Builder subBuilder = null; - if (connectionId_ != null) { - subBuilder = connectionId_.toBuilder(); - } - connectionId_ = input.readMessage(context.ContextOuterClass.ConnectionId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(connectionId_); - connectionId_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_ConnectionEvent_descriptor; } @@ -52183,7 +50176,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.EventOrBuilder getEventOrBuilder() { - return getEvent(); + return event_ == null ? context.ContextOuterClass.Event.getDefaultInstance() : event_; } public static final int CONNECTION_ID_FIELD_NUMBER = 2; @@ -52213,7 +50206,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder() { - return getConnectionId(); + return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; } private byte memoizedIsInitialized = -1; @@ -52237,7 +50230,7 @@ public final class ContextOuterClass { if (connectionId_ != null) { output.writeMessage(2, getConnectionId()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -52252,7 +50245,7 @@ public final class ContextOuterClass { if (connectionId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getConnectionId()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -52278,7 +50271,7 @@ public final class ContextOuterClass { if (!getConnectionId().equals(other.getConnectionId())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -52298,7 +50291,7 @@ public final class ContextOuterClass { hash = (37 * hash) + CONNECTION_ID_FIELD_NUMBER; hash = (53 * hash) + getConnectionId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -52392,32 +50385,24 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.ConnectionEvent.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (eventBuilder_ == null) { - event_ = null; - } else { - event_ = null; + bitField0_ = 0; + event_ = null; + if (eventBuilder_ != null) { + eventBuilder_.dispose(); eventBuilder_ = null; } - if (connectionIdBuilder_ == null) { - connectionId_ = null; - } else { - connectionId_ = null; + connectionId_ = null; + if (connectionIdBuilder_ != null) { + connectionIdBuilder_.dispose(); connectionIdBuilder_ = null; } return this; @@ -52445,48 +50430,21 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.ConnectionEvent buildPartial() { context.ContextOuterClass.ConnectionEvent result = new context.ContextOuterClass.ConnectionEvent(this); - if (eventBuilder_ == null) { - result.event_ = event_; - } else { - result.event_ = eventBuilder_.build(); - } - if (connectionIdBuilder_ == null) { - result.connectionId_ = connectionId_; - } else { - result.connectionId_ = connectionIdBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.ConnectionEvent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.event_ = eventBuilder_ == null ? event_ : eventBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.connectionId_ = connectionIdBuilder_ == null ? connectionId_ : connectionIdBuilder_.build(); + } } @java.lang.Override @@ -52508,7 +50466,7 @@ public final class ContextOuterClass { if (other.hasConnectionId()) { mergeConnectionId(other.getConnectionId()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -52520,20 +50478,54 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.ConnectionEvent parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getEventFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + input.readMessage(getConnectionIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } + // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConnectionEvent) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.Event event_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.Event, context.ContextOuterClass.Event.Builder, context.ContextOuterClass.EventOrBuilder> eventBuilder_; @@ -52543,7 +50535,7 @@ public final class ContextOuterClass { * @return Whether the event field is set. */ public boolean hasEvent() { - return eventBuilder_ != null || event_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -52567,10 +50559,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } event_ = value; - onChanged(); } else { eventBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -52580,10 +50573,11 @@ public final class ContextOuterClass { public Builder setEvent(context.ContextOuterClass.Event.Builder builderForValue) { if (eventBuilder_ == null) { event_ = builderForValue.build(); - onChanged(); } else { eventBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -52592,15 +50586,16 @@ public final class ContextOuterClass { */ public Builder mergeEvent(context.ContextOuterClass.Event value) { if (eventBuilder_ == null) { - if (event_ != null) { - event_ = context.ContextOuterClass.Event.newBuilder(event_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && event_ != null && event_ != context.ContextOuterClass.Event.getDefaultInstance()) { + getEventBuilder().mergeFrom(value); } else { event_ = value; } - onChanged(); } else { eventBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -52608,13 +50603,13 @@ public final class ContextOuterClass { * <code>.context.Event event = 1;</code> */ public Builder clearEvent() { - if (eventBuilder_ == null) { - event_ = null; - onChanged(); - } else { - event_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + event_ = null; + if (eventBuilder_ != null) { + eventBuilder_.dispose(); eventBuilder_ = null; } + onChanged(); return this; } @@ -52622,6 +50617,7 @@ public final class ContextOuterClass { * <code>.context.Event event = 1;</code> */ public context.ContextOuterClass.Event.Builder getEventBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getEventFieldBuilder().getBuilder(); } @@ -52657,7 +50653,7 @@ public final class ContextOuterClass { * @return Whether the connectionId field is set. */ public boolean hasConnectionId() { - return connectionIdBuilder_ != null || connectionId_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** @@ -52681,10 +50677,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } connectionId_ = value; - onChanged(); } else { connectionIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -52694,10 +50691,11 @@ public final class ContextOuterClass { public Builder setConnectionId(context.ContextOuterClass.ConnectionId.Builder builderForValue) { if (connectionIdBuilder_ == null) { connectionId_ = builderForValue.build(); - onChanged(); } else { connectionIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -52706,15 +50704,16 @@ public final class ContextOuterClass { */ public Builder mergeConnectionId(context.ContextOuterClass.ConnectionId value) { if (connectionIdBuilder_ == null) { - if (connectionId_ != null) { - connectionId_ = context.ContextOuterClass.ConnectionId.newBuilder(connectionId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000002) != 0) && connectionId_ != null && connectionId_ != context.ContextOuterClass.ConnectionId.getDefaultInstance()) { + getConnectionIdBuilder().mergeFrom(value); } else { connectionId_ = value; } - onChanged(); } else { connectionIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -52722,13 +50721,13 @@ public final class ContextOuterClass { * <code>.context.ConnectionId connection_id = 2;</code> */ public Builder clearConnectionId() { - if (connectionIdBuilder_ == null) { - connectionId_ = null; - onChanged(); - } else { - connectionId_ = null; + bitField0_ = (bitField0_ & ~0x00000002); + connectionId_ = null; + if (connectionIdBuilder_ != null) { + connectionIdBuilder_.dispose(); connectionIdBuilder_ = null; } + onChanged(); return this; } @@ -52736,6 +50735,7 @@ public final class ContextOuterClass { * <code>.context.ConnectionId connection_id = 2;</code> */ public context.ContextOuterClass.ConnectionId.Builder getConnectionIdBuilder() { + bitField0_ |= 0x00000002; onChanged(); return getConnectionIdFieldBuilder().getBuilder(); } @@ -52789,7 +50789,17 @@ public final class ContextOuterClass { @java.lang.Override public ConnectionEvent parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ConnectionEvent(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -52889,83 +50899,6 @@ public final class ContextOuterClass { return new EndPointId(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private EndPointId(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.TopologyId.Builder subBuilder = null; - if (topologyId_ != null) { - subBuilder = topologyId_.toBuilder(); - } - topologyId_ = input.readMessage(context.ContextOuterClass.TopologyId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(topologyId_); - topologyId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - context.ContextOuterClass.DeviceId.Builder subBuilder = null; - if (deviceId_ != null) { - subBuilder = deviceId_.toBuilder(); - } - deviceId_ = input.readMessage(context.ContextOuterClass.DeviceId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deviceId_); - deviceId_ = subBuilder.buildPartial(); - } - break; - } - case 26: - { - context.ContextOuterClass.Uuid.Builder subBuilder = null; - if (endpointUuid_ != null) { - subBuilder = endpointUuid_.toBuilder(); - } - endpointUuid_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endpointUuid_); - endpointUuid_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_EndPointId_descriptor; } @@ -53002,7 +50935,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.TopologyIdOrBuilder getTopologyIdOrBuilder() { - return getTopologyId(); + return topologyId_ == null ? context.ContextOuterClass.TopologyId.getDefaultInstance() : topologyId_; } public static final int DEVICE_ID_FIELD_NUMBER = 2; @@ -53032,7 +50965,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { - return getDeviceId(); + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; } public static final int ENDPOINT_UUID_FIELD_NUMBER = 3; @@ -53062,7 +50995,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.UuidOrBuilder getEndpointUuidOrBuilder() { - return getEndpointUuid(); + return endpointUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : endpointUuid_; } private byte memoizedIsInitialized = -1; @@ -53089,7 +51022,7 @@ public final class ContextOuterClass { if (endpointUuid_ != null) { output.writeMessage(3, getEndpointUuid()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -53107,7 +51040,7 @@ public final class ContextOuterClass { if (endpointUuid_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndpointUuid()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -53139,7 +51072,7 @@ public final class ContextOuterClass { if (!getEndpointUuid().equals(other.getEndpointUuid())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -53163,7 +51096,7 @@ public final class ContextOuterClass { hash = (37 * hash) + ENDPOINT_UUID_FIELD_NUMBER; hash = (53 * hash) + getEndpointUuid().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -53261,38 +51194,29 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.EndPointId.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (topologyIdBuilder_ == null) { - topologyId_ = null; - } else { - topologyId_ = null; + bitField0_ = 0; + topologyId_ = null; + if (topologyIdBuilder_ != null) { + topologyIdBuilder_.dispose(); topologyIdBuilder_ = null; } - if (deviceIdBuilder_ == null) { - deviceId_ = null; - } else { - deviceId_ = null; + deviceId_ = null; + if (deviceIdBuilder_ != null) { + deviceIdBuilder_.dispose(); deviceIdBuilder_ = null; } - if (endpointUuidBuilder_ == null) { - endpointUuid_ = null; - } else { - endpointUuid_ = null; + endpointUuid_ = null; + if (endpointUuidBuilder_ != null) { + endpointUuidBuilder_.dispose(); endpointUuidBuilder_ = null; } return this; @@ -53320,53 +51244,24 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.EndPointId buildPartial() { context.ContextOuterClass.EndPointId result = new context.ContextOuterClass.EndPointId(this); - if (topologyIdBuilder_ == null) { - result.topologyId_ = topologyId_; - } else { - result.topologyId_ = topologyIdBuilder_.build(); - } - if (deviceIdBuilder_ == null) { - result.deviceId_ = deviceId_; - } else { - result.deviceId_ = deviceIdBuilder_.build(); - } - if (endpointUuidBuilder_ == null) { - result.endpointUuid_ = endpointUuid_; - } else { - result.endpointUuid_ = endpointUuidBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.EndPointId result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.topologyId_ = topologyIdBuilder_ == null ? topologyId_ : topologyIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.deviceId_ = deviceIdBuilder_ == null ? deviceId_ : deviceIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.endpointUuid_ = endpointUuidBuilder_ == null ? endpointUuid_ : endpointUuidBuilder_.build(); + } } @java.lang.Override @@ -53391,7 +51286,7 @@ public final class ContextOuterClass { if (other.hasEndpointUuid()) { mergeEndpointUuid(other.getEndpointUuid()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -53403,20 +51298,61 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.EndPointId parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getTopologyIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + input.readMessage(getDeviceIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 26: + { + input.readMessage(getEndpointUuidFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } + // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.EndPointId) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.TopologyId topologyId_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.TopologyId, context.ContextOuterClass.TopologyId.Builder, context.ContextOuterClass.TopologyIdOrBuilder> topologyIdBuilder_; @@ -53426,7 +51362,7 @@ public final class ContextOuterClass { * @return Whether the topologyId field is set. */ public boolean hasTopologyId() { - return topologyIdBuilder_ != null || topologyId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -53450,10 +51386,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } topologyId_ = value; - onChanged(); } else { topologyIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -53463,10 +51400,11 @@ public final class ContextOuterClass { public Builder setTopologyId(context.ContextOuterClass.TopologyId.Builder builderForValue) { if (topologyIdBuilder_ == null) { topologyId_ = builderForValue.build(); - onChanged(); } else { topologyIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -53475,15 +51413,16 @@ public final class ContextOuterClass { */ public Builder mergeTopologyId(context.ContextOuterClass.TopologyId value) { if (topologyIdBuilder_ == null) { - if (topologyId_ != null) { - topologyId_ = context.ContextOuterClass.TopologyId.newBuilder(topologyId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && topologyId_ != null && topologyId_ != context.ContextOuterClass.TopologyId.getDefaultInstance()) { + getTopologyIdBuilder().mergeFrom(value); } else { topologyId_ = value; } - onChanged(); } else { topologyIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -53491,13 +51430,13 @@ public final class ContextOuterClass { * <code>.context.TopologyId topology_id = 1;</code> */ public Builder clearTopologyId() { - if (topologyIdBuilder_ == null) { - topologyId_ = null; - onChanged(); - } else { - topologyId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + topologyId_ = null; + if (topologyIdBuilder_ != null) { + topologyIdBuilder_.dispose(); topologyIdBuilder_ = null; } + onChanged(); return this; } @@ -53505,6 +51444,7 @@ public final class ContextOuterClass { * <code>.context.TopologyId topology_id = 1;</code> */ public context.ContextOuterClass.TopologyId.Builder getTopologyIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getTopologyIdFieldBuilder().getBuilder(); } @@ -53540,7 +51480,7 @@ public final class ContextOuterClass { * @return Whether the deviceId field is set. */ public boolean hasDeviceId() { - return deviceIdBuilder_ != null || deviceId_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** @@ -53564,10 +51504,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } deviceId_ = value; - onChanged(); } else { deviceIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -53577,10 +51518,11 @@ public final class ContextOuterClass { public Builder setDeviceId(context.ContextOuterClass.DeviceId.Builder builderForValue) { if (deviceIdBuilder_ == null) { deviceId_ = builderForValue.build(); - onChanged(); } else { deviceIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -53589,15 +51531,16 @@ public final class ContextOuterClass { */ public Builder mergeDeviceId(context.ContextOuterClass.DeviceId value) { if (deviceIdBuilder_ == null) { - if (deviceId_ != null) { - deviceId_ = context.ContextOuterClass.DeviceId.newBuilder(deviceId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000002) != 0) && deviceId_ != null && deviceId_ != context.ContextOuterClass.DeviceId.getDefaultInstance()) { + getDeviceIdBuilder().mergeFrom(value); } else { deviceId_ = value; } - onChanged(); } else { deviceIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -53605,13 +51548,13 @@ public final class ContextOuterClass { * <code>.context.DeviceId device_id = 2;</code> */ public Builder clearDeviceId() { - if (deviceIdBuilder_ == null) { - deviceId_ = null; - onChanged(); - } else { - deviceId_ = null; + bitField0_ = (bitField0_ & ~0x00000002); + deviceId_ = null; + if (deviceIdBuilder_ != null) { + deviceIdBuilder_.dispose(); deviceIdBuilder_ = null; } + onChanged(); return this; } @@ -53619,6 +51562,7 @@ public final class ContextOuterClass { * <code>.context.DeviceId device_id = 2;</code> */ public context.ContextOuterClass.DeviceId.Builder getDeviceIdBuilder() { + bitField0_ |= 0x00000002; onChanged(); return getDeviceIdFieldBuilder().getBuilder(); } @@ -53654,7 +51598,7 @@ public final class ContextOuterClass { * @return Whether the endpointUuid field is set. */ public boolean hasEndpointUuid() { - return endpointUuidBuilder_ != null || endpointUuid_ != null; + return ((bitField0_ & 0x00000004) != 0); } /** @@ -53678,10 +51622,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } endpointUuid_ = value; - onChanged(); } else { endpointUuidBuilder_.setMessage(value); } + bitField0_ |= 0x00000004; + onChanged(); return this; } @@ -53691,10 +51636,11 @@ public final class ContextOuterClass { public Builder setEndpointUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { if (endpointUuidBuilder_ == null) { endpointUuid_ = builderForValue.build(); - onChanged(); } else { endpointUuidBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000004; + onChanged(); return this; } @@ -53703,15 +51649,16 @@ public final class ContextOuterClass { */ public Builder mergeEndpointUuid(context.ContextOuterClass.Uuid value) { if (endpointUuidBuilder_ == null) { - if (endpointUuid_ != null) { - endpointUuid_ = context.ContextOuterClass.Uuid.newBuilder(endpointUuid_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000004) != 0) && endpointUuid_ != null && endpointUuid_ != context.ContextOuterClass.Uuid.getDefaultInstance()) { + getEndpointUuidBuilder().mergeFrom(value); } else { endpointUuid_ = value; } - onChanged(); } else { endpointUuidBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000004; + onChanged(); return this; } @@ -53719,13 +51666,13 @@ public final class ContextOuterClass { * <code>.context.Uuid endpoint_uuid = 3;</code> */ public Builder clearEndpointUuid() { - if (endpointUuidBuilder_ == null) { - endpointUuid_ = null; - onChanged(); - } else { - endpointUuid_ = null; + bitField0_ = (bitField0_ & ~0x00000004); + endpointUuid_ = null; + if (endpointUuidBuilder_ != null) { + endpointUuidBuilder_.dispose(); endpointUuidBuilder_ = null; } + onChanged(); return this; } @@ -53733,6 +51680,7 @@ public final class ContextOuterClass { * <code>.context.Uuid endpoint_uuid = 3;</code> */ public context.ContextOuterClass.Uuid.Builder getEndpointUuidBuilder() { + bitField0_ |= 0x00000004; onChanged(); return getEndpointUuidFieldBuilder().getBuilder(); } @@ -53786,7 +51734,17 @@ public final class ContextOuterClass { @java.lang.Override public EndPointId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new EndPointId(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -53924,111 +51882,6 @@ public final class ContextOuterClass { return new EndPoint(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private EndPoint(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.EndPointId.Builder subBuilder = null; - if (endpointId_ != null) { - subBuilder = endpointId_.toBuilder(); - } - endpointId_ = input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endpointId_); - endpointId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - name_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - endpointType_ = s; - break; - } - case 32: - { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - kpiSampleTypes_ = new java.util.ArrayList<java.lang.Integer>(); - mutable_bitField0_ |= 0x00000001; - } - kpiSampleTypes_.add(rawValue); - break; - } - case 34: - { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while (input.getBytesUntilLimit() > 0) { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - kpiSampleTypes_ = new java.util.ArrayList<java.lang.Integer>(); - mutable_bitField0_ |= 0x00000001; - } - kpiSampleTypes_.add(rawValue); - } - input.popLimit(oldLimit); - break; - } - case 42: - { - context.ContextOuterClass.Location.Builder subBuilder = null; - if (endpointLocation_ != null) { - subBuilder = endpointLocation_.toBuilder(); - } - endpointLocation_ = input.readMessage(context.ContextOuterClass.Location.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endpointLocation_); - endpointLocation_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - kpiSampleTypes_ = java.util.Collections.unmodifiableList(kpiSampleTypes_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_EndPoint_descriptor; } @@ -54065,12 +51918,13 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { - return getEndpointId(); + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; } public static final int NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object name_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** * <code>string name = 2;</code> @@ -54107,7 +51961,8 @@ public final class ContextOuterClass { public static final int ENDPOINT_TYPE_FIELD_NUMBER = 3; - private volatile java.lang.Object endpointType_; + @SuppressWarnings("serial") + private volatile java.lang.Object endpointType_ = ""; /** * <code>string endpoint_type = 3;</code> @@ -54144,13 +51999,13 @@ public final class ContextOuterClass { public static final int KPI_SAMPLE_TYPES_FIELD_NUMBER = 4; + @SuppressWarnings("serial") private java.util.List<java.lang.Integer> kpiSampleTypes_; private static final com.google.protobuf.Internal.ListAdapter.Converter<java.lang.Integer, kpi_sample_types.KpiSampleTypes.KpiSampleType> kpiSampleTypes_converter_ = new com.google.protobuf.Internal.ListAdapter.Converter<java.lang.Integer, kpi_sample_types.KpiSampleTypes.KpiSampleType>() { public kpi_sample_types.KpiSampleTypes.KpiSampleType convert(java.lang.Integer from) { - @SuppressWarnings("deprecation") - kpi_sample_types.KpiSampleTypes.KpiSampleType result = kpi_sample_types.KpiSampleTypes.KpiSampleType.valueOf(from); + kpi_sample_types.KpiSampleTypes.KpiSampleType result = kpi_sample_types.KpiSampleTypes.KpiSampleType.forNumber(from); return result == null ? kpi_sample_types.KpiSampleTypes.KpiSampleType.UNRECOGNIZED : result; } }; @@ -54231,7 +52086,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.LocationOrBuilder getEndpointLocationOrBuilder() { - return getEndpointLocation(); + return endpointLocation_ == null ? context.ContextOuterClass.Location.getDefaultInstance() : endpointLocation_; } private byte memoizedIsInitialized = -1; @@ -54253,10 +52108,10 @@ public final class ContextOuterClass { if (endpointId_ != null) { output.writeMessage(1, getEndpointId()); } - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); } - if (!getEndpointTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointType_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, endpointType_); } if (getKpiSampleTypesList().size() > 0) { @@ -54269,7 +52124,7 @@ public final class ContextOuterClass { if (endpointLocation_ != null) { output.writeMessage(5, getEndpointLocation()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -54281,10 +52136,10 @@ public final class ContextOuterClass { if (endpointId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEndpointId()); } - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); } - if (!getEndpointTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointType_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, endpointType_); } { @@ -54302,7 +52157,7 @@ public final class ContextOuterClass { if (endpointLocation_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getEndpointLocation()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -54334,7 +52189,7 @@ public final class ContextOuterClass { if (!getEndpointLocation().equals(other.getEndpointLocation())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -54362,7 +52217,7 @@ public final class ContextOuterClass { hash = (37 * hash) + ENDPOINT_LOCATION_FIELD_NUMBER; hash = (53 * hash) + getEndpointLocation().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -54456,36 +52311,28 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.EndPoint.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (endpointIdBuilder_ == null) { - endpointId_ = null; - } else { - endpointId_ = null; + bitField0_ = 0; + endpointId_ = null; + if (endpointIdBuilder_ != null) { + endpointIdBuilder_.dispose(); endpointIdBuilder_ = null; } name_ = ""; endpointType_ = ""; kpiSampleTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - if (endpointLocationBuilder_ == null) { - endpointLocation_ = null; - } else { - endpointLocation_ = null; + bitField0_ = (bitField0_ & ~0x00000008); + endpointLocation_ = null; + if (endpointLocationBuilder_ != null) { + endpointLocationBuilder_.dispose(); endpointLocationBuilder_ = null; } return this; @@ -54513,56 +52360,36 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.EndPoint buildPartial() { context.ContextOuterClass.EndPoint result = new context.ContextOuterClass.EndPoint(this); - int from_bitField0_ = bitField0_; - if (endpointIdBuilder_ == null) { - result.endpointId_ = endpointId_; - } else { - result.endpointId_ = endpointIdBuilder_.build(); - } - result.name_ = name_; - result.endpointType_ = endpointType_; - if (((bitField0_ & 0x00000001) != 0)) { - kpiSampleTypes_ = java.util.Collections.unmodifiableList(kpiSampleTypes_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.kpiSampleTypes_ = kpiSampleTypes_; - if (endpointLocationBuilder_ == null) { - result.endpointLocation_ = endpointLocation_; - } else { - result.endpointLocation_ = endpointLocationBuilder_.build(); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); + private void buildPartialRepeatedFields(context.ContextOuterClass.EndPoint result) { + if (((bitField0_ & 0x00000008) != 0)) { + kpiSampleTypes_ = java.util.Collections.unmodifiableList(kpiSampleTypes_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.kpiSampleTypes_ = kpiSampleTypes_; } - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.EndPoint result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.endpointId_ = endpointIdBuilder_ == null ? endpointId_ : endpointIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.endpointType_ = endpointType_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.endpointLocation_ = endpointLocationBuilder_ == null ? endpointLocation_ : endpointLocationBuilder_.build(); + } } @java.lang.Override @@ -54583,16 +52410,18 @@ public final class ContextOuterClass { } if (!other.getName().isEmpty()) { name_ = other.name_; + bitField0_ |= 0x00000002; onChanged(); } if (!other.getEndpointType().isEmpty()) { endpointType_ = other.endpointType_; + bitField0_ |= 0x00000004; onChanged(); } if (!other.kpiSampleTypes_.isEmpty()) { if (kpiSampleTypes_.isEmpty()) { kpiSampleTypes_ = other.kpiSampleTypes_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000008); } else { ensureKpiSampleTypesIsMutable(); kpiSampleTypes_.addAll(other.kpiSampleTypes_); @@ -54602,7 +52431,7 @@ public final class ContextOuterClass { if (other.hasEndpointLocation()) { mergeEndpointLocation(other.getEndpointLocation()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -54614,17 +52443,84 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.EndPoint parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getEndpointIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 26: + { + endpointType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } + // case 26 + case 32: + { + int tmpRaw = input.readEnum(); + ensureKpiSampleTypesIsMutable(); + kpiSampleTypes_.add(tmpRaw); + break; + } + // case 32 + case 34: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureKpiSampleTypesIsMutable(); + kpiSampleTypes_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } + // case 34 + case 42: + { + input.readMessage(getEndpointLocationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } + // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.EndPoint) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -54639,7 +52535,7 @@ public final class ContextOuterClass { * @return Whether the endpointId field is set. */ public boolean hasEndpointId() { - return endpointIdBuilder_ != null || endpointId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -54663,10 +52559,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } endpointId_ = value; - onChanged(); } else { endpointIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -54676,10 +52573,11 @@ public final class ContextOuterClass { public Builder setEndpointId(context.ContextOuterClass.EndPointId.Builder builderForValue) { if (endpointIdBuilder_ == null) { endpointId_ = builderForValue.build(); - onChanged(); } else { endpointIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -54688,15 +52586,16 @@ public final class ContextOuterClass { */ public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) { if (endpointIdBuilder_ == null) { - if (endpointId_ != null) { - endpointId_ = context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && endpointId_ != null && endpointId_ != context.ContextOuterClass.EndPointId.getDefaultInstance()) { + getEndpointIdBuilder().mergeFrom(value); } else { endpointId_ = value; } - onChanged(); } else { endpointIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -54704,13 +52603,13 @@ public final class ContextOuterClass { * <code>.context.EndPointId endpoint_id = 1;</code> */ public Builder clearEndpointId() { - if (endpointIdBuilder_ == null) { - endpointId_ = null; - onChanged(); - } else { - endpointId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + endpointId_ = null; + if (endpointIdBuilder_ != null) { + endpointIdBuilder_.dispose(); endpointIdBuilder_ = null; } + onChanged(); return this; } @@ -54718,6 +52617,7 @@ public final class ContextOuterClass { * <code>.context.EndPointId endpoint_id = 1;</code> */ public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getEndpointIdFieldBuilder().getBuilder(); } @@ -54787,6 +52687,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } name_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -54797,6 +52698,7 @@ public final class ContextOuterClass { */ public Builder clearName() { name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -54812,6 +52714,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); name_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -54859,6 +52762,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } endpointType_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -54869,6 +52773,7 @@ public final class ContextOuterClass { */ public Builder clearEndpointType() { endpointType_ = getDefaultInstance().getEndpointType(); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } @@ -54884,6 +52789,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); endpointType_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -54891,9 +52797,9 @@ public final class ContextOuterClass { private java.util.List<java.lang.Integer> kpiSampleTypes_ = java.util.Collections.emptyList(); private void ensureKpiSampleTypesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!((bitField0_ & 0x00000008) != 0)) { kpiSampleTypes_ = new java.util.ArrayList<java.lang.Integer>(kpiSampleTypes_); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000008; } } @@ -54973,7 +52879,7 @@ public final class ContextOuterClass { */ public Builder clearKpiSampleTypes() { kpiSampleTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } @@ -54997,8 +52903,8 @@ public final class ContextOuterClass { /** * <code>repeated .kpi_sample_types.KpiSampleType kpi_sample_types = 4;</code> - * @param index The index of the value to return. - * @return The enum numeric value on the wire of kpiSampleTypes at the given index. + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for kpiSampleTypes to set. * @return This builder for chaining. */ public Builder setKpiSampleTypesValue(int index, int value) { @@ -55043,7 +52949,7 @@ public final class ContextOuterClass { * @return Whether the endpointLocation field is set. */ public boolean hasEndpointLocation() { - return endpointLocationBuilder_ != null || endpointLocation_ != null; + return ((bitField0_ & 0x00000010) != 0); } /** @@ -55067,10 +52973,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } endpointLocation_ = value; - onChanged(); } else { endpointLocationBuilder_.setMessage(value); } + bitField0_ |= 0x00000010; + onChanged(); return this; } @@ -55080,10 +52987,11 @@ public final class ContextOuterClass { public Builder setEndpointLocation(context.ContextOuterClass.Location.Builder builderForValue) { if (endpointLocationBuilder_ == null) { endpointLocation_ = builderForValue.build(); - onChanged(); } else { endpointLocationBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000010; + onChanged(); return this; } @@ -55092,15 +53000,16 @@ public final class ContextOuterClass { */ public Builder mergeEndpointLocation(context.ContextOuterClass.Location value) { if (endpointLocationBuilder_ == null) { - if (endpointLocation_ != null) { - endpointLocation_ = context.ContextOuterClass.Location.newBuilder(endpointLocation_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000010) != 0) && endpointLocation_ != null && endpointLocation_ != context.ContextOuterClass.Location.getDefaultInstance()) { + getEndpointLocationBuilder().mergeFrom(value); } else { endpointLocation_ = value; } - onChanged(); } else { endpointLocationBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000010; + onChanged(); return this; } @@ -55108,13 +53017,13 @@ public final class ContextOuterClass { * <code>.context.Location endpoint_location = 5;</code> */ public Builder clearEndpointLocation() { - if (endpointLocationBuilder_ == null) { - endpointLocation_ = null; - onChanged(); - } else { - endpointLocation_ = null; + bitField0_ = (bitField0_ & ~0x00000010); + endpointLocation_ = null; + if (endpointLocationBuilder_ != null) { + endpointLocationBuilder_.dispose(); endpointLocationBuilder_ = null; } + onChanged(); return this; } @@ -55122,6 +53031,7 @@ public final class ContextOuterClass { * <code>.context.Location endpoint_location = 5;</code> */ public context.ContextOuterClass.Location.Builder getEndpointLocationBuilder() { + bitField0_ |= 0x00000010; onChanged(); return getEndpointLocationFieldBuilder().getBuilder(); } @@ -55175,7 +53085,17 @@ public final class ContextOuterClass { @java.lang.Override public EndPoint parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new EndPoint(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -55276,75 +53196,6 @@ public final class ContextOuterClass { return new EndPointName(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private EndPointName(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.EndPointId.Builder subBuilder = null; - if (endpointId_ != null) { - subBuilder = endpointId_.toBuilder(); - } - endpointId_ = input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endpointId_); - endpointId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - deviceName_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - endpointName_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - endpointType_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_EndPointName_descriptor; } @@ -55381,12 +53232,13 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { - return getEndpointId(); + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; } public static final int DEVICE_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object deviceName_; + @SuppressWarnings("serial") + private volatile java.lang.Object deviceName_ = ""; /** * <code>string device_name = 2;</code> @@ -55423,7 +53275,8 @@ public final class ContextOuterClass { public static final int ENDPOINT_NAME_FIELD_NUMBER = 3; - private volatile java.lang.Object endpointName_; + @SuppressWarnings("serial") + private volatile java.lang.Object endpointName_ = ""; /** * <code>string endpoint_name = 3;</code> @@ -55460,7 +53313,8 @@ public final class ContextOuterClass { public static final int ENDPOINT_TYPE_FIELD_NUMBER = 4; - private volatile java.lang.Object endpointType_; + @SuppressWarnings("serial") + private volatile java.lang.Object endpointType_ = ""; /** * <code>string endpoint_type = 4;</code> @@ -55513,16 +53367,16 @@ public final class ContextOuterClass { if (endpointId_ != null) { output.writeMessage(1, getEndpointId()); } - if (!getDeviceNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, deviceName_); } - if (!getEndpointNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, endpointName_); } - if (!getEndpointTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointType_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, endpointType_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -55534,16 +53388,16 @@ public final class ContextOuterClass { if (endpointId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEndpointId()); } - if (!getDeviceNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, deviceName_); } - if (!getEndpointNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, endpointName_); } - if (!getEndpointTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(endpointType_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, endpointType_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -55569,7 +53423,7 @@ public final class ContextOuterClass { return false; if (!getEndpointType().equals(other.getEndpointType())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -55591,7 +53445,7 @@ public final class ContextOuterClass { hash = (53 * hash) + getEndpointName().hashCode(); hash = (37 * hash) + ENDPOINT_TYPE_FIELD_NUMBER; hash = (53 * hash) + getEndpointType().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -55685,26 +53539,19 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.EndPointName.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (endpointIdBuilder_ == null) { - endpointId_ = null; - } else { - endpointId_ = null; + bitField0_ = 0; + endpointId_ = null; + if (endpointIdBuilder_ != null) { + endpointIdBuilder_.dispose(); endpointIdBuilder_ = null; } deviceName_ = ""; @@ -55735,46 +53582,27 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.EndPointName buildPartial() { context.ContextOuterClass.EndPointName result = new context.ContextOuterClass.EndPointName(this); - if (endpointIdBuilder_ == null) { - result.endpointId_ = endpointId_; - } else { - result.endpointId_ = endpointIdBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } - result.deviceName_ = deviceName_; - result.endpointName_ = endpointName_; - result.endpointType_ = endpointType_; onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.EndPointName result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.endpointId_ = endpointIdBuilder_ == null ? endpointId_ : endpointIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.deviceName_ = deviceName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.endpointName_ = endpointName_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.endpointType_ = endpointType_; + } } @java.lang.Override @@ -55795,17 +53623,20 @@ public final class ContextOuterClass { } if (!other.getDeviceName().isEmpty()) { deviceName_ = other.deviceName_; + bitField0_ |= 0x00000002; onChanged(); } if (!other.getEndpointName().isEmpty()) { endpointName_ = other.endpointName_; + bitField0_ |= 0x00000004; onChanged(); } if (!other.getEndpointType().isEmpty()) { endpointType_ = other.endpointType_; + bitField0_ |= 0x00000008; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -55817,20 +53648,68 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.EndPointName parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getEndpointIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + deviceName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 26: + { + endpointName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } + // case 26 + case 34: + { + endpointType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } + // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.EndPointName) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.EndPointId endpointId_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> endpointIdBuilder_; @@ -55840,7 +53719,7 @@ public final class ContextOuterClass { * @return Whether the endpointId field is set. */ public boolean hasEndpointId() { - return endpointIdBuilder_ != null || endpointId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -55864,10 +53743,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } endpointId_ = value; - onChanged(); } else { endpointIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -55877,10 +53757,11 @@ public final class ContextOuterClass { public Builder setEndpointId(context.ContextOuterClass.EndPointId.Builder builderForValue) { if (endpointIdBuilder_ == null) { endpointId_ = builderForValue.build(); - onChanged(); } else { endpointIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -55889,15 +53770,16 @@ public final class ContextOuterClass { */ public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) { if (endpointIdBuilder_ == null) { - if (endpointId_ != null) { - endpointId_ = context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && endpointId_ != null && endpointId_ != context.ContextOuterClass.EndPointId.getDefaultInstance()) { + getEndpointIdBuilder().mergeFrom(value); } else { endpointId_ = value; } - onChanged(); } else { endpointIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -55905,13 +53787,13 @@ public final class ContextOuterClass { * <code>.context.EndPointId endpoint_id = 1;</code> */ public Builder clearEndpointId() { - if (endpointIdBuilder_ == null) { - endpointId_ = null; - onChanged(); - } else { - endpointId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + endpointId_ = null; + if (endpointIdBuilder_ != null) { + endpointIdBuilder_.dispose(); endpointIdBuilder_ = null; } + onChanged(); return this; } @@ -55919,6 +53801,7 @@ public final class ContextOuterClass { * <code>.context.EndPointId endpoint_id = 1;</code> */ public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getEndpointIdFieldBuilder().getBuilder(); } @@ -55988,6 +53871,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } deviceName_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -55998,6 +53882,7 @@ public final class ContextOuterClass { */ public Builder clearDeviceName() { deviceName_ = getDefaultInstance().getDeviceName(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -56013,6 +53898,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); deviceName_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -56060,6 +53946,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } endpointName_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -56070,6 +53957,7 @@ public final class ContextOuterClass { */ public Builder clearEndpointName() { endpointName_ = getDefaultInstance().getEndpointName(); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } @@ -56085,6 +53973,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); endpointName_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -56132,6 +54021,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } endpointType_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -56142,6 +54032,7 @@ public final class ContextOuterClass { */ public Builder clearEndpointType() { endpointType_ = getDefaultInstance().getEndpointType(); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } @@ -56157,6 +54048,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); endpointType_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -56188,7 +54080,17 @@ public final class ContextOuterClass { @java.lang.Override public EndPointName parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new EndPointName(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -56259,57 +54161,6 @@ public final class ContextOuterClass { return new EndPointIdList(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private EndPointIdList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - endpointIds_ = new java.util.ArrayList<context.ContextOuterClass.EndPointId>(); - mutable_bitField0_ |= 0x00000001; - } - endpointIds_.add(input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - endpointIds_ = java.util.Collections.unmodifiableList(endpointIds_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_EndPointIdList_descriptor; } @@ -56321,6 +54172,7 @@ public final class ContextOuterClass { public static final int ENDPOINT_IDS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.EndPointId> endpointIds_; /** @@ -56381,7 +54233,7 @@ public final class ContextOuterClass { for (int i = 0; i < endpointIds_.size(); i++) { output.writeMessage(1, endpointIds_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -56393,7 +54245,7 @@ public final class ContextOuterClass { for (int i = 0; i < endpointIds_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, endpointIds_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -56409,7 +54261,7 @@ public final class ContextOuterClass { context.ContextOuterClass.EndPointIdList other = (context.ContextOuterClass.EndPointIdList) obj; if (!getEndpointIdsList().equals(other.getEndpointIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -56425,7 +54277,7 @@ public final class ContextOuterClass { hash = (37 * hash) + ENDPOINT_IDS_FIELD_NUMBER; hash = (53 * hash) + getEndpointIdsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -56519,29 +54371,23 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.EndPointIdList.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getEndpointIdsFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (endpointIdsBuilder_ == null) { endpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + endpointIds_ = null; endpointIdsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -56567,7 +54413,15 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.EndPointIdList buildPartial() { context.ContextOuterClass.EndPointIdList result = new context.ContextOuterClass.EndPointIdList(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.EndPointIdList result) { if (endpointIdsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { endpointIds_ = java.util.Collections.unmodifiableList(endpointIds_); @@ -56577,38 +54431,10 @@ public final class ContextOuterClass { } else { result.endpointIds_ = endpointIdsBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); } - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.EndPointIdList result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -56648,7 +54474,7 @@ public final class ContextOuterClass { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -56660,17 +54486,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.EndPointIdList parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + context.ContextOuterClass.EndPointId m = input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry); + if (endpointIdsBuilder_ == null) { + ensureEndpointIdsIsMutable(); + endpointIds_.add(m); + } else { + endpointIdsBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.EndPointIdList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -56940,7 +54796,17 @@ public final class ContextOuterClass { @java.lang.Override public EndPointIdList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new EndPointIdList(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -57011,57 +54877,6 @@ public final class ContextOuterClass { return new EndPointNameList(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private EndPointNameList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - endpointNames_ = new java.util.ArrayList<context.ContextOuterClass.EndPointName>(); - mutable_bitField0_ |= 0x00000001; - } - endpointNames_.add(input.readMessage(context.ContextOuterClass.EndPointName.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - endpointNames_ = java.util.Collections.unmodifiableList(endpointNames_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_EndPointNameList_descriptor; } @@ -57073,6 +54888,7 @@ public final class ContextOuterClass { public static final int ENDPOINT_NAMES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.EndPointName> endpointNames_; /** @@ -57133,7 +54949,7 @@ public final class ContextOuterClass { for (int i = 0; i < endpointNames_.size(); i++) { output.writeMessage(1, endpointNames_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -57145,7 +54961,7 @@ public final class ContextOuterClass { for (int i = 0; i < endpointNames_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, endpointNames_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -57161,7 +54977,7 @@ public final class ContextOuterClass { context.ContextOuterClass.EndPointNameList other = (context.ContextOuterClass.EndPointNameList) obj; if (!getEndpointNamesList().equals(other.getEndpointNamesList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -57177,7 +54993,7 @@ public final class ContextOuterClass { hash = (37 * hash) + ENDPOINT_NAMES_FIELD_NUMBER; hash = (53 * hash) + getEndpointNamesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -57271,29 +55087,23 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.EndPointNameList.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getEndpointNamesFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (endpointNamesBuilder_ == null) { endpointNames_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + endpointNames_ = null; endpointNamesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -57319,7 +55129,15 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.EndPointNameList buildPartial() { context.ContextOuterClass.EndPointNameList result = new context.ContextOuterClass.EndPointNameList(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.EndPointNameList result) { if (endpointNamesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { endpointNames_ = java.util.Collections.unmodifiableList(endpointNames_); @@ -57329,38 +55147,10 @@ public final class ContextOuterClass { } else { result.endpointNames_ = endpointNamesBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.EndPointNameList result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -57400,7 +55190,7 @@ public final class ContextOuterClass { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -57412,17 +55202,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.EndPointNameList parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + context.ContextOuterClass.EndPointName m = input.readMessage(context.ContextOuterClass.EndPointName.parser(), extensionRegistry); + if (endpointNamesBuilder_ == null) { + ensureEndpointNamesIsMutable(); + endpointNames_.add(m); + } else { + endpointNamesBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.EndPointNameList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -57692,7 +55512,17 @@ public final class ContextOuterClass { @java.lang.Override public EndPointNameList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new EndPointNameList(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -57763,56 +55593,6 @@ public final class ContextOuterClass { return new ConfigRule_Custom(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ConfigRule_Custom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - resourceKey_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - resourceValue_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_ConfigRule_Custom_descriptor; } @@ -57824,7 +55604,8 @@ public final class ContextOuterClass { public static final int RESOURCE_KEY_FIELD_NUMBER = 1; - private volatile java.lang.Object resourceKey_; + @SuppressWarnings("serial") + private volatile java.lang.Object resourceKey_ = ""; /** * <code>string resource_key = 1;</code> @@ -57861,7 +55642,8 @@ public final class ContextOuterClass { public static final int RESOURCE_VALUE_FIELD_NUMBER = 2; - private volatile java.lang.Object resourceValue_; + @SuppressWarnings("serial") + private volatile java.lang.Object resourceValue_ = ""; /** * <code>string resource_value = 2;</code> @@ -57911,13 +55693,13 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getResourceKeyBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceKey_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceKey_); } - if (!getResourceValueBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceValue_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resourceValue_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -57926,13 +55708,13 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (!getResourceKeyBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceKey_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, resourceKey_); } - if (!getResourceValueBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resourceValue_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resourceValue_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -57950,7 +55732,7 @@ public final class ContextOuterClass { return false; if (!getResourceValue().equals(other.getResourceValue())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -57966,7 +55748,7 @@ public final class ContextOuterClass { hash = (53 * hash) + getResourceKey().hashCode(); hash = (37 * hash) + RESOURCE_VALUE_FIELD_NUMBER; hash = (53 * hash) + getResourceValue().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -58060,22 +55842,16 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.ConfigRule_Custom.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; resourceKey_ = ""; resourceValue_ = ""; return this; @@ -58103,40 +55879,21 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.ConfigRule_Custom buildPartial() { context.ContextOuterClass.ConfigRule_Custom result = new context.ContextOuterClass.ConfigRule_Custom(this); - result.resourceKey_ = resourceKey_; - result.resourceValue_ = resourceValue_; + if (bitField0_ != 0) { + buildPartial0(result); + } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.ConfigRule_Custom result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.resourceKey_ = resourceKey_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.resourceValue_ = resourceValue_; + } } @java.lang.Override @@ -58154,13 +55911,15 @@ public final class ContextOuterClass { return this; if (!other.getResourceKey().isEmpty()) { resourceKey_ = other.resourceKey_; + bitField0_ |= 0x00000001; onChanged(); } if (!other.getResourceValue().isEmpty()) { resourceValue_ = other.resourceValue_; + bitField0_ |= 0x00000002; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -58172,20 +55931,54 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.ConfigRule_Custom parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + resourceKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + resourceValue_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConfigRule_Custom) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private java.lang.Object resourceKey_ = ""; /** @@ -58229,6 +56022,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } resourceKey_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -58239,6 +56033,7 @@ public final class ContextOuterClass { */ public Builder clearResourceKey() { resourceKey_ = getDefaultInstance().getResourceKey(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -58254,6 +56049,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); resourceKey_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -58301,6 +56097,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } resourceValue_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -58311,6 +56108,7 @@ public final class ContextOuterClass { */ public Builder clearResourceValue() { resourceValue_ = getDefaultInstance().getResourceValue(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -58326,6 +56124,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); resourceValue_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -58357,7 +56156,17 @@ public final class ContextOuterClass { @java.lang.Override public ConfigRule_Custom parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ConfigRule_Custom(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -58436,70 +56245,6 @@ public final class ContextOuterClass { return new ConfigRule_ACL(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ConfigRule_ACL(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.EndPointId.Builder subBuilder = null; - if (endpointId_ != null) { - subBuilder = endpointId_.toBuilder(); - } - endpointId_ = input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endpointId_); - endpointId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - acl.Acl.AclRuleSet.Builder subBuilder = null; - if (ruleSet_ != null) { - subBuilder = ruleSet_.toBuilder(); - } - ruleSet_ = input.readMessage(acl.Acl.AclRuleSet.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(ruleSet_); - ruleSet_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_ConfigRule_ACL_descriptor; } @@ -58536,7 +56281,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { - return getEndpointId(); + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; } public static final int RULE_SET_FIELD_NUMBER = 2; @@ -58566,7 +56311,7 @@ public final class ContextOuterClass { */ @java.lang.Override public acl.Acl.AclRuleSetOrBuilder getRuleSetOrBuilder() { - return getRuleSet(); + return ruleSet_ == null ? acl.Acl.AclRuleSet.getDefaultInstance() : ruleSet_; } private byte memoizedIsInitialized = -1; @@ -58590,7 +56335,7 @@ public final class ContextOuterClass { if (ruleSet_ != null) { output.writeMessage(2, getRuleSet()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -58605,7 +56350,7 @@ public final class ContextOuterClass { if (ruleSet_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRuleSet()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -58631,7 +56376,7 @@ public final class ContextOuterClass { if (!getRuleSet().equals(other.getRuleSet())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -58651,7 +56396,7 @@ public final class ContextOuterClass { hash = (37 * hash) + RULE_SET_FIELD_NUMBER; hash = (53 * hash) + getRuleSet().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -58745,32 +56490,24 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.ConfigRule_ACL.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (endpointIdBuilder_ == null) { - endpointId_ = null; - } else { - endpointId_ = null; + bitField0_ = 0; + endpointId_ = null; + if (endpointIdBuilder_ != null) { + endpointIdBuilder_.dispose(); endpointIdBuilder_ = null; } - if (ruleSetBuilder_ == null) { - ruleSet_ = null; - } else { - ruleSet_ = null; + ruleSet_ = null; + if (ruleSetBuilder_ != null) { + ruleSetBuilder_.dispose(); ruleSetBuilder_ = null; } return this; @@ -58798,48 +56535,21 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.ConfigRule_ACL buildPartial() { context.ContextOuterClass.ConfigRule_ACL result = new context.ContextOuterClass.ConfigRule_ACL(this); - if (endpointIdBuilder_ == null) { - result.endpointId_ = endpointId_; - } else { - result.endpointId_ = endpointIdBuilder_.build(); - } - if (ruleSetBuilder_ == null) { - result.ruleSet_ = ruleSet_; - } else { - result.ruleSet_ = ruleSetBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.ConfigRule_ACL result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.endpointId_ = endpointIdBuilder_ == null ? endpointId_ : endpointIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.ruleSet_ = ruleSetBuilder_ == null ? ruleSet_ : ruleSetBuilder_.build(); + } } @java.lang.Override @@ -58861,7 +56571,7 @@ public final class ContextOuterClass { if (other.hasRuleSet()) { mergeRuleSet(other.getRuleSet()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -58873,20 +56583,54 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.ConfigRule_ACL parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getEndpointIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + input.readMessage(getRuleSetFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } + // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConfigRule_ACL) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.EndPointId endpointId_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> endpointIdBuilder_; @@ -58896,7 +56640,7 @@ public final class ContextOuterClass { * @return Whether the endpointId field is set. */ public boolean hasEndpointId() { - return endpointIdBuilder_ != null || endpointId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -58920,10 +56664,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } endpointId_ = value; - onChanged(); } else { endpointIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -58933,10 +56678,11 @@ public final class ContextOuterClass { public Builder setEndpointId(context.ContextOuterClass.EndPointId.Builder builderForValue) { if (endpointIdBuilder_ == null) { endpointId_ = builderForValue.build(); - onChanged(); } else { endpointIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -58945,15 +56691,16 @@ public final class ContextOuterClass { */ public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) { if (endpointIdBuilder_ == null) { - if (endpointId_ != null) { - endpointId_ = context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && endpointId_ != null && endpointId_ != context.ContextOuterClass.EndPointId.getDefaultInstance()) { + getEndpointIdBuilder().mergeFrom(value); } else { endpointId_ = value; } - onChanged(); } else { endpointIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -58961,13 +56708,13 @@ public final class ContextOuterClass { * <code>.context.EndPointId endpoint_id = 1;</code> */ public Builder clearEndpointId() { - if (endpointIdBuilder_ == null) { - endpointId_ = null; - onChanged(); - } else { - endpointId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + endpointId_ = null; + if (endpointIdBuilder_ != null) { + endpointIdBuilder_.dispose(); endpointIdBuilder_ = null; } + onChanged(); return this; } @@ -58975,6 +56722,7 @@ public final class ContextOuterClass { * <code>.context.EndPointId endpoint_id = 1;</code> */ public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getEndpointIdFieldBuilder().getBuilder(); } @@ -59010,7 +56758,7 @@ public final class ContextOuterClass { * @return Whether the ruleSet field is set. */ public boolean hasRuleSet() { - return ruleSetBuilder_ != null || ruleSet_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** @@ -59034,10 +56782,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } ruleSet_ = value; - onChanged(); } else { ruleSetBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -59047,10 +56796,11 @@ public final class ContextOuterClass { public Builder setRuleSet(acl.Acl.AclRuleSet.Builder builderForValue) { if (ruleSetBuilder_ == null) { ruleSet_ = builderForValue.build(); - onChanged(); } else { ruleSetBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -59059,15 +56809,16 @@ public final class ContextOuterClass { */ public Builder mergeRuleSet(acl.Acl.AclRuleSet value) { if (ruleSetBuilder_ == null) { - if (ruleSet_ != null) { - ruleSet_ = acl.Acl.AclRuleSet.newBuilder(ruleSet_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000002) != 0) && ruleSet_ != null && ruleSet_ != acl.Acl.AclRuleSet.getDefaultInstance()) { + getRuleSetBuilder().mergeFrom(value); } else { ruleSet_ = value; } - onChanged(); } else { ruleSetBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -59075,13 +56826,13 @@ public final class ContextOuterClass { * <code>.acl.AclRuleSet rule_set = 2;</code> */ public Builder clearRuleSet() { - if (ruleSetBuilder_ == null) { - ruleSet_ = null; - onChanged(); - } else { - ruleSet_ = null; + bitField0_ = (bitField0_ & ~0x00000002); + ruleSet_ = null; + if (ruleSetBuilder_ != null) { + ruleSetBuilder_.dispose(); ruleSetBuilder_ = null; } + onChanged(); return this; } @@ -59089,6 +56840,7 @@ public final class ContextOuterClass { * <code>.acl.AclRuleSet rule_set = 2;</code> */ public acl.Acl.AclRuleSet.Builder getRuleSetBuilder() { + bitField0_ |= 0x00000002; onChanged(); return getRuleSetFieldBuilder().getBuilder(); } @@ -59142,7 +56894,17 @@ public final class ContextOuterClass { @java.lang.Override public ConfigRule_ACL parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ConfigRule_ACL(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -59210,7 +56972,7 @@ public final class ContextOuterClass { */ context.ContextOuterClass.ConfigRule_ACLOrBuilder getAclOrBuilder(); - public context.ContextOuterClass.ConfigRule.ConfigRuleCase getConfigRuleCase(); + context.ContextOuterClass.ConfigRule.ConfigRuleCase getConfigRuleCase(); } /** @@ -59236,78 +56998,6 @@ public final class ContextOuterClass { return new ConfigRule(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ConfigRule(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 8: - { - int rawValue = input.readEnum(); - action_ = rawValue; - break; - } - case 18: - { - context.ContextOuterClass.ConfigRule_Custom.Builder subBuilder = null; - if (configRuleCase_ == 2) { - subBuilder = ((context.ContextOuterClass.ConfigRule_Custom) configRule_).toBuilder(); - } - configRule_ = input.readMessage(context.ContextOuterClass.ConfigRule_Custom.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((context.ContextOuterClass.ConfigRule_Custom) configRule_); - configRule_ = subBuilder.buildPartial(); - } - configRuleCase_ = 2; - break; - } - case 26: - { - context.ContextOuterClass.ConfigRule_ACL.Builder subBuilder = null; - if (configRuleCase_ == 3) { - subBuilder = ((context.ContextOuterClass.ConfigRule_ACL) configRule_).toBuilder(); - } - configRule_ = input.readMessage(context.ContextOuterClass.ConfigRule_ACL.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((context.ContextOuterClass.ConfigRule_ACL) configRule_); - configRule_ = subBuilder.buildPartial(); - } - configRuleCase_ = 3; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_ConfigRule_descriptor; } @@ -59319,6 +57009,7 @@ public final class ContextOuterClass { private int configRuleCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object configRule_; public enum ConfigRuleCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { @@ -59365,7 +57056,7 @@ public final class ContextOuterClass { public static final int ACTION_FIELD_NUMBER = 1; - private int action_; + private int action_ = 0; /** * <code>.context.ConfigActionEnum action = 1;</code> @@ -59382,8 +57073,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.ConfigActionEnum getAction() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.ConfigActionEnum result = context.ContextOuterClass.ConfigActionEnum.valueOf(action_); + context.ContextOuterClass.ConfigActionEnum result = context.ContextOuterClass.ConfigActionEnum.forNumber(action_); return result == null ? context.ContextOuterClass.ConfigActionEnum.UNRECOGNIZED : result; } @@ -59479,7 +57169,7 @@ public final class ContextOuterClass { if (configRuleCase_ == 3) { output.writeMessage(3, (context.ContextOuterClass.ConfigRule_ACL) configRule_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -59497,7 +57187,7 @@ public final class ContextOuterClass { if (configRuleCase_ == 3) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, (context.ContextOuterClass.ConfigRule_ACL) configRule_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -59527,7 +57217,7 @@ public final class ContextOuterClass { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -59553,7 +57243,7 @@ public final class ContextOuterClass { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -59647,23 +57337,23 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.ConfigRule.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; action_ = 0; + if (customBuilder_ != null) { + customBuilder_.clear(); + } + if (aclBuilder_ != null) { + aclBuilder_.clear(); + } configRuleCase_ = 0; configRule_ = null; return this; @@ -59691,54 +57381,30 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.ConfigRule buildPartial() { context.ContextOuterClass.ConfigRule result = new context.ContextOuterClass.ConfigRule(this); - result.action_ = action_; - if (configRuleCase_ == 2) { - if (customBuilder_ == null) { - result.configRule_ = configRule_; - } else { - result.configRule_ = customBuilder_.build(); - } + if (bitField0_ != 0) { + buildPartial0(result); } - if (configRuleCase_ == 3) { - if (aclBuilder_ == null) { - result.configRule_ = configRule_; - } else { - result.configRule_ = aclBuilder_.build(); - } - } - result.configRuleCase_ = configRuleCase_; + buildPartialOneofs(result); onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); + private void buildPartial0(context.ContextOuterClass.ConfigRule result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.action_ = action_; + } } - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartialOneofs(context.ContextOuterClass.ConfigRule result) { + result.configRuleCase_ = configRuleCase_; + result.configRule_ = this.configRule_; + if (configRuleCase_ == 2 && customBuilder_ != null) { + result.configRule_ = customBuilder_.build(); + } + if (configRuleCase_ == 3 && aclBuilder_ != null) { + result.configRule_ = aclBuilder_.build(); + } } @java.lang.Override @@ -59773,7 +57439,7 @@ public final class ContextOuterClass { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -59785,17 +57451,56 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.ConfigRule parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 8: + { + action_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } + // case 8 + case 18: + { + input.readMessage(getCustomFieldBuilder().getBuilder(), extensionRegistry); + configRuleCase_ = 2; + break; + } + // case 18 + case 26: + { + input.readMessage(getAclFieldBuilder().getBuilder(), extensionRegistry); + configRuleCase_ = 3; + break; + } + // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.ConfigRule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -59814,6 +57519,8 @@ public final class ContextOuterClass { return this; } + private int bitField0_; + private int action_ = 0; /** @@ -59832,6 +57539,7 @@ public final class ContextOuterClass { */ public Builder setActionValue(int value) { action_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -59842,8 +57550,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.ConfigActionEnum getAction() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.ConfigActionEnum result = context.ContextOuterClass.ConfigActionEnum.valueOf(action_); + context.ContextOuterClass.ConfigActionEnum result = context.ContextOuterClass.ConfigActionEnum.forNumber(action_); return result == null ? context.ContextOuterClass.ConfigActionEnum.UNRECOGNIZED : result; } @@ -59856,6 +57563,7 @@ public final class ContextOuterClass { if (value == null) { throw new NullPointerException(); } + bitField0_ |= 0x00000001; action_ = value.getNumber(); onChanged(); return this; @@ -59866,6 +57574,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearAction() { + bitField0_ = (bitField0_ & ~0x00000001); action_ = 0; onChanged(); return this; @@ -59946,8 +57655,9 @@ public final class ContextOuterClass { } else { if (configRuleCase_ == 2) { customBuilder_.mergeFrom(value); + } else { + customBuilder_.setMessage(value); } - customBuilder_.setMessage(value); } configRuleCase_ = 2; return this; @@ -60008,7 +57718,6 @@ public final class ContextOuterClass { } configRuleCase_ = 2; onChanged(); - ; return customBuilder_; } @@ -60087,8 +57796,9 @@ public final class ContextOuterClass { } else { if (configRuleCase_ == 3) { aclBuilder_.mergeFrom(value); + } else { + aclBuilder_.setMessage(value); } - aclBuilder_.setMessage(value); } configRuleCase_ = 3; return this; @@ -60149,7 +57859,6 @@ public final class ContextOuterClass { } configRuleCase_ = 3; onChanged(); - ; return aclBuilder_; } @@ -60180,7 +57889,17 @@ public final class ContextOuterClass { @java.lang.Override public ConfigRule parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ConfigRule(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -60251,56 +57970,6 @@ public final class ContextOuterClass { return new Constraint_Custom(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Constraint_Custom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - constraintType_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - constraintValue_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_Constraint_Custom_descriptor; } @@ -60312,7 +57981,8 @@ public final class ContextOuterClass { public static final int CONSTRAINT_TYPE_FIELD_NUMBER = 1; - private volatile java.lang.Object constraintType_; + @SuppressWarnings("serial") + private volatile java.lang.Object constraintType_ = ""; /** * <code>string constraint_type = 1;</code> @@ -60349,7 +58019,8 @@ public final class ContextOuterClass { public static final int CONSTRAINT_VALUE_FIELD_NUMBER = 2; - private volatile java.lang.Object constraintValue_; + @SuppressWarnings("serial") + private volatile java.lang.Object constraintValue_ = ""; /** * <code>string constraint_value = 2;</code> @@ -60399,13 +58070,13 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getConstraintTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(constraintType_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, constraintType_); } - if (!getConstraintValueBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(constraintValue_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, constraintValue_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -60414,13 +58085,13 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (!getConstraintTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(constraintType_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, constraintType_); } - if (!getConstraintValueBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(constraintValue_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, constraintValue_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -60438,7 +58109,7 @@ public final class ContextOuterClass { return false; if (!getConstraintValue().equals(other.getConstraintValue())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -60454,7 +58125,7 @@ public final class ContextOuterClass { hash = (53 * hash) + getConstraintType().hashCode(); hash = (37 * hash) + CONSTRAINT_VALUE_FIELD_NUMBER; hash = (53 * hash) + getConstraintValue().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -60548,22 +58219,16 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.Constraint_Custom.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; constraintType_ = ""; constraintValue_ = ""; return this; @@ -60591,40 +58256,21 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.Constraint_Custom buildPartial() { context.ContextOuterClass.Constraint_Custom result = new context.ContextOuterClass.Constraint_Custom(this); - result.constraintType_ = constraintType_; - result.constraintValue_ = constraintValue_; + if (bitField0_ != 0) { + buildPartial0(result); + } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.Constraint_Custom result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.constraintType_ = constraintType_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.constraintValue_ = constraintValue_; + } } @java.lang.Override @@ -60642,13 +58288,15 @@ public final class ContextOuterClass { return this; if (!other.getConstraintType().isEmpty()) { constraintType_ = other.constraintType_; + bitField0_ |= 0x00000001; onChanged(); } if (!other.getConstraintValue().isEmpty()) { constraintValue_ = other.constraintValue_; + bitField0_ |= 0x00000002; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -60660,20 +58308,54 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.Constraint_Custom parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + constraintType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + constraintValue_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Constraint_Custom) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private java.lang.Object constraintType_ = ""; /** @@ -60717,6 +58399,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } constraintType_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -60727,6 +58410,7 @@ public final class ContextOuterClass { */ public Builder clearConstraintType() { constraintType_ = getDefaultInstance().getConstraintType(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -60742,6 +58426,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); constraintType_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -60789,6 +58474,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } constraintValue_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -60799,6 +58485,7 @@ public final class ContextOuterClass { */ public Builder clearConstraintValue() { constraintValue_ = getDefaultInstance().getConstraintValue(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -60814,6 +58501,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); constraintValue_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -60845,7 +58533,17 @@ public final class ContextOuterClass { @java.lang.Override public Constraint_Custom parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Constraint_Custom(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -60902,54 +58600,6 @@ public final class ContextOuterClass { return new Constraint_Schedule(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Constraint_Schedule(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 13: - { - startTimestamp_ = input.readFloat(); - break; - } - case 21: - { - durationDays_ = input.readFloat(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_Constraint_Schedule_descriptor; } @@ -60961,7 +58611,7 @@ public final class ContextOuterClass { public static final int START_TIMESTAMP_FIELD_NUMBER = 1; - private float startTimestamp_; + private float startTimestamp_ = 0F; /** * <code>float start_timestamp = 1;</code> @@ -60974,7 +58624,7 @@ public final class ContextOuterClass { public static final int DURATION_DAYS_FIELD_NUMBER = 2; - private float durationDays_; + private float durationDays_ = 0F; /** * <code>float duration_days = 2;</code> @@ -61000,13 +58650,13 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (startTimestamp_ != 0F) { + if (java.lang.Float.floatToRawIntBits(startTimestamp_) != 0) { output.writeFloat(1, startTimestamp_); } - if (durationDays_ != 0F) { + if (java.lang.Float.floatToRawIntBits(durationDays_) != 0) { output.writeFloat(2, durationDays_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -61015,13 +58665,13 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (startTimestamp_ != 0F) { + if (java.lang.Float.floatToRawIntBits(startTimestamp_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, startTimestamp_); } - if (durationDays_ != 0F) { + if (java.lang.Float.floatToRawIntBits(durationDays_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, durationDays_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -61039,7 +58689,7 @@ public final class ContextOuterClass { return false; if (java.lang.Float.floatToIntBits(getDurationDays()) != java.lang.Float.floatToIntBits(other.getDurationDays())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -61055,7 +58705,7 @@ public final class ContextOuterClass { hash = (53 * hash) + java.lang.Float.floatToIntBits(getStartTimestamp()); hash = (37 * hash) + DURATION_DAYS_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits(getDurationDays()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -61149,22 +58799,16 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.Constraint_Schedule.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; startTimestamp_ = 0F; durationDays_ = 0F; return this; @@ -61192,40 +58836,21 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.Constraint_Schedule buildPartial() { context.ContextOuterClass.Constraint_Schedule result = new context.ContextOuterClass.Constraint_Schedule(this); - result.startTimestamp_ = startTimestamp_; - result.durationDays_ = durationDays_; + if (bitField0_ != 0) { + buildPartial0(result); + } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.Constraint_Schedule result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.startTimestamp_ = startTimestamp_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.durationDays_ = durationDays_; + } } @java.lang.Override @@ -61247,7 +58872,7 @@ public final class ContextOuterClass { if (other.getDurationDays() != 0F) { setDurationDays(other.getDurationDays()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -61259,20 +58884,54 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.Constraint_Schedule parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 13: + { + startTimestamp_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } + // case 13 + case 21: + { + durationDays_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } + // case 21 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Constraint_Schedule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private float startTimestamp_; /** @@ -61291,6 +58950,7 @@ public final class ContextOuterClass { */ public Builder setStartTimestamp(float value) { startTimestamp_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -61300,6 +58960,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearStartTimestamp() { + bitField0_ = (bitField0_ & ~0x00000001); startTimestamp_ = 0F; onChanged(); return this; @@ -61323,6 +58984,7 @@ public final class ContextOuterClass { */ public Builder setDurationDays(float value) { durationDays_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -61332,6 +58994,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearDurationDays() { + bitField0_ = (bitField0_ & ~0x00000002); durationDays_ = 0F; onChanged(); return this; @@ -61364,7 +59027,17 @@ public final class ContextOuterClass { @java.lang.Override public Constraint_Schedule parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Constraint_Schedule(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -61421,54 +59094,6 @@ public final class ContextOuterClass { return new GPS_Position(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private GPS_Position(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 13: - { - latitude_ = input.readFloat(); - break; - } - case 21: - { - longitude_ = input.readFloat(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_GPS_Position_descriptor; } @@ -61480,7 +59105,7 @@ public final class ContextOuterClass { public static final int LATITUDE_FIELD_NUMBER = 1; - private float latitude_; + private float latitude_ = 0F; /** * <code>float latitude = 1;</code> @@ -61493,7 +59118,7 @@ public final class ContextOuterClass { public static final int LONGITUDE_FIELD_NUMBER = 2; - private float longitude_; + private float longitude_ = 0F; /** * <code>float longitude = 2;</code> @@ -61519,13 +59144,13 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (latitude_ != 0F) { + if (java.lang.Float.floatToRawIntBits(latitude_) != 0) { output.writeFloat(1, latitude_); } - if (longitude_ != 0F) { + if (java.lang.Float.floatToRawIntBits(longitude_) != 0) { output.writeFloat(2, longitude_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -61534,13 +59159,13 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (latitude_ != 0F) { + if (java.lang.Float.floatToRawIntBits(latitude_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, latitude_); } - if (longitude_ != 0F) { + if (java.lang.Float.floatToRawIntBits(longitude_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, longitude_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -61558,7 +59183,7 @@ public final class ContextOuterClass { return false; if (java.lang.Float.floatToIntBits(getLongitude()) != java.lang.Float.floatToIntBits(other.getLongitude())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -61574,7 +59199,7 @@ public final class ContextOuterClass { hash = (53 * hash) + java.lang.Float.floatToIntBits(getLatitude()); hash = (37 * hash) + LONGITUDE_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits(getLongitude()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -61668,22 +59293,16 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.GPS_Position.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; latitude_ = 0F; longitude_ = 0F; return this; @@ -61711,40 +59330,21 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.GPS_Position buildPartial() { context.ContextOuterClass.GPS_Position result = new context.ContextOuterClass.GPS_Position(this); - result.latitude_ = latitude_; - result.longitude_ = longitude_; + if (bitField0_ != 0) { + buildPartial0(result); + } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.GPS_Position result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.latitude_ = latitude_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.longitude_ = longitude_; + } } @java.lang.Override @@ -61766,7 +59366,7 @@ public final class ContextOuterClass { if (other.getLongitude() != 0F) { setLongitude(other.getLongitude()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -61778,20 +59378,54 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.GPS_Position parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 13: + { + latitude_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } + // case 13 + case 21: + { + longitude_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } + // case 21 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.GPS_Position) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private float latitude_; /** @@ -61810,6 +59444,7 @@ public final class ContextOuterClass { */ public Builder setLatitude(float value) { latitude_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -61819,6 +59454,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearLatitude() { + bitField0_ = (bitField0_ & ~0x00000001); latitude_ = 0F; onChanged(); return this; @@ -61842,6 +59478,7 @@ public final class ContextOuterClass { */ public Builder setLongitude(float value) { longitude_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -61851,6 +59488,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearLongitude() { + bitField0_ = (bitField0_ & ~0x00000002); longitude_ = 0F; onChanged(); return this; @@ -61883,7 +59521,17 @@ public final class ContextOuterClass { @java.lang.Override public GPS_Position parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GPS_Position(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -61940,7 +59588,7 @@ public final class ContextOuterClass { */ context.ContextOuterClass.GPS_PositionOrBuilder getGpsPositionOrBuilder(); - public context.ContextOuterClass.Location.LocationCase getLocationCase(); + context.ContextOuterClass.Location.LocationCase getLocationCase(); } /** @@ -61965,65 +59613,6 @@ public final class ContextOuterClass { return new Location(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Location(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - locationCase_ = 1; - location_ = s; - break; - } - case 18: - { - context.ContextOuterClass.GPS_Position.Builder subBuilder = null; - if (locationCase_ == 2) { - subBuilder = ((context.ContextOuterClass.GPS_Position) location_).toBuilder(); - } - location_ = input.readMessage(context.ContextOuterClass.GPS_Position.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((context.ContextOuterClass.GPS_Position) location_); - location_ = subBuilder.buildPartial(); - } - locationCase_ = 2; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_Location_descriptor; } @@ -62035,6 +59624,7 @@ public final class ContextOuterClass { private int locationCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object location_; public enum LocationCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { @@ -62185,7 +59775,7 @@ public final class ContextOuterClass { if (locationCase_ == 2) { output.writeMessage(2, (context.ContextOuterClass.GPS_Position) location_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -62200,7 +59790,7 @@ public final class ContextOuterClass { if (locationCase_ == 2) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, (context.ContextOuterClass.GPS_Position) location_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -62228,7 +59818,7 @@ public final class ContextOuterClass { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -62252,7 +59842,7 @@ public final class ContextOuterClass { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -62346,22 +59936,19 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.Location.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; + if (gpsPositionBuilder_ != null) { + gpsPositionBuilder_.clear(); + } locationCase_ = 0; location_ = null; return this; @@ -62389,49 +59976,24 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.Location buildPartial() { context.ContextOuterClass.Location result = new context.ContextOuterClass.Location(this); - if (locationCase_ == 1) { - result.location_ = location_; - } - if (locationCase_ == 2) { - if (gpsPositionBuilder_ == null) { - result.location_ = location_; - } else { - result.location_ = gpsPositionBuilder_.build(); - } + if (bitField0_ != 0) { + buildPartial0(result); } - result.locationCase_ = locationCase_; + buildPartialOneofs(result); onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); + private void buildPartial0(context.ContextOuterClass.Location result) { + int from_bitField0_ = bitField0_; } - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartialOneofs(context.ContextOuterClass.Location result) { + result.locationCase_ = locationCase_; + result.location_ = this.location_; + if (locationCase_ == 2 && gpsPositionBuilder_ != null) { + result.location_ = gpsPositionBuilder_.build(); + } } @java.lang.Override @@ -62465,7 +60027,7 @@ public final class ContextOuterClass { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -62477,17 +60039,50 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.Location parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + locationCase_ = 1; + location_ = s; + break; + } + // case 10 + case 18: + { + input.readMessage(getGpsPositionFieldBuilder().getBuilder(), extensionRegistry); + locationCase_ = 2; + break; + } + // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Location) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -62506,6 +60101,8 @@ public final class ContextOuterClass { return this; } + private int bitField0_; + /** * <code>string region = 1;</code> * @return Whether the region field is set. @@ -62677,8 +60274,9 @@ public final class ContextOuterClass { } else { if (locationCase_ == 2) { gpsPositionBuilder_.mergeFrom(value); + } else { + gpsPositionBuilder_.setMessage(value); } - gpsPositionBuilder_.setMessage(value); } locationCase_ = 2; return this; @@ -62739,7 +60337,6 @@ public final class ContextOuterClass { } locationCase_ = 2; onChanged(); - ; return gpsPositionBuilder_; } @@ -62770,7 +60367,17 @@ public final class ContextOuterClass { @java.lang.Override public Location parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Location(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -62849,70 +60456,6 @@ public final class ContextOuterClass { return new Constraint_EndPointLocation(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Constraint_EndPointLocation(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.EndPointId.Builder subBuilder = null; - if (endpointId_ != null) { - subBuilder = endpointId_.toBuilder(); - } - endpointId_ = input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endpointId_); - endpointId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - context.ContextOuterClass.Location.Builder subBuilder = null; - if (location_ != null) { - subBuilder = location_.toBuilder(); - } - location_ = input.readMessage(context.ContextOuterClass.Location.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(location_); - location_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_Constraint_EndPointLocation_descriptor; } @@ -62949,7 +60492,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { - return getEndpointId(); + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; } public static final int LOCATION_FIELD_NUMBER = 2; @@ -62979,7 +60522,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.LocationOrBuilder getLocationOrBuilder() { - return getLocation(); + return location_ == null ? context.ContextOuterClass.Location.getDefaultInstance() : location_; } private byte memoizedIsInitialized = -1; @@ -63003,7 +60546,7 @@ public final class ContextOuterClass { if (location_ != null) { output.writeMessage(2, getLocation()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -63018,7 +60561,7 @@ public final class ContextOuterClass { if (location_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getLocation()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -63044,7 +60587,7 @@ public final class ContextOuterClass { if (!getLocation().equals(other.getLocation())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -63064,7 +60607,7 @@ public final class ContextOuterClass { hash = (37 * hash) + LOCATION_FIELD_NUMBER; hash = (53 * hash) + getLocation().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -63158,32 +60701,24 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.Constraint_EndPointLocation.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (endpointIdBuilder_ == null) { - endpointId_ = null; - } else { - endpointId_ = null; + bitField0_ = 0; + endpointId_ = null; + if (endpointIdBuilder_ != null) { + endpointIdBuilder_.dispose(); endpointIdBuilder_ = null; } - if (locationBuilder_ == null) { - location_ = null; - } else { - location_ = null; + location_ = null; + if (locationBuilder_ != null) { + locationBuilder_.dispose(); locationBuilder_ = null; } return this; @@ -63211,48 +60746,21 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.Constraint_EndPointLocation buildPartial() { context.ContextOuterClass.Constraint_EndPointLocation result = new context.ContextOuterClass.Constraint_EndPointLocation(this); - if (endpointIdBuilder_ == null) { - result.endpointId_ = endpointId_; - } else { - result.endpointId_ = endpointIdBuilder_.build(); - } - if (locationBuilder_ == null) { - result.location_ = location_; - } else { - result.location_ = locationBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.Constraint_EndPointLocation result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.endpointId_ = endpointIdBuilder_ == null ? endpointId_ : endpointIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.location_ = locationBuilder_ == null ? location_ : locationBuilder_.build(); + } } @java.lang.Override @@ -63274,7 +60782,7 @@ public final class ContextOuterClass { if (other.hasLocation()) { mergeLocation(other.getLocation()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -63286,20 +60794,54 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.Constraint_EndPointLocation parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getEndpointIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + input.readMessage(getLocationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } + // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Constraint_EndPointLocation) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.EndPointId endpointId_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> endpointIdBuilder_; @@ -63309,7 +60851,7 @@ public final class ContextOuterClass { * @return Whether the endpointId field is set. */ public boolean hasEndpointId() { - return endpointIdBuilder_ != null || endpointId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -63333,10 +60875,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } endpointId_ = value; - onChanged(); } else { endpointIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -63346,10 +60889,11 @@ public final class ContextOuterClass { public Builder setEndpointId(context.ContextOuterClass.EndPointId.Builder builderForValue) { if (endpointIdBuilder_ == null) { endpointId_ = builderForValue.build(); - onChanged(); } else { endpointIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -63358,15 +60902,16 @@ public final class ContextOuterClass { */ public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) { if (endpointIdBuilder_ == null) { - if (endpointId_ != null) { - endpointId_ = context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && endpointId_ != null && endpointId_ != context.ContextOuterClass.EndPointId.getDefaultInstance()) { + getEndpointIdBuilder().mergeFrom(value); } else { endpointId_ = value; } - onChanged(); } else { endpointIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -63374,13 +60919,13 @@ public final class ContextOuterClass { * <code>.context.EndPointId endpoint_id = 1;</code> */ public Builder clearEndpointId() { - if (endpointIdBuilder_ == null) { - endpointId_ = null; - onChanged(); - } else { - endpointId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + endpointId_ = null; + if (endpointIdBuilder_ != null) { + endpointIdBuilder_.dispose(); endpointIdBuilder_ = null; } + onChanged(); return this; } @@ -63388,6 +60933,7 @@ public final class ContextOuterClass { * <code>.context.EndPointId endpoint_id = 1;</code> */ public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getEndpointIdFieldBuilder().getBuilder(); } @@ -63423,7 +60969,7 @@ public final class ContextOuterClass { * @return Whether the location field is set. */ public boolean hasLocation() { - return locationBuilder_ != null || location_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** @@ -63447,10 +60993,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } location_ = value; - onChanged(); } else { locationBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -63460,10 +61007,11 @@ public final class ContextOuterClass { public Builder setLocation(context.ContextOuterClass.Location.Builder builderForValue) { if (locationBuilder_ == null) { location_ = builderForValue.build(); - onChanged(); } else { locationBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -63472,15 +61020,16 @@ public final class ContextOuterClass { */ public Builder mergeLocation(context.ContextOuterClass.Location value) { if (locationBuilder_ == null) { - if (location_ != null) { - location_ = context.ContextOuterClass.Location.newBuilder(location_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000002) != 0) && location_ != null && location_ != context.ContextOuterClass.Location.getDefaultInstance()) { + getLocationBuilder().mergeFrom(value); } else { location_ = value; } - onChanged(); } else { locationBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -63488,13 +61037,13 @@ public final class ContextOuterClass { * <code>.context.Location location = 2;</code> */ public Builder clearLocation() { - if (locationBuilder_ == null) { - location_ = null; - onChanged(); - } else { - location_ = null; + bitField0_ = (bitField0_ & ~0x00000002); + location_ = null; + if (locationBuilder_ != null) { + locationBuilder_.dispose(); locationBuilder_ = null; } + onChanged(); return this; } @@ -63502,6 +61051,7 @@ public final class ContextOuterClass { * <code>.context.Location location = 2;</code> */ public context.ContextOuterClass.Location.Builder getLocationBuilder() { + bitField0_ |= 0x00000002; onChanged(); return getLocationFieldBuilder().getBuilder(); } @@ -63555,7 +61105,17 @@ public final class ContextOuterClass { @java.lang.Override public Constraint_EndPointLocation parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Constraint_EndPointLocation(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -63623,62 +61183,6 @@ public final class ContextOuterClass { return new Constraint_EndPointPriority(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Constraint_EndPointPriority(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.EndPointId.Builder subBuilder = null; - if (endpointId_ != null) { - subBuilder = endpointId_.toBuilder(); - } - endpointId_ = input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endpointId_); - endpointId_ = subBuilder.buildPartial(); - } - break; - } - case 16: - { - priority_ = input.readUInt32(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_Constraint_EndPointPriority_descriptor; } @@ -63715,12 +61219,12 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { - return getEndpointId(); + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; } public static final int PRIORITY_FIELD_NUMBER = 2; - private int priority_; + private int priority_ = 0; /** * <code>uint32 priority = 2;</code> @@ -63752,7 +61256,7 @@ public final class ContextOuterClass { if (priority_ != 0) { output.writeUInt32(2, priority_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -63767,7 +61271,7 @@ public final class ContextOuterClass { if (priority_ != 0) { size += com.google.protobuf.CodedOutputStream.computeUInt32Size(2, priority_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -63789,7 +61293,7 @@ public final class ContextOuterClass { } if (getPriority() != other.getPriority()) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -63807,7 +61311,7 @@ public final class ContextOuterClass { } hash = (37 * hash) + PRIORITY_FIELD_NUMBER; hash = (53 * hash) + getPriority(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -63901,26 +61405,19 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.Constraint_EndPointPriority.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (endpointIdBuilder_ == null) { - endpointId_ = null; - } else { - endpointId_ = null; + bitField0_ = 0; + endpointId_ = null; + if (endpointIdBuilder_ != null) { + endpointIdBuilder_.dispose(); endpointIdBuilder_ = null; } priority_ = 0; @@ -63949,44 +61446,21 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.Constraint_EndPointPriority buildPartial() { context.ContextOuterClass.Constraint_EndPointPriority result = new context.ContextOuterClass.Constraint_EndPointPriority(this); - if (endpointIdBuilder_ == null) { - result.endpointId_ = endpointId_; - } else { - result.endpointId_ = endpointIdBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } - result.priority_ = priority_; onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.Constraint_EndPointPriority result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.endpointId_ = endpointIdBuilder_ == null ? endpointId_ : endpointIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.priority_ = priority_; + } } @java.lang.Override @@ -64008,7 +61482,7 @@ public final class ContextOuterClass { if (other.getPriority() != 0) { setPriority(other.getPriority()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -64020,20 +61494,54 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.Constraint_EndPointPriority parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getEndpointIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 16: + { + priority_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } + // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Constraint_EndPointPriority) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.EndPointId endpointId_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> endpointIdBuilder_; @@ -64043,7 +61551,7 @@ public final class ContextOuterClass { * @return Whether the endpointId field is set. */ public boolean hasEndpointId() { - return endpointIdBuilder_ != null || endpointId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -64067,10 +61575,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } endpointId_ = value; - onChanged(); } else { endpointIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -64080,10 +61589,11 @@ public final class ContextOuterClass { public Builder setEndpointId(context.ContextOuterClass.EndPointId.Builder builderForValue) { if (endpointIdBuilder_ == null) { endpointId_ = builderForValue.build(); - onChanged(); } else { endpointIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -64092,15 +61602,16 @@ public final class ContextOuterClass { */ public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) { if (endpointIdBuilder_ == null) { - if (endpointId_ != null) { - endpointId_ = context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && endpointId_ != null && endpointId_ != context.ContextOuterClass.EndPointId.getDefaultInstance()) { + getEndpointIdBuilder().mergeFrom(value); } else { endpointId_ = value; } - onChanged(); } else { endpointIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -64108,13 +61619,13 @@ public final class ContextOuterClass { * <code>.context.EndPointId endpoint_id = 1;</code> */ public Builder clearEndpointId() { - if (endpointIdBuilder_ == null) { - endpointId_ = null; - onChanged(); - } else { - endpointId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + endpointId_ = null; + if (endpointIdBuilder_ != null) { + endpointIdBuilder_.dispose(); endpointIdBuilder_ = null; } + onChanged(); return this; } @@ -64122,6 +61633,7 @@ public final class ContextOuterClass { * <code>.context.EndPointId endpoint_id = 1;</code> */ public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getEndpointIdFieldBuilder().getBuilder(); } @@ -64166,6 +61678,7 @@ public final class ContextOuterClass { */ public Builder setPriority(int value) { priority_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -64175,6 +61688,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearPriority() { + bitField0_ = (bitField0_ & ~0x00000002); priority_ = 0; onChanged(); return this; @@ -64207,7 +61721,17 @@ public final class ContextOuterClass { @java.lang.Override public Constraint_EndPointPriority parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Constraint_EndPointPriority(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -64258,49 +61782,6 @@ public final class ContextOuterClass { return new Constraint_SLA_Latency(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Constraint_SLA_Latency(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 13: - { - e2ELatencyMs_ = input.readFloat(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_Constraint_SLA_Latency_descriptor; } @@ -64312,7 +61793,7 @@ public final class ContextOuterClass { public static final int E2E_LATENCY_MS_FIELD_NUMBER = 1; - private float e2ELatencyMs_; + private float e2ELatencyMs_ = 0F; /** * <code>float e2e_latency_ms = 1;</code> @@ -64338,10 +61819,10 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (e2ELatencyMs_ != 0F) { + if (java.lang.Float.floatToRawIntBits(e2ELatencyMs_) != 0) { output.writeFloat(1, e2ELatencyMs_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -64350,10 +61831,10 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (e2ELatencyMs_ != 0F) { + if (java.lang.Float.floatToRawIntBits(e2ELatencyMs_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, e2ELatencyMs_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -64369,7 +61850,7 @@ public final class ContextOuterClass { context.ContextOuterClass.Constraint_SLA_Latency other = (context.ContextOuterClass.Constraint_SLA_Latency) obj; if (java.lang.Float.floatToIntBits(getE2ELatencyMs()) != java.lang.Float.floatToIntBits(other.getE2ELatencyMs())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -64383,7 +61864,7 @@ public final class ContextOuterClass { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + E2E_LATENCY_MS_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits(getE2ELatencyMs()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -64477,22 +61958,16 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.Constraint_SLA_Latency.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; e2ELatencyMs_ = 0F; return this; } @@ -64519,39 +61994,18 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.Constraint_SLA_Latency buildPartial() { context.ContextOuterClass.Constraint_SLA_Latency result = new context.ContextOuterClass.Constraint_SLA_Latency(this); - result.e2ELatencyMs_ = e2ELatencyMs_; + if (bitField0_ != 0) { + buildPartial0(result); + } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.Constraint_SLA_Latency result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.e2ELatencyMs_ = e2ELatencyMs_; + } } @java.lang.Override @@ -64570,7 +62024,7 @@ public final class ContextOuterClass { if (other.getE2ELatencyMs() != 0F) { setE2ELatencyMs(other.getE2ELatencyMs()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -64582,20 +62036,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.Constraint_SLA_Latency parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 13: + { + e2ELatencyMs_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } + // case 13 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Constraint_SLA_Latency) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private float e2ELatencyMs_; /** @@ -64614,6 +62095,7 @@ public final class ContextOuterClass { */ public Builder setE2ELatencyMs(float value) { e2ELatencyMs_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -64623,6 +62105,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearE2ELatencyMs() { + bitField0_ = (bitField0_ & ~0x00000001); e2ELatencyMs_ = 0F; onChanged(); return this; @@ -64655,7 +62138,17 @@ public final class ContextOuterClass { @java.lang.Override public Constraint_SLA_Latency parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Constraint_SLA_Latency(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -64706,49 +62199,6 @@ public final class ContextOuterClass { return new Constraint_SLA_Capacity(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Constraint_SLA_Capacity(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 13: - { - capacityGbps_ = input.readFloat(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_Constraint_SLA_Capacity_descriptor; } @@ -64760,7 +62210,7 @@ public final class ContextOuterClass { public static final int CAPACITY_GBPS_FIELD_NUMBER = 1; - private float capacityGbps_; + private float capacityGbps_ = 0F; /** * <code>float capacity_gbps = 1;</code> @@ -64786,10 +62236,10 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (capacityGbps_ != 0F) { + if (java.lang.Float.floatToRawIntBits(capacityGbps_) != 0) { output.writeFloat(1, capacityGbps_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -64798,10 +62248,10 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (capacityGbps_ != 0F) { + if (java.lang.Float.floatToRawIntBits(capacityGbps_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, capacityGbps_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -64817,7 +62267,7 @@ public final class ContextOuterClass { context.ContextOuterClass.Constraint_SLA_Capacity other = (context.ContextOuterClass.Constraint_SLA_Capacity) obj; if (java.lang.Float.floatToIntBits(getCapacityGbps()) != java.lang.Float.floatToIntBits(other.getCapacityGbps())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -64831,7 +62281,7 @@ public final class ContextOuterClass { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + CAPACITY_GBPS_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits(getCapacityGbps()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -64925,22 +62375,16 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.Constraint_SLA_Capacity.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; capacityGbps_ = 0F; return this; } @@ -64967,39 +62411,18 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.Constraint_SLA_Capacity buildPartial() { context.ContextOuterClass.Constraint_SLA_Capacity result = new context.ContextOuterClass.Constraint_SLA_Capacity(this); - result.capacityGbps_ = capacityGbps_; + if (bitField0_ != 0) { + buildPartial0(result); + } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.Constraint_SLA_Capacity result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.capacityGbps_ = capacityGbps_; + } } @java.lang.Override @@ -65018,7 +62441,7 @@ public final class ContextOuterClass { if (other.getCapacityGbps() != 0F) { setCapacityGbps(other.getCapacityGbps()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -65030,20 +62453,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.Constraint_SLA_Capacity parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 13: + { + capacityGbps_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } + // case 13 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Constraint_SLA_Capacity) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private float capacityGbps_; /** @@ -65062,6 +62512,7 @@ public final class ContextOuterClass { */ public Builder setCapacityGbps(float value) { capacityGbps_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -65071,6 +62522,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearCapacityGbps() { + bitField0_ = (bitField0_ & ~0x00000001); capacityGbps_ = 0F; onChanged(); return this; @@ -65103,7 +62555,17 @@ public final class ContextOuterClass { @java.lang.Override public Constraint_SLA_Capacity parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Constraint_SLA_Capacity(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -65170,59 +62632,6 @@ public final class ContextOuterClass { return new Constraint_SLA_Availability(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Constraint_SLA_Availability(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 8: - { - numDisjointPaths_ = input.readUInt32(); - break; - } - case 16: - { - allActive_ = input.readBool(); - break; - } - case 29: - { - availability_ = input.readFloat(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_Constraint_SLA_Availability_descriptor; } @@ -65234,7 +62643,7 @@ public final class ContextOuterClass { public static final int NUM_DISJOINT_PATHS_FIELD_NUMBER = 1; - private int numDisjointPaths_; + private int numDisjointPaths_ = 0; /** * <code>uint32 num_disjoint_paths = 1;</code> @@ -65247,7 +62656,7 @@ public final class ContextOuterClass { public static final int ALL_ACTIVE_FIELD_NUMBER = 2; - private boolean allActive_; + private boolean allActive_ = false; /** * <code>bool all_active = 2;</code> @@ -65260,7 +62669,7 @@ public final class ContextOuterClass { public static final int AVAILABILITY_FIELD_NUMBER = 3; - private float availability_; + private float availability_ = 0F; /** * <pre> @@ -65296,10 +62705,10 @@ public final class ContextOuterClass { if (allActive_ != false) { output.writeBool(2, allActive_); } - if (availability_ != 0F) { + if (java.lang.Float.floatToRawIntBits(availability_) != 0) { output.writeFloat(3, availability_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -65314,10 +62723,10 @@ public final class ContextOuterClass { if (allActive_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, allActive_); } - if (availability_ != 0F) { + if (java.lang.Float.floatToRawIntBits(availability_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, availability_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -65337,7 +62746,7 @@ public final class ContextOuterClass { return false; if (java.lang.Float.floatToIntBits(getAvailability()) != java.lang.Float.floatToIntBits(other.getAvailability())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -65355,7 +62764,7 @@ public final class ContextOuterClass { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllActive()); hash = (37 * hash) + AVAILABILITY_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits(getAvailability()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -65449,22 +62858,16 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.Constraint_SLA_Availability.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; numDisjointPaths_ = 0; allActive_ = false; availability_ = 0F; @@ -65493,41 +62896,24 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.Constraint_SLA_Availability buildPartial() { context.ContextOuterClass.Constraint_SLA_Availability result = new context.ContextOuterClass.Constraint_SLA_Availability(this); - result.numDisjointPaths_ = numDisjointPaths_; - result.allActive_ = allActive_; - result.availability_ = availability_; + if (bitField0_ != 0) { + buildPartial0(result); + } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.Constraint_SLA_Availability result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.numDisjointPaths_ = numDisjointPaths_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.allActive_ = allActive_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.availability_ = availability_; + } } @java.lang.Override @@ -65552,7 +62938,7 @@ public final class ContextOuterClass { if (other.getAvailability() != 0F) { setAvailability(other.getAvailability()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -65564,20 +62950,61 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.Constraint_SLA_Availability parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 8: + { + numDisjointPaths_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } + // case 8 + case 16: + { + allActive_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } + // case 16 + case 29: + { + availability_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } + // case 29 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Constraint_SLA_Availability) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private int numDisjointPaths_; /** @@ -65596,6 +63023,7 @@ public final class ContextOuterClass { */ public Builder setNumDisjointPaths(int value) { numDisjointPaths_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -65605,6 +63033,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearNumDisjointPaths() { + bitField0_ = (bitField0_ & ~0x00000001); numDisjointPaths_ = 0; onChanged(); return this; @@ -65628,6 +63057,7 @@ public final class ContextOuterClass { */ public Builder setAllActive(boolean value) { allActive_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -65637,6 +63067,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearAllActive() { + bitField0_ = (bitField0_ & ~0x00000002); allActive_ = false; onChanged(); return this; @@ -65668,6 +63099,7 @@ public final class ContextOuterClass { */ public Builder setAvailability(float value) { availability_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -65681,6 +63113,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearAvailability() { + bitField0_ = (bitField0_ & ~0x00000004); availability_ = 0F; onChanged(); return this; @@ -65713,7 +63146,17 @@ public final class ContextOuterClass { @java.lang.Override public Constraint_SLA_Availability parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Constraint_SLA_Availability(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -65791,73 +63234,6 @@ public final class ContextOuterClass { return new Constraint_SLA_Isolation_level(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Constraint_SLA_Isolation_level(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 8: - { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - isolationLevel_ = new java.util.ArrayList<java.lang.Integer>(); - mutable_bitField0_ |= 0x00000001; - } - isolationLevel_.add(rawValue); - break; - } - case 10: - { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while (input.getBytesUntilLimit() > 0) { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - isolationLevel_ = new java.util.ArrayList<java.lang.Integer>(); - mutable_bitField0_ |= 0x00000001; - } - isolationLevel_.add(rawValue); - } - input.popLimit(oldLimit); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - isolationLevel_ = java.util.Collections.unmodifiableList(isolationLevel_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_Constraint_SLA_Isolation_level_descriptor; } @@ -65869,13 +63245,13 @@ public final class ContextOuterClass { public static final int ISOLATION_LEVEL_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List<java.lang.Integer> isolationLevel_; private static final com.google.protobuf.Internal.ListAdapter.Converter<java.lang.Integer, context.ContextOuterClass.IsolationLevelEnum> isolationLevel_converter_ = new com.google.protobuf.Internal.ListAdapter.Converter<java.lang.Integer, context.ContextOuterClass.IsolationLevelEnum>() { public context.ContextOuterClass.IsolationLevelEnum convert(java.lang.Integer from) { - @SuppressWarnings("deprecation") - context.ContextOuterClass.IsolationLevelEnum result = context.ContextOuterClass.IsolationLevelEnum.valueOf(from); + context.ContextOuterClass.IsolationLevelEnum result = context.ContextOuterClass.IsolationLevelEnum.forNumber(from); return result == null ? context.ContextOuterClass.IsolationLevelEnum.UNRECOGNIZED : result; } }; @@ -65952,7 +63328,7 @@ public final class ContextOuterClass { for (int i = 0; i < isolationLevel_.size(); i++) { output.writeEnumNoTag(isolationLevel_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -65973,7 +63349,7 @@ public final class ContextOuterClass { } isolationLevelMemoizedSerializedSize = dataSize; } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -65989,7 +63365,7 @@ public final class ContextOuterClass { context.ContextOuterClass.Constraint_SLA_Isolation_level other = (context.ContextOuterClass.Constraint_SLA_Isolation_level) obj; if (!isolationLevel_.equals(other.isolationLevel_)) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -66005,7 +63381,7 @@ public final class ContextOuterClass { hash = (37 * hash) + ISOLATION_LEVEL_FIELD_NUMBER; hash = (53 * hash) + isolationLevel_.hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -66099,22 +63475,16 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.Constraint_SLA_Isolation_level.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; isolationLevel_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); return this; @@ -66142,44 +63512,24 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.Constraint_SLA_Isolation_level buildPartial() { context.ContextOuterClass.Constraint_SLA_Isolation_level result = new context.ContextOuterClass.Constraint_SLA_Isolation_level(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - isolationLevel_ = java.util.Collections.unmodifiableList(isolationLevel_); - bitField0_ = (bitField0_ & ~0x00000001); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); } - result.isolationLevel_ = isolationLevel_; onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); + private void buildPartialRepeatedFields(context.ContextOuterClass.Constraint_SLA_Isolation_level result) { + if (((bitField0_ & 0x00000001) != 0)) { + isolationLevel_ = java.util.Collections.unmodifiableList(isolationLevel_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.isolationLevel_ = isolationLevel_; } - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.Constraint_SLA_Isolation_level result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -66205,7 +63555,7 @@ public final class ContextOuterClass { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -66217,17 +63567,56 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.Constraint_SLA_Isolation_level parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 8: + { + int tmpRaw = input.readEnum(); + ensureIsolationLevelIsMutable(); + isolationLevel_.add(tmpRaw); + break; + } + // case 8 + case 10: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureIsolationLevelIsMutable(); + isolationLevel_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Constraint_SLA_Isolation_level) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -66342,8 +63731,8 @@ public final class ContextOuterClass { /** * <code>repeated .context.IsolationLevelEnum isolation_level = 1;</code> - * @param index The index of the value to return. - * @return The enum numeric value on the wire of isolationLevel at the given index. + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for isolationLevel to set. * @return This builder for chaining. */ public Builder setIsolationLevelValue(int index, int value) { @@ -66406,7 +63795,17 @@ public final class ContextOuterClass { @java.lang.Override public Constraint_SLA_Isolation_level parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Constraint_SLA_Isolation_level(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -66535,86 +63934,6 @@ public final class ContextOuterClass { return new Constraint_Exclusions(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Constraint_Exclusions(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 8: - { - isPermanent_ = input.readBool(); - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - deviceIds_ = new java.util.ArrayList<context.ContextOuterClass.DeviceId>(); - mutable_bitField0_ |= 0x00000001; - } - deviceIds_.add(input.readMessage(context.ContextOuterClass.DeviceId.parser(), extensionRegistry)); - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - endpointIds_ = new java.util.ArrayList<context.ContextOuterClass.EndPointId>(); - mutable_bitField0_ |= 0x00000002; - } - endpointIds_.add(input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry)); - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - linkIds_ = new java.util.ArrayList<context.ContextOuterClass.LinkId>(); - mutable_bitField0_ |= 0x00000004; - } - linkIds_.add(input.readMessage(context.ContextOuterClass.LinkId.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - deviceIds_ = java.util.Collections.unmodifiableList(deviceIds_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - endpointIds_ = java.util.Collections.unmodifiableList(endpointIds_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - linkIds_ = java.util.Collections.unmodifiableList(linkIds_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_Constraint_Exclusions_descriptor; } @@ -66626,7 +63945,7 @@ public final class ContextOuterClass { public static final int IS_PERMANENT_FIELD_NUMBER = 1; - private boolean isPermanent_; + private boolean isPermanent_ = false; /** * <code>bool is_permanent = 1;</code> @@ -66639,6 +63958,7 @@ public final class ContextOuterClass { public static final int DEVICE_IDS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.DeviceId> deviceIds_; /** @@ -66683,6 +64003,7 @@ public final class ContextOuterClass { public static final int ENDPOINT_IDS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.EndPointId> endpointIds_; /** @@ -66727,6 +64048,7 @@ public final class ContextOuterClass { public static final int LINK_IDS_FIELD_NUMBER = 4; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.LinkId> linkIds_; /** @@ -66796,7 +64118,7 @@ public final class ContextOuterClass { for (int i = 0; i < linkIds_.size(); i++) { output.writeMessage(4, linkIds_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -66817,7 +64139,7 @@ public final class ContextOuterClass { for (int i = 0; i < linkIds_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, linkIds_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -66839,7 +64161,7 @@ public final class ContextOuterClass { return false; if (!getLinkIdsList().equals(other.getLinkIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -66865,7 +64187,7 @@ public final class ContextOuterClass { hash = (37 * hash) + LINK_IDS_FIELD_NUMBER; hash = (53 * hash) + getLinkIdsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -66959,44 +64281,38 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.Constraint_Exclusions.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getDeviceIdsFieldBuilder(); - getEndpointIdsFieldBuilder(); - getLinkIdsFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; isPermanent_ = false; if (deviceIdsBuilder_ == null) { deviceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + deviceIds_ = null; deviceIdsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); if (endpointIdsBuilder_ == null) { endpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + endpointIds_ = null; endpointIdsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); if (linkIdsBuilder_ == null) { linkIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + linkIds_ = null; linkIdsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -67022,67 +64338,49 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.Constraint_Exclusions buildPartial() { context.ContextOuterClass.Constraint_Exclusions result = new context.ContextOuterClass.Constraint_Exclusions(this); - int from_bitField0_ = bitField0_; - result.isPermanent_ = isPermanent_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.Constraint_Exclusions result) { if (deviceIdsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000002) != 0)) { deviceIds_ = java.util.Collections.unmodifiableList(deviceIds_); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); } result.deviceIds_ = deviceIds_; } else { result.deviceIds_ = deviceIdsBuilder_.build(); } if (endpointIdsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { endpointIds_ = java.util.Collections.unmodifiableList(endpointIds_); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); } result.endpointIds_ = endpointIds_; } else { result.endpointIds_ = endpointIdsBuilder_.build(); } if (linkIdsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { + if (((bitField0_ & 0x00000008) != 0)) { linkIds_ = java.util.Collections.unmodifiableList(linkIds_); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); } result.linkIds_ = linkIds_; } else { result.linkIds_ = linkIdsBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.Constraint_Exclusions result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.isPermanent_ = isPermanent_; + } } @java.lang.Override @@ -67105,7 +64403,7 @@ public final class ContextOuterClass { if (!other.deviceIds_.isEmpty()) { if (deviceIds_.isEmpty()) { deviceIds_ = other.deviceIds_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); } else { ensureDeviceIdsIsMutable(); deviceIds_.addAll(other.deviceIds_); @@ -67118,7 +64416,7 @@ public final class ContextOuterClass { deviceIdsBuilder_.dispose(); deviceIdsBuilder_ = null; deviceIds_ = other.deviceIds_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); deviceIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getDeviceIdsFieldBuilder() : null; } else { deviceIdsBuilder_.addAllMessages(other.deviceIds_); @@ -67129,7 +64427,7 @@ public final class ContextOuterClass { if (!other.endpointIds_.isEmpty()) { if (endpointIds_.isEmpty()) { endpointIds_ = other.endpointIds_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); } else { ensureEndpointIdsIsMutable(); endpointIds_.addAll(other.endpointIds_); @@ -67142,7 +64440,7 @@ public final class ContextOuterClass { endpointIdsBuilder_.dispose(); endpointIdsBuilder_ = null; endpointIds_ = other.endpointIds_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); endpointIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getEndpointIdsFieldBuilder() : null; } else { endpointIdsBuilder_.addAllMessages(other.endpointIds_); @@ -67153,7 +64451,7 @@ public final class ContextOuterClass { if (!other.linkIds_.isEmpty()) { if (linkIds_.isEmpty()) { linkIds_ = other.linkIds_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); } else { ensureLinkIdsIsMutable(); linkIds_.addAll(other.linkIds_); @@ -67166,14 +64464,14 @@ public final class ContextOuterClass { linkIdsBuilder_.dispose(); linkIdsBuilder_ = null; linkIds_ = other.linkIds_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); linkIdsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLinkIdsFieldBuilder() : null; } else { linkIdsBuilder_.addAllMessages(other.linkIds_); } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -67185,17 +64483,78 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.Constraint_Exclusions parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 8: + { + isPermanent_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } + // case 8 + case 18: + { + context.ContextOuterClass.DeviceId m = input.readMessage(context.ContextOuterClass.DeviceId.parser(), extensionRegistry); + if (deviceIdsBuilder_ == null) { + ensureDeviceIdsIsMutable(); + deviceIds_.add(m); + } else { + deviceIdsBuilder_.addMessage(m); + } + break; + } + // case 18 + case 26: + { + context.ContextOuterClass.EndPointId m = input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry); + if (endpointIdsBuilder_ == null) { + ensureEndpointIdsIsMutable(); + endpointIds_.add(m); + } else { + endpointIdsBuilder_.addMessage(m); + } + break; + } + // case 26 + case 34: + { + context.ContextOuterClass.LinkId m = input.readMessage(context.ContextOuterClass.LinkId.parser(), extensionRegistry); + if (linkIdsBuilder_ == null) { + ensureLinkIdsIsMutable(); + linkIds_.add(m); + } else { + linkIdsBuilder_.addMessage(m); + } + break; + } + // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Constraint_Exclusions) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -67219,6 +64578,7 @@ public final class ContextOuterClass { */ public Builder setIsPermanent(boolean value) { isPermanent_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -67228,6 +64588,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearIsPermanent() { + bitField0_ = (bitField0_ & ~0x00000001); isPermanent_ = false; onChanged(); return this; @@ -67236,9 +64597,9 @@ public final class ContextOuterClass { private java.util.List<context.ContextOuterClass.DeviceId> deviceIds_ = java.util.Collections.emptyList(); private void ensureDeviceIdsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!((bitField0_ & 0x00000002) != 0)) { deviceIds_ = new java.util.ArrayList<context.ContextOuterClass.DeviceId>(deviceIds_); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000002; } } @@ -67390,7 +64751,7 @@ public final class ContextOuterClass { public Builder clearDeviceIds() { if (deviceIdsBuilder_ == null) { deviceIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { deviceIdsBuilder_.clear(); @@ -67464,7 +64825,7 @@ public final class ContextOuterClass { private com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> getDeviceIdsFieldBuilder() { if (deviceIdsBuilder_ == null) { - deviceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder>(deviceIds_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + deviceIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder>(deviceIds_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); deviceIds_ = null; } return deviceIdsBuilder_; @@ -67473,9 +64834,9 @@ public final class ContextOuterClass { private java.util.List<context.ContextOuterClass.EndPointId> endpointIds_ = java.util.Collections.emptyList(); private void ensureEndpointIdsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { + if (!((bitField0_ & 0x00000004) != 0)) { endpointIds_ = new java.util.ArrayList<context.ContextOuterClass.EndPointId>(endpointIds_); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; } } @@ -67627,7 +64988,7 @@ public final class ContextOuterClass { public Builder clearEndpointIds() { if (endpointIdsBuilder_ == null) { endpointIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { endpointIdsBuilder_.clear(); @@ -67701,7 +65062,7 @@ public final class ContextOuterClass { private com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder> getEndpointIdsFieldBuilder() { if (endpointIdsBuilder_ == null) { - endpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder>(endpointIds_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + endpointIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.EndPointId, context.ContextOuterClass.EndPointId.Builder, context.ContextOuterClass.EndPointIdOrBuilder>(endpointIds_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); endpointIds_ = null; } return endpointIdsBuilder_; @@ -67710,9 +65071,9 @@ public final class ContextOuterClass { private java.util.List<context.ContextOuterClass.LinkId> linkIds_ = java.util.Collections.emptyList(); private void ensureLinkIdsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { + if (!((bitField0_ & 0x00000008) != 0)) { linkIds_ = new java.util.ArrayList<context.ContextOuterClass.LinkId>(linkIds_); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; } } @@ -67864,7 +65225,7 @@ public final class ContextOuterClass { public Builder clearLinkIds() { if (linkIdsBuilder_ == null) { linkIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { linkIdsBuilder_.clear(); @@ -67938,7 +65299,7 @@ public final class ContextOuterClass { private com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.LinkId, context.ContextOuterClass.LinkId.Builder, context.ContextOuterClass.LinkIdOrBuilder> getLinkIdsFieldBuilder() { if (linkIdsBuilder_ == null) { - linkIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.LinkId, context.ContextOuterClass.LinkId.Builder, context.ContextOuterClass.LinkIdOrBuilder>(linkIds_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + linkIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.LinkId, context.ContextOuterClass.LinkId.Builder, context.ContextOuterClass.LinkIdOrBuilder>(linkIds_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); linkIds_ = null; } return linkIdsBuilder_; @@ -67971,7 +65332,17 @@ public final class ContextOuterClass { @java.lang.Override public Constraint_Exclusions parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Constraint_Exclusions(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -68158,7 +65529,7 @@ public final class ContextOuterClass { */ context.ContextOuterClass.Constraint_ExclusionsOrBuilder getExclusionsOrBuilder(); - public context.ContextOuterClass.Constraint.ConstraintCase getConstraintCase(); + context.ContextOuterClass.Constraint.ConstraintCase getConstraintCase(); } /** @@ -68184,176 +65555,6 @@ public final class ContextOuterClass { return new Constraint(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Constraint(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 8: - { - int rawValue = input.readEnum(); - action_ = rawValue; - break; - } - case 18: - { - context.ContextOuterClass.Constraint_Custom.Builder subBuilder = null; - if (constraintCase_ == 2) { - subBuilder = ((context.ContextOuterClass.Constraint_Custom) constraint_).toBuilder(); - } - constraint_ = input.readMessage(context.ContextOuterClass.Constraint_Custom.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((context.ContextOuterClass.Constraint_Custom) constraint_); - constraint_ = subBuilder.buildPartial(); - } - constraintCase_ = 2; - break; - } - case 26: - { - context.ContextOuterClass.Constraint_Schedule.Builder subBuilder = null; - if (constraintCase_ == 3) { - subBuilder = ((context.ContextOuterClass.Constraint_Schedule) constraint_).toBuilder(); - } - constraint_ = input.readMessage(context.ContextOuterClass.Constraint_Schedule.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((context.ContextOuterClass.Constraint_Schedule) constraint_); - constraint_ = subBuilder.buildPartial(); - } - constraintCase_ = 3; - break; - } - case 34: - { - context.ContextOuterClass.Constraint_EndPointLocation.Builder subBuilder = null; - if (constraintCase_ == 4) { - subBuilder = ((context.ContextOuterClass.Constraint_EndPointLocation) constraint_).toBuilder(); - } - constraint_ = input.readMessage(context.ContextOuterClass.Constraint_EndPointLocation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((context.ContextOuterClass.Constraint_EndPointLocation) constraint_); - constraint_ = subBuilder.buildPartial(); - } - constraintCase_ = 4; - break; - } - case 42: - { - context.ContextOuterClass.Constraint_EndPointPriority.Builder subBuilder = null; - if (constraintCase_ == 5) { - subBuilder = ((context.ContextOuterClass.Constraint_EndPointPriority) constraint_).toBuilder(); - } - constraint_ = input.readMessage(context.ContextOuterClass.Constraint_EndPointPriority.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((context.ContextOuterClass.Constraint_EndPointPriority) constraint_); - constraint_ = subBuilder.buildPartial(); - } - constraintCase_ = 5; - break; - } - case 50: - { - context.ContextOuterClass.Constraint_SLA_Capacity.Builder subBuilder = null; - if (constraintCase_ == 6) { - subBuilder = ((context.ContextOuterClass.Constraint_SLA_Capacity) constraint_).toBuilder(); - } - constraint_ = input.readMessage(context.ContextOuterClass.Constraint_SLA_Capacity.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((context.ContextOuterClass.Constraint_SLA_Capacity) constraint_); - constraint_ = subBuilder.buildPartial(); - } - constraintCase_ = 6; - break; - } - case 58: - { - context.ContextOuterClass.Constraint_SLA_Latency.Builder subBuilder = null; - if (constraintCase_ == 7) { - subBuilder = ((context.ContextOuterClass.Constraint_SLA_Latency) constraint_).toBuilder(); - } - constraint_ = input.readMessage(context.ContextOuterClass.Constraint_SLA_Latency.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((context.ContextOuterClass.Constraint_SLA_Latency) constraint_); - constraint_ = subBuilder.buildPartial(); - } - constraintCase_ = 7; - break; - } - case 66: - { - context.ContextOuterClass.Constraint_SLA_Availability.Builder subBuilder = null; - if (constraintCase_ == 8) { - subBuilder = ((context.ContextOuterClass.Constraint_SLA_Availability) constraint_).toBuilder(); - } - constraint_ = input.readMessage(context.ContextOuterClass.Constraint_SLA_Availability.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((context.ContextOuterClass.Constraint_SLA_Availability) constraint_); - constraint_ = subBuilder.buildPartial(); - } - constraintCase_ = 8; - break; - } - case 74: - { - context.ContextOuterClass.Constraint_SLA_Isolation_level.Builder subBuilder = null; - if (constraintCase_ == 9) { - subBuilder = ((context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_).toBuilder(); - } - constraint_ = input.readMessage(context.ContextOuterClass.Constraint_SLA_Isolation_level.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((context.ContextOuterClass.Constraint_SLA_Isolation_level) constraint_); - constraint_ = subBuilder.buildPartial(); - } - constraintCase_ = 9; - break; - } - case 82: - { - context.ContextOuterClass.Constraint_Exclusions.Builder subBuilder = null; - if (constraintCase_ == 10) { - subBuilder = ((context.ContextOuterClass.Constraint_Exclusions) constraint_).toBuilder(); - } - constraint_ = input.readMessage(context.ContextOuterClass.Constraint_Exclusions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((context.ContextOuterClass.Constraint_Exclusions) constraint_); - constraint_ = subBuilder.buildPartial(); - } - constraintCase_ = 10; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_Constraint_descriptor; } @@ -68365,6 +65566,7 @@ public final class ContextOuterClass { private int constraintCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object constraint_; public enum ConstraintCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { @@ -68434,7 +65636,7 @@ public final class ContextOuterClass { public static final int ACTION_FIELD_NUMBER = 1; - private int action_; + private int action_ = 0; /** * <code>.context.ConstraintActionEnum action = 1;</code> @@ -68451,8 +65653,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.ConstraintActionEnum getAction() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.ConstraintActionEnum result = context.ContextOuterClass.ConstraintActionEnum.valueOf(action_); + context.ContextOuterClass.ConstraintActionEnum result = context.ContextOuterClass.ConstraintActionEnum.forNumber(action_); return result == null ? context.ContextOuterClass.ConstraintActionEnum.UNRECOGNIZED : result; } @@ -68807,7 +66008,7 @@ public final class ContextOuterClass { if (constraintCase_ == 10) { output.writeMessage(10, (context.ContextOuterClass.Constraint_Exclusions) constraint_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -68846,7 +66047,7 @@ public final class ContextOuterClass { if (constraintCase_ == 10) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, (context.ContextOuterClass.Constraint_Exclusions) constraint_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -68904,7 +66105,7 @@ public final class ContextOuterClass { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -68958,7 +66159,7 @@ public final class ContextOuterClass { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -69052,23 +66253,44 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.Constraint.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; action_ = 0; + if (customBuilder_ != null) { + customBuilder_.clear(); + } + if (scheduleBuilder_ != null) { + scheduleBuilder_.clear(); + } + if (endpointLocationBuilder_ != null) { + endpointLocationBuilder_.clear(); + } + if (endpointPriorityBuilder_ != null) { + endpointPriorityBuilder_.clear(); + } + if (slaCapacityBuilder_ != null) { + slaCapacityBuilder_.clear(); + } + if (slaLatencyBuilder_ != null) { + slaLatencyBuilder_.clear(); + } + if (slaAvailabilityBuilder_ != null) { + slaAvailabilityBuilder_.clear(); + } + if (slaIsolationBuilder_ != null) { + slaIsolationBuilder_.clear(); + } + if (exclusionsBuilder_ != null) { + exclusionsBuilder_.clear(); + } constraintCase_ = 0; constraint_ = null; return this; @@ -69096,103 +66318,51 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.Constraint buildPartial() { context.ContextOuterClass.Constraint result = new context.ContextOuterClass.Constraint(this); - result.action_ = action_; - if (constraintCase_ == 2) { - if (customBuilder_ == null) { - result.constraint_ = constraint_; - } else { - result.constraint_ = customBuilder_.build(); - } + if (bitField0_ != 0) { + buildPartial0(result); } - if (constraintCase_ == 3) { - if (scheduleBuilder_ == null) { - result.constraint_ = constraint_; - } else { - result.constraint_ = scheduleBuilder_.build(); - } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(context.ContextOuterClass.Constraint result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.action_ = action_; } - if (constraintCase_ == 4) { - if (endpointLocationBuilder_ == null) { - result.constraint_ = constraint_; - } else { - result.constraint_ = endpointLocationBuilder_.build(); - } + } + + private void buildPartialOneofs(context.ContextOuterClass.Constraint result) { + result.constraintCase_ = constraintCase_; + result.constraint_ = this.constraint_; + if (constraintCase_ == 2 && customBuilder_ != null) { + result.constraint_ = customBuilder_.build(); } - if (constraintCase_ == 5) { - if (endpointPriorityBuilder_ == null) { - result.constraint_ = constraint_; - } else { - result.constraint_ = endpointPriorityBuilder_.build(); - } + if (constraintCase_ == 3 && scheduleBuilder_ != null) { + result.constraint_ = scheduleBuilder_.build(); } - if (constraintCase_ == 6) { - if (slaCapacityBuilder_ == null) { - result.constraint_ = constraint_; - } else { - result.constraint_ = slaCapacityBuilder_.build(); - } + if (constraintCase_ == 4 && endpointLocationBuilder_ != null) { + result.constraint_ = endpointLocationBuilder_.build(); } - if (constraintCase_ == 7) { - if (slaLatencyBuilder_ == null) { - result.constraint_ = constraint_; - } else { - result.constraint_ = slaLatencyBuilder_.build(); - } + if (constraintCase_ == 5 && endpointPriorityBuilder_ != null) { + result.constraint_ = endpointPriorityBuilder_.build(); } - if (constraintCase_ == 8) { - if (slaAvailabilityBuilder_ == null) { - result.constraint_ = constraint_; - } else { - result.constraint_ = slaAvailabilityBuilder_.build(); - } + if (constraintCase_ == 6 && slaCapacityBuilder_ != null) { + result.constraint_ = slaCapacityBuilder_.build(); } - if (constraintCase_ == 9) { - if (slaIsolationBuilder_ == null) { - result.constraint_ = constraint_; - } else { - result.constraint_ = slaIsolationBuilder_.build(); - } + if (constraintCase_ == 7 && slaLatencyBuilder_ != null) { + result.constraint_ = slaLatencyBuilder_.build(); } - if (constraintCase_ == 10) { - if (exclusionsBuilder_ == null) { - result.constraint_ = constraint_; - } else { - result.constraint_ = exclusionsBuilder_.build(); - } + if (constraintCase_ == 8 && slaAvailabilityBuilder_ != null) { + result.constraint_ = slaAvailabilityBuilder_.build(); + } + if (constraintCase_ == 9 && slaIsolationBuilder_ != null) { + result.constraint_ = slaIsolationBuilder_.build(); + } + if (constraintCase_ == 10 && exclusionsBuilder_ != null) { + result.constraint_ = exclusionsBuilder_.build(); } - result.constraintCase_ = constraintCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); } @java.lang.Override @@ -69262,7 +66432,7 @@ public final class ContextOuterClass { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -69274,17 +66444,105 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.Constraint parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 8: + { + action_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } + // case 8 + case 18: + { + input.readMessage(getCustomFieldBuilder().getBuilder(), extensionRegistry); + constraintCase_ = 2; + break; + } + // case 18 + case 26: + { + input.readMessage(getScheduleFieldBuilder().getBuilder(), extensionRegistry); + constraintCase_ = 3; + break; + } + // case 26 + case 34: + { + input.readMessage(getEndpointLocationFieldBuilder().getBuilder(), extensionRegistry); + constraintCase_ = 4; + break; + } + // case 34 + case 42: + { + input.readMessage(getEndpointPriorityFieldBuilder().getBuilder(), extensionRegistry); + constraintCase_ = 5; + break; + } + // case 42 + case 50: + { + input.readMessage(getSlaCapacityFieldBuilder().getBuilder(), extensionRegistry); + constraintCase_ = 6; + break; + } + // case 50 + case 58: + { + input.readMessage(getSlaLatencyFieldBuilder().getBuilder(), extensionRegistry); + constraintCase_ = 7; + break; + } + // case 58 + case 66: + { + input.readMessage(getSlaAvailabilityFieldBuilder().getBuilder(), extensionRegistry); + constraintCase_ = 8; + break; + } + // case 66 + case 74: + { + input.readMessage(getSlaIsolationFieldBuilder().getBuilder(), extensionRegistry); + constraintCase_ = 9; + break; + } + // case 74 + case 82: + { + input.readMessage(getExclusionsFieldBuilder().getBuilder(), extensionRegistry); + constraintCase_ = 10; + break; + } + // case 82 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Constraint) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -69303,6 +66561,8 @@ public final class ContextOuterClass { return this; } + private int bitField0_; + private int action_ = 0; /** @@ -69321,6 +66581,7 @@ public final class ContextOuterClass { */ public Builder setActionValue(int value) { action_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -69331,8 +66592,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.ConstraintActionEnum getAction() { - @SuppressWarnings("deprecation") - context.ContextOuterClass.ConstraintActionEnum result = context.ContextOuterClass.ConstraintActionEnum.valueOf(action_); + context.ContextOuterClass.ConstraintActionEnum result = context.ContextOuterClass.ConstraintActionEnum.forNumber(action_); return result == null ? context.ContextOuterClass.ConstraintActionEnum.UNRECOGNIZED : result; } @@ -69345,6 +66605,7 @@ public final class ContextOuterClass { if (value == null) { throw new NullPointerException(); } + bitField0_ |= 0x00000001; action_ = value.getNumber(); onChanged(); return this; @@ -69355,6 +66616,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearAction() { + bitField0_ = (bitField0_ & ~0x00000001); action_ = 0; onChanged(); return this; @@ -69435,8 +66697,9 @@ public final class ContextOuterClass { } else { if (constraintCase_ == 2) { customBuilder_.mergeFrom(value); + } else { + customBuilder_.setMessage(value); } - customBuilder_.setMessage(value); } constraintCase_ = 2; return this; @@ -69497,7 +66760,6 @@ public final class ContextOuterClass { } constraintCase_ = 2; onChanged(); - ; return customBuilder_; } @@ -69576,8 +66838,9 @@ public final class ContextOuterClass { } else { if (constraintCase_ == 3) { scheduleBuilder_.mergeFrom(value); + } else { + scheduleBuilder_.setMessage(value); } - scheduleBuilder_.setMessage(value); } constraintCase_ = 3; return this; @@ -69638,7 +66901,6 @@ public final class ContextOuterClass { } constraintCase_ = 3; onChanged(); - ; return scheduleBuilder_; } @@ -69717,8 +66979,9 @@ public final class ContextOuterClass { } else { if (constraintCase_ == 4) { endpointLocationBuilder_.mergeFrom(value); + } else { + endpointLocationBuilder_.setMessage(value); } - endpointLocationBuilder_.setMessage(value); } constraintCase_ = 4; return this; @@ -69779,7 +67042,6 @@ public final class ContextOuterClass { } constraintCase_ = 4; onChanged(); - ; return endpointLocationBuilder_; } @@ -69858,8 +67120,9 @@ public final class ContextOuterClass { } else { if (constraintCase_ == 5) { endpointPriorityBuilder_.mergeFrom(value); + } else { + endpointPriorityBuilder_.setMessage(value); } - endpointPriorityBuilder_.setMessage(value); } constraintCase_ = 5; return this; @@ -69920,7 +67183,6 @@ public final class ContextOuterClass { } constraintCase_ = 5; onChanged(); - ; return endpointPriorityBuilder_; } @@ -69999,8 +67261,9 @@ public final class ContextOuterClass { } else { if (constraintCase_ == 6) { slaCapacityBuilder_.mergeFrom(value); + } else { + slaCapacityBuilder_.setMessage(value); } - slaCapacityBuilder_.setMessage(value); } constraintCase_ = 6; return this; @@ -70061,7 +67324,6 @@ public final class ContextOuterClass { } constraintCase_ = 6; onChanged(); - ; return slaCapacityBuilder_; } @@ -70140,8 +67402,9 @@ public final class ContextOuterClass { } else { if (constraintCase_ == 7) { slaLatencyBuilder_.mergeFrom(value); + } else { + slaLatencyBuilder_.setMessage(value); } - slaLatencyBuilder_.setMessage(value); } constraintCase_ = 7; return this; @@ -70202,7 +67465,6 @@ public final class ContextOuterClass { } constraintCase_ = 7; onChanged(); - ; return slaLatencyBuilder_; } @@ -70281,8 +67543,9 @@ public final class ContextOuterClass { } else { if (constraintCase_ == 8) { slaAvailabilityBuilder_.mergeFrom(value); + } else { + slaAvailabilityBuilder_.setMessage(value); } - slaAvailabilityBuilder_.setMessage(value); } constraintCase_ = 8; return this; @@ -70343,7 +67606,6 @@ public final class ContextOuterClass { } constraintCase_ = 8; onChanged(); - ; return slaAvailabilityBuilder_; } @@ -70422,8 +67684,9 @@ public final class ContextOuterClass { } else { if (constraintCase_ == 9) { slaIsolationBuilder_.mergeFrom(value); + } else { + slaIsolationBuilder_.setMessage(value); } - slaIsolationBuilder_.setMessage(value); } constraintCase_ = 9; return this; @@ -70484,7 +67747,6 @@ public final class ContextOuterClass { } constraintCase_ = 9; onChanged(); - ; return slaIsolationBuilder_; } @@ -70563,8 +67825,9 @@ public final class ContextOuterClass { } else { if (constraintCase_ == 10) { exclusionsBuilder_.mergeFrom(value); + } else { + exclusionsBuilder_.setMessage(value); } - exclusionsBuilder_.setMessage(value); } constraintCase_ = 10; return this; @@ -70625,7 +67888,6 @@ public final class ContextOuterClass { } constraintCase_ = 10; onChanged(); - ; return exclusionsBuilder_; } @@ -70656,7 +67918,17 @@ public final class ContextOuterClass { @java.lang.Override public Constraint parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Constraint(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -70741,68 +68013,6 @@ public final class ContextOuterClass { return new TeraFlowController(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private TeraFlowController(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.ContextId.Builder subBuilder = null; - if (contextId_ != null) { - subBuilder = contextId_.toBuilder(); - } - contextId_ = input.readMessage(context.ContextOuterClass.ContextId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(contextId_); - contextId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - ipAddress_ = s; - break; - } - case 24: - { - port_ = input.readUInt32(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_TeraFlowController_descriptor; } @@ -70839,12 +68049,13 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - return getContextId(); + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; } public static final int IP_ADDRESS_FIELD_NUMBER = 2; - private volatile java.lang.Object ipAddress_; + @SuppressWarnings("serial") + private volatile java.lang.Object ipAddress_ = ""; /** * <code>string ip_address = 2;</code> @@ -70881,7 +68092,7 @@ public final class ContextOuterClass { public static final int PORT_FIELD_NUMBER = 3; - private int port_; + private int port_ = 0; /** * <code>uint32 port = 3;</code> @@ -70910,13 +68121,13 @@ public final class ContextOuterClass { if (contextId_ != null) { output.writeMessage(1, getContextId()); } - if (!getIpAddressBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipAddress_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ipAddress_); } if (port_ != 0) { output.writeUInt32(3, port_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -70928,13 +68139,13 @@ public final class ContextOuterClass { if (contextId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getContextId()); } - if (!getIpAddressBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipAddress_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ipAddress_); } if (port_ != 0) { size += com.google.protobuf.CodedOutputStream.computeUInt32Size(3, port_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -70958,7 +68169,7 @@ public final class ContextOuterClass { return false; if (getPort() != other.getPort()) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -70978,7 +68189,7 @@ public final class ContextOuterClass { hash = (53 * hash) + getIpAddress().hashCode(); hash = (37 * hash) + PORT_FIELD_NUMBER; hash = (53 * hash) + getPort(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -71076,26 +68287,19 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.TeraFlowController.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (contextIdBuilder_ == null) { - contextId_ = null; - } else { - contextId_ = null; + bitField0_ = 0; + contextId_ = null; + if (contextIdBuilder_ != null) { + contextIdBuilder_.dispose(); contextIdBuilder_ = null; } ipAddress_ = ""; @@ -71125,45 +68329,24 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.TeraFlowController buildPartial() { context.ContextOuterClass.TeraFlowController result = new context.ContextOuterClass.TeraFlowController(this); - if (contextIdBuilder_ == null) { - result.contextId_ = contextId_; - } else { - result.contextId_ = contextIdBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } - result.ipAddress_ = ipAddress_; - result.port_ = port_; onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.TeraFlowController result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.contextId_ = contextIdBuilder_ == null ? contextId_ : contextIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.ipAddress_ = ipAddress_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.port_ = port_; + } } @java.lang.Override @@ -71184,12 +68367,13 @@ public final class ContextOuterClass { } if (!other.getIpAddress().isEmpty()) { ipAddress_ = other.ipAddress_; + bitField0_ |= 0x00000002; onChanged(); } if (other.getPort() != 0) { setPort(other.getPort()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -71201,20 +68385,61 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.TeraFlowController parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getContextIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + ipAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 24: + { + port_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } + // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.TeraFlowController) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.ContextId contextId_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> contextIdBuilder_; @@ -71224,7 +68449,7 @@ public final class ContextOuterClass { * @return Whether the contextId field is set. */ public boolean hasContextId() { - return contextIdBuilder_ != null || contextId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -71248,10 +68473,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } contextId_ = value; - onChanged(); } else { contextIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -71261,10 +68487,11 @@ public final class ContextOuterClass { public Builder setContextId(context.ContextOuterClass.ContextId.Builder builderForValue) { if (contextIdBuilder_ == null) { contextId_ = builderForValue.build(); - onChanged(); } else { contextIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -71273,15 +68500,16 @@ public final class ContextOuterClass { */ public Builder mergeContextId(context.ContextOuterClass.ContextId value) { if (contextIdBuilder_ == null) { - if (contextId_ != null) { - contextId_ = context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && contextId_ != null && contextId_ != context.ContextOuterClass.ContextId.getDefaultInstance()) { + getContextIdBuilder().mergeFrom(value); } else { contextId_ = value; } - onChanged(); } else { contextIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -71289,13 +68517,13 @@ public final class ContextOuterClass { * <code>.context.ContextId context_id = 1;</code> */ public Builder clearContextId() { - if (contextIdBuilder_ == null) { - contextId_ = null; - onChanged(); - } else { - contextId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + contextId_ = null; + if (contextIdBuilder_ != null) { + contextIdBuilder_.dispose(); contextIdBuilder_ = null; } + onChanged(); return this; } @@ -71303,6 +68531,7 @@ public final class ContextOuterClass { * <code>.context.ContextId context_id = 1;</code> */ public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getContextIdFieldBuilder().getBuilder(); } @@ -71372,6 +68601,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } ipAddress_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -71382,6 +68612,7 @@ public final class ContextOuterClass { */ public Builder clearIpAddress() { ipAddress_ = getDefaultInstance().getIpAddress(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -71397,6 +68628,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); ipAddress_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -71419,6 +68651,7 @@ public final class ContextOuterClass { */ public Builder setPort(int value) { port_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -71428,6 +68661,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearPort() { + bitField0_ = (bitField0_ & ~0x00000004); port_ = 0; onChanged(); return this; @@ -71460,7 +68694,17 @@ public final class ContextOuterClass { @java.lang.Override public TeraFlowController parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TeraFlowController(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -71528,62 +68772,6 @@ public final class ContextOuterClass { return new AuthenticationResult(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private AuthenticationResult(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.ContextId.Builder subBuilder = null; - if (contextId_ != null) { - subBuilder = contextId_.toBuilder(); - } - contextId_ = input.readMessage(context.ContextOuterClass.ContextId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(contextId_); - contextId_ = subBuilder.buildPartial(); - } - break; - } - case 16: - { - authenticated_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_AuthenticationResult_descriptor; } @@ -71620,12 +68808,12 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.ContextIdOrBuilder getContextIdOrBuilder() { - return getContextId(); + return contextId_ == null ? context.ContextOuterClass.ContextId.getDefaultInstance() : contextId_; } public static final int AUTHENTICATED_FIELD_NUMBER = 2; - private boolean authenticated_; + private boolean authenticated_ = false; /** * <code>bool authenticated = 2;</code> @@ -71657,7 +68845,7 @@ public final class ContextOuterClass { if (authenticated_ != false) { output.writeBool(2, authenticated_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -71672,7 +68860,7 @@ public final class ContextOuterClass { if (authenticated_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, authenticated_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -71694,7 +68882,7 @@ public final class ContextOuterClass { } if (getAuthenticated() != other.getAuthenticated()) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -71712,7 +68900,7 @@ public final class ContextOuterClass { } hash = (37 * hash) + AUTHENTICATED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAuthenticated()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -71806,26 +68994,19 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.AuthenticationResult.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (contextIdBuilder_ == null) { - contextId_ = null; - } else { - contextId_ = null; + bitField0_ = 0; + contextId_ = null; + if (contextIdBuilder_ != null) { + contextIdBuilder_.dispose(); contextIdBuilder_ = null; } authenticated_ = false; @@ -71854,44 +69035,21 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.AuthenticationResult buildPartial() { context.ContextOuterClass.AuthenticationResult result = new context.ContextOuterClass.AuthenticationResult(this); - if (contextIdBuilder_ == null) { - result.contextId_ = contextId_; - } else { - result.contextId_ = contextIdBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } - result.authenticated_ = authenticated_; onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.AuthenticationResult result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.contextId_ = contextIdBuilder_ == null ? contextId_ : contextIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.authenticated_ = authenticated_; + } } @java.lang.Override @@ -71913,7 +69071,7 @@ public final class ContextOuterClass { if (other.getAuthenticated() != false) { setAuthenticated(other.getAuthenticated()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -71925,20 +69083,54 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.AuthenticationResult parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getContextIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 16: + { + authenticated_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } + // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.AuthenticationResult) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.ContextId contextId_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.ContextId, context.ContextOuterClass.ContextId.Builder, context.ContextOuterClass.ContextIdOrBuilder> contextIdBuilder_; @@ -71948,7 +69140,7 @@ public final class ContextOuterClass { * @return Whether the contextId field is set. */ public boolean hasContextId() { - return contextIdBuilder_ != null || contextId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -71972,10 +69164,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } contextId_ = value; - onChanged(); } else { contextIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -71985,10 +69178,11 @@ public final class ContextOuterClass { public Builder setContextId(context.ContextOuterClass.ContextId.Builder builderForValue) { if (contextIdBuilder_ == null) { contextId_ = builderForValue.build(); - onChanged(); } else { contextIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -71997,15 +69191,16 @@ public final class ContextOuterClass { */ public Builder mergeContextId(context.ContextOuterClass.ContextId value) { if (contextIdBuilder_ == null) { - if (contextId_ != null) { - contextId_ = context.ContextOuterClass.ContextId.newBuilder(contextId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && contextId_ != null && contextId_ != context.ContextOuterClass.ContextId.getDefaultInstance()) { + getContextIdBuilder().mergeFrom(value); } else { contextId_ = value; } - onChanged(); } else { contextIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -72013,13 +69208,13 @@ public final class ContextOuterClass { * <code>.context.ContextId context_id = 1;</code> */ public Builder clearContextId() { - if (contextIdBuilder_ == null) { - contextId_ = null; - onChanged(); - } else { - contextId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + contextId_ = null; + if (contextIdBuilder_ != null) { + contextIdBuilder_.dispose(); contextIdBuilder_ = null; } + onChanged(); return this; } @@ -72027,6 +69222,7 @@ public final class ContextOuterClass { * <code>.context.ContextId context_id = 1;</code> */ public context.ContextOuterClass.ContextId.Builder getContextIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getContextIdFieldBuilder().getBuilder(); } @@ -72071,6 +69267,7 @@ public final class ContextOuterClass { */ public Builder setAuthenticated(boolean value) { authenticated_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -72080,6 +69277,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearAuthenticated() { + bitField0_ = (bitField0_ & ~0x00000002); authenticated_ = false; onChanged(); return this; @@ -72112,7 +69310,17 @@ public final class ContextOuterClass { @java.lang.Override public AuthenticationResult parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AuthenticationResult(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -72174,50 +69382,6 @@ public final class ContextOuterClass { return new OpticalConfigId(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private OpticalConfigId(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - opticalconfigUuid_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_OpticalConfigId_descriptor; } @@ -72229,7 +69393,8 @@ public final class ContextOuterClass { public static final int OPTICALCONFIG_UUID_FIELD_NUMBER = 1; - private volatile java.lang.Object opticalconfigUuid_; + @SuppressWarnings("serial") + private volatile java.lang.Object opticalconfigUuid_ = ""; /** * <code>string opticalconfig_uuid = 1;</code> @@ -72279,10 +69444,10 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getOpticalconfigUuidBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(opticalconfigUuid_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, opticalconfigUuid_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -72291,10 +69456,10 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (!getOpticalconfigUuidBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(opticalconfigUuid_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, opticalconfigUuid_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -72310,7 +69475,7 @@ public final class ContextOuterClass { context.ContextOuterClass.OpticalConfigId other = (context.ContextOuterClass.OpticalConfigId) obj; if (!getOpticalconfigUuid().equals(other.getOpticalconfigUuid())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -72324,7 +69489,7 @@ public final class ContextOuterClass { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + OPTICALCONFIG_UUID_FIELD_NUMBER; hash = (53 * hash) + getOpticalconfigUuid().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -72422,22 +69587,16 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.OpticalConfigId.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; opticalconfigUuid_ = ""; return this; } @@ -72464,39 +69623,18 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.OpticalConfigId buildPartial() { context.ContextOuterClass.OpticalConfigId result = new context.ContextOuterClass.OpticalConfigId(this); - result.opticalconfigUuid_ = opticalconfigUuid_; + if (bitField0_ != 0) { + buildPartial0(result); + } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.OpticalConfigId result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.opticalconfigUuid_ = opticalconfigUuid_; + } } @java.lang.Override @@ -72514,9 +69652,10 @@ public final class ContextOuterClass { return this; if (!other.getOpticalconfigUuid().isEmpty()) { opticalconfigUuid_ = other.opticalconfigUuid_; + bitField0_ |= 0x00000001; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -72528,20 +69667,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.OpticalConfigId parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + opticalconfigUuid_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.OpticalConfigId) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private java.lang.Object opticalconfigUuid_ = ""; /** @@ -72585,6 +69751,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } opticalconfigUuid_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -72595,6 +69762,7 @@ public final class ContextOuterClass { */ public Builder clearOpticalconfigUuid() { opticalconfigUuid_ = getDefaultInstance().getOpticalconfigUuid(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -72610,6 +69778,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); opticalconfigUuid_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -72641,7 +69810,17 @@ public final class ContextOuterClass { @java.lang.Override public OpticalConfigId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OpticalConfigId(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -72716,63 +69895,6 @@ public final class ContextOuterClass { return new OpticalConfig(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private OpticalConfig(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.OpticalConfigId.Builder subBuilder = null; - if (opticalconfigId_ != null) { - subBuilder = opticalconfigId_.toBuilder(); - } - opticalconfigId_ = input.readMessage(context.ContextOuterClass.OpticalConfigId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(opticalconfigId_); - opticalconfigId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - config_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_OpticalConfig_descriptor; } @@ -72809,12 +69931,13 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.OpticalConfigIdOrBuilder getOpticalconfigIdOrBuilder() { - return getOpticalconfigId(); + return opticalconfigId_ == null ? context.ContextOuterClass.OpticalConfigId.getDefaultInstance() : opticalconfigId_; } public static final int CONFIG_FIELD_NUMBER = 2; - private volatile java.lang.Object config_; + @SuppressWarnings("serial") + private volatile java.lang.Object config_ = ""; /** * <code>string config = 2;</code> @@ -72867,10 +69990,10 @@ public final class ContextOuterClass { if (opticalconfigId_ != null) { output.writeMessage(1, getOpticalconfigId()); } - if (!getConfigBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(config_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, config_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -72882,10 +70005,10 @@ public final class ContextOuterClass { if (opticalconfigId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOpticalconfigId()); } - if (!getConfigBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(config_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, config_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -72907,7 +70030,7 @@ public final class ContextOuterClass { } if (!getConfig().equals(other.getConfig())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -72925,7 +70048,7 @@ public final class ContextOuterClass { } hash = (37 * hash) + CONFIG_FIELD_NUMBER; hash = (53 * hash) + getConfig().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -73019,26 +70142,19 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.OpticalConfig.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (opticalconfigIdBuilder_ == null) { - opticalconfigId_ = null; - } else { - opticalconfigId_ = null; + bitField0_ = 0; + opticalconfigId_ = null; + if (opticalconfigIdBuilder_ != null) { + opticalconfigIdBuilder_.dispose(); opticalconfigIdBuilder_ = null; } config_ = ""; @@ -73067,44 +70183,21 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.OpticalConfig buildPartial() { context.ContextOuterClass.OpticalConfig result = new context.ContextOuterClass.OpticalConfig(this); - if (opticalconfigIdBuilder_ == null) { - result.opticalconfigId_ = opticalconfigId_; - } else { - result.opticalconfigId_ = opticalconfigIdBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } - result.config_ = config_; onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.OpticalConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.opticalconfigId_ = opticalconfigIdBuilder_ == null ? opticalconfigId_ : opticalconfigIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.config_ = config_; + } } @java.lang.Override @@ -73125,9 +70218,10 @@ public final class ContextOuterClass { } if (!other.getConfig().isEmpty()) { config_ = other.config_; + bitField0_ |= 0x00000002; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -73139,20 +70233,54 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.OpticalConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getOpticalconfigIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + config_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.OpticalConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.OpticalConfigId opticalconfigId_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.OpticalConfigId, context.ContextOuterClass.OpticalConfigId.Builder, context.ContextOuterClass.OpticalConfigIdOrBuilder> opticalconfigIdBuilder_; @@ -73162,7 +70290,7 @@ public final class ContextOuterClass { * @return Whether the opticalconfigId field is set. */ public boolean hasOpticalconfigId() { - return opticalconfigIdBuilder_ != null || opticalconfigId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -73186,10 +70314,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } opticalconfigId_ = value; - onChanged(); } else { opticalconfigIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -73199,10 +70328,11 @@ public final class ContextOuterClass { public Builder setOpticalconfigId(context.ContextOuterClass.OpticalConfigId.Builder builderForValue) { if (opticalconfigIdBuilder_ == null) { opticalconfigId_ = builderForValue.build(); - onChanged(); } else { opticalconfigIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -73211,15 +70341,16 @@ public final class ContextOuterClass { */ public Builder mergeOpticalconfigId(context.ContextOuterClass.OpticalConfigId value) { if (opticalconfigIdBuilder_ == null) { - if (opticalconfigId_ != null) { - opticalconfigId_ = context.ContextOuterClass.OpticalConfigId.newBuilder(opticalconfigId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && opticalconfigId_ != null && opticalconfigId_ != context.ContextOuterClass.OpticalConfigId.getDefaultInstance()) { + getOpticalconfigIdBuilder().mergeFrom(value); } else { opticalconfigId_ = value; } - onChanged(); } else { opticalconfigIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -73227,13 +70358,13 @@ public final class ContextOuterClass { * <code>.context.OpticalConfigId opticalconfig_id = 1;</code> */ public Builder clearOpticalconfigId() { - if (opticalconfigIdBuilder_ == null) { - opticalconfigId_ = null; - onChanged(); - } else { - opticalconfigId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + opticalconfigId_ = null; + if (opticalconfigIdBuilder_ != null) { + opticalconfigIdBuilder_.dispose(); opticalconfigIdBuilder_ = null; } + onChanged(); return this; } @@ -73241,6 +70372,7 @@ public final class ContextOuterClass { * <code>.context.OpticalConfigId opticalconfig_id = 1;</code> */ public context.ContextOuterClass.OpticalConfigId.Builder getOpticalconfigIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getOpticalconfigIdFieldBuilder().getBuilder(); } @@ -73310,6 +70442,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } config_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -73320,6 +70453,7 @@ public final class ContextOuterClass { */ public Builder clearConfig() { config_ = getDefaultInstance().getConfig(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -73335,6 +70469,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); config_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -73366,7 +70501,17 @@ public final class ContextOuterClass { @java.lang.Override public OpticalConfig parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OpticalConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -73437,57 +70582,6 @@ public final class ContextOuterClass { return new OpticalConfigList(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private OpticalConfigList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - opticalconfigs_ = new java.util.ArrayList<context.ContextOuterClass.OpticalConfig>(); - mutable_bitField0_ |= 0x00000001; - } - opticalconfigs_.add(input.readMessage(context.ContextOuterClass.OpticalConfig.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - opticalconfigs_ = java.util.Collections.unmodifiableList(opticalconfigs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_OpticalConfigList_descriptor; } @@ -73499,6 +70593,7 @@ public final class ContextOuterClass { public static final int OPTICALCONFIGS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.OpticalConfig> opticalconfigs_; /** @@ -73559,7 +70654,7 @@ public final class ContextOuterClass { for (int i = 0; i < opticalconfigs_.size(); i++) { output.writeMessage(1, opticalconfigs_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -73571,7 +70666,7 @@ public final class ContextOuterClass { for (int i = 0; i < opticalconfigs_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, opticalconfigs_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -73587,7 +70682,7 @@ public final class ContextOuterClass { context.ContextOuterClass.OpticalConfigList other = (context.ContextOuterClass.OpticalConfigList) obj; if (!getOpticalconfigsList().equals(other.getOpticalconfigsList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -73603,7 +70698,7 @@ public final class ContextOuterClass { hash = (37 * hash) + OPTICALCONFIGS_FIELD_NUMBER; hash = (53 * hash) + getOpticalconfigsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -73697,29 +70792,23 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.OpticalConfigList.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getOpticalconfigsFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (opticalconfigsBuilder_ == null) { opticalconfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + opticalconfigs_ = null; opticalconfigsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -73745,7 +70834,15 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.OpticalConfigList buildPartial() { context.ContextOuterClass.OpticalConfigList result = new context.ContextOuterClass.OpticalConfigList(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.OpticalConfigList result) { if (opticalconfigsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { opticalconfigs_ = java.util.Collections.unmodifiableList(opticalconfigs_); @@ -73755,38 +70852,10 @@ public final class ContextOuterClass { } else { result.opticalconfigs_ = opticalconfigsBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); } - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.OpticalConfigList result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -73826,7 +70895,7 @@ public final class ContextOuterClass { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -73838,17 +70907,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.OpticalConfigList parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + context.ContextOuterClass.OpticalConfig m = input.readMessage(context.ContextOuterClass.OpticalConfig.parser(), extensionRegistry); + if (opticalconfigsBuilder_ == null) { + ensureOpticalconfigsIsMutable(); + opticalconfigs_.add(m); + } else { + opticalconfigsBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.OpticalConfigList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -74118,7 +71217,17 @@ public final class ContextOuterClass { @java.lang.Override public OpticalConfigList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OpticalConfigList(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -74180,57 +71289,6 @@ public final class ContextOuterClass { return new OpticalLinkId(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private OpticalLinkId(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.Uuid.Builder subBuilder = null; - if (opticalLinkUuid_ != null) { - subBuilder = opticalLinkUuid_.toBuilder(); - } - opticalLinkUuid_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(opticalLinkUuid_); - opticalLinkUuid_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_OpticalLinkId_descriptor; } @@ -74267,7 +71325,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.UuidOrBuilder getOpticalLinkUuidOrBuilder() { - return getOpticalLinkUuid(); + return opticalLinkUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : opticalLinkUuid_; } private byte memoizedIsInitialized = -1; @@ -74288,7 +71346,7 @@ public final class ContextOuterClass { if (opticalLinkUuid_ != null) { output.writeMessage(1, getOpticalLinkUuid()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -74300,7 +71358,7 @@ public final class ContextOuterClass { if (opticalLinkUuid_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOpticalLinkUuid()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -74320,7 +71378,7 @@ public final class ContextOuterClass { if (!getOpticalLinkUuid().equals(other.getOpticalLinkUuid())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -74336,7 +71394,7 @@ public final class ContextOuterClass { hash = (37 * hash) + OPTICAL_LINK_UUID_FIELD_NUMBER; hash = (53 * hash) + getOpticalLinkUuid().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -74430,26 +71488,19 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.OpticalLinkId.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (opticalLinkUuidBuilder_ == null) { - opticalLinkUuid_ = null; - } else { - opticalLinkUuid_ = null; + bitField0_ = 0; + opticalLinkUuid_ = null; + if (opticalLinkUuidBuilder_ != null) { + opticalLinkUuidBuilder_.dispose(); opticalLinkUuidBuilder_ = null; } return this; @@ -74477,43 +71528,18 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.OpticalLinkId buildPartial() { context.ContextOuterClass.OpticalLinkId result = new context.ContextOuterClass.OpticalLinkId(this); - if (opticalLinkUuidBuilder_ == null) { - result.opticalLinkUuid_ = opticalLinkUuid_; - } else { - result.opticalLinkUuid_ = opticalLinkUuidBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.OpticalLinkId result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.opticalLinkUuid_ = opticalLinkUuidBuilder_ == null ? opticalLinkUuid_ : opticalLinkUuidBuilder_.build(); + } } @java.lang.Override @@ -74532,7 +71558,7 @@ public final class ContextOuterClass { if (other.hasOpticalLinkUuid()) { mergeOpticalLinkUuid(other.getOpticalLinkUuid()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -74544,20 +71570,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.OpticalLinkId parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getOpticalLinkUuidFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.OpticalLinkId) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.Uuid opticalLinkUuid_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> opticalLinkUuidBuilder_; @@ -74567,7 +71620,7 @@ public final class ContextOuterClass { * @return Whether the opticalLinkUuid field is set. */ public boolean hasOpticalLinkUuid() { - return opticalLinkUuidBuilder_ != null || opticalLinkUuid_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -74591,10 +71644,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } opticalLinkUuid_ = value; - onChanged(); } else { opticalLinkUuidBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -74604,10 +71658,11 @@ public final class ContextOuterClass { public Builder setOpticalLinkUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { if (opticalLinkUuidBuilder_ == null) { opticalLinkUuid_ = builderForValue.build(); - onChanged(); } else { opticalLinkUuidBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -74616,15 +71671,16 @@ public final class ContextOuterClass { */ public Builder mergeOpticalLinkUuid(context.ContextOuterClass.Uuid value) { if (opticalLinkUuidBuilder_ == null) { - if (opticalLinkUuid_ != null) { - opticalLinkUuid_ = context.ContextOuterClass.Uuid.newBuilder(opticalLinkUuid_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && opticalLinkUuid_ != null && opticalLinkUuid_ != context.ContextOuterClass.Uuid.getDefaultInstance()) { + getOpticalLinkUuidBuilder().mergeFrom(value); } else { opticalLinkUuid_ = value; } - onChanged(); } else { opticalLinkUuidBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -74632,13 +71688,13 @@ public final class ContextOuterClass { * <code>.context.Uuid optical_link_uuid = 1;</code> */ public Builder clearOpticalLinkUuid() { - if (opticalLinkUuidBuilder_ == null) { - opticalLinkUuid_ = null; - onChanged(); - } else { - opticalLinkUuid_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + opticalLinkUuid_ = null; + if (opticalLinkUuidBuilder_ != null) { + opticalLinkUuidBuilder_.dispose(); opticalLinkUuidBuilder_ = null; } + onChanged(); return this; } @@ -74646,6 +71702,7 @@ public final class ContextOuterClass { * <code>.context.Uuid optical_link_uuid = 1;</code> */ public context.ContextOuterClass.Uuid.Builder getOpticalLinkUuidBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getOpticalLinkUuidFieldBuilder().getBuilder(); } @@ -74699,7 +71756,17 @@ public final class ContextOuterClass { @java.lang.Override public OpticalLinkId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OpticalLinkId(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -74761,57 +71828,6 @@ public final class ContextOuterClass { return new FiberId(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private FiberId(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.Uuid.Builder subBuilder = null; - if (fiberUuid_ != null) { - subBuilder = fiberUuid_.toBuilder(); - } - fiberUuid_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(fiberUuid_); - fiberUuid_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_FiberId_descriptor; } @@ -74848,7 +71864,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.UuidOrBuilder getFiberUuidOrBuilder() { - return getFiberUuid(); + return fiberUuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : fiberUuid_; } private byte memoizedIsInitialized = -1; @@ -74869,7 +71885,7 @@ public final class ContextOuterClass { if (fiberUuid_ != null) { output.writeMessage(1, getFiberUuid()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -74881,7 +71897,7 @@ public final class ContextOuterClass { if (fiberUuid_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getFiberUuid()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -74901,7 +71917,7 @@ public final class ContextOuterClass { if (!getFiberUuid().equals(other.getFiberUuid())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -74917,7 +71933,7 @@ public final class ContextOuterClass { hash = (37 * hash) + FIBER_UUID_FIELD_NUMBER; hash = (53 * hash) + getFiberUuid().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -75011,26 +72027,19 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.FiberId.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (fiberUuidBuilder_ == null) { - fiberUuid_ = null; - } else { - fiberUuid_ = null; + bitField0_ = 0; + fiberUuid_ = null; + if (fiberUuidBuilder_ != null) { + fiberUuidBuilder_.dispose(); fiberUuidBuilder_ = null; } return this; @@ -75058,43 +72067,18 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.FiberId buildPartial() { context.ContextOuterClass.FiberId result = new context.ContextOuterClass.FiberId(this); - if (fiberUuidBuilder_ == null) { - result.fiberUuid_ = fiberUuid_; - } else { - result.fiberUuid_ = fiberUuidBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.FiberId result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.fiberUuid_ = fiberUuidBuilder_ == null ? fiberUuid_ : fiberUuidBuilder_.build(); + } } @java.lang.Override @@ -75113,7 +72097,7 @@ public final class ContextOuterClass { if (other.hasFiberUuid()) { mergeFiberUuid(other.getFiberUuid()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -75125,20 +72109,47 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.FiberId parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getFiberUuidFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.FiberId) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.Uuid fiberUuid_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> fiberUuidBuilder_; @@ -75148,7 +72159,7 @@ public final class ContextOuterClass { * @return Whether the fiberUuid field is set. */ public boolean hasFiberUuid() { - return fiberUuidBuilder_ != null || fiberUuid_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -75172,10 +72183,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } fiberUuid_ = value; - onChanged(); } else { fiberUuidBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -75185,10 +72197,11 @@ public final class ContextOuterClass { public Builder setFiberUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { if (fiberUuidBuilder_ == null) { fiberUuid_ = builderForValue.build(); - onChanged(); } else { fiberUuidBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -75197,15 +72210,16 @@ public final class ContextOuterClass { */ public Builder mergeFiberUuid(context.ContextOuterClass.Uuid value) { if (fiberUuidBuilder_ == null) { - if (fiberUuid_ != null) { - fiberUuid_ = context.ContextOuterClass.Uuid.newBuilder(fiberUuid_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && fiberUuid_ != null && fiberUuid_ != context.ContextOuterClass.Uuid.getDefaultInstance()) { + getFiberUuidBuilder().mergeFrom(value); } else { fiberUuid_ = value; } - onChanged(); } else { fiberUuidBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -75213,13 +72227,13 @@ public final class ContextOuterClass { * <code>.context.Uuid fiber_uuid = 1;</code> */ public Builder clearFiberUuid() { - if (fiberUuidBuilder_ == null) { - fiberUuid_ = null; - onChanged(); - } else { - fiberUuid_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + fiberUuid_ = null; + if (fiberUuidBuilder_ != null) { + fiberUuidBuilder_.dispose(); fiberUuidBuilder_ = null; } + onChanged(); return this; } @@ -75227,6 +72241,7 @@ public final class ContextOuterClass { * <code>.context.Uuid fiber_uuid = 1;</code> */ public context.ContextOuterClass.Uuid.Builder getFiberUuidBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getFiberUuidFieldBuilder().getBuilder(); } @@ -75280,7 +72295,17 @@ public final class ContextOuterClass { @java.lang.Override public FiberId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FiberId(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -75479,179 +72504,6 @@ public final class ContextOuterClass { return new Fiber(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Fiber(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - srcPort_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - dstPort_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - localPeerPort_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - remotePeerPort_ = s; - break; - } - case 40: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - cSlots_ = newIntList(); - mutable_bitField0_ |= 0x00000001; - } - cSlots_.addInt(input.readInt32()); - break; - } - case 42: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { - cSlots_ = newIntList(); - mutable_bitField0_ |= 0x00000001; - } - while (input.getBytesUntilLimit() > 0) { - cSlots_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } - case 48: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - lSlots_ = newIntList(); - mutable_bitField0_ |= 0x00000002; - } - lSlots_.addInt(input.readInt32()); - break; - } - case 50: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) { - lSlots_ = newIntList(); - mutable_bitField0_ |= 0x00000002; - } - while (input.getBytesUntilLimit() > 0) { - lSlots_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } - case 56: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - sSlots_ = newIntList(); - mutable_bitField0_ |= 0x00000004; - } - sSlots_.addInt(input.readInt32()); - break; - } - case 58: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) { - sSlots_ = newIntList(); - mutable_bitField0_ |= 0x00000004; - } - while (input.getBytesUntilLimit() > 0) { - sSlots_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } - case 69: - { - length_ = input.readFloat(); - break; - } - case 72: - { - used_ = input.readBool(); - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - iD_ = s; - break; - } - case 90: - { - context.ContextOuterClass.FiberId.Builder subBuilder = null; - if (fiberUuid_ != null) { - subBuilder = fiberUuid_.toBuilder(); - } - fiberUuid_ = input.readMessage(context.ContextOuterClass.FiberId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(fiberUuid_); - fiberUuid_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - // C - cSlots_.makeImmutable(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - // C - lSlots_.makeImmutable(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - // C - sSlots_.makeImmutable(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_Fiber_descriptor; } @@ -75663,7 +72515,8 @@ public final class ContextOuterClass { public static final int ID_FIELD_NUMBER = 10; - private volatile java.lang.Object iD_; + @SuppressWarnings("serial") + private volatile java.lang.Object iD_ = ""; /** * <code>string ID = 10;</code> @@ -75700,7 +72553,8 @@ public final class ContextOuterClass { public static final int SRC_PORT_FIELD_NUMBER = 1; - private volatile java.lang.Object srcPort_; + @SuppressWarnings("serial") + private volatile java.lang.Object srcPort_ = ""; /** * <code>string src_port = 1;</code> @@ -75737,7 +72591,8 @@ public final class ContextOuterClass { public static final int DST_PORT_FIELD_NUMBER = 2; - private volatile java.lang.Object dstPort_; + @SuppressWarnings("serial") + private volatile java.lang.Object dstPort_ = ""; /** * <code>string dst_port = 2;</code> @@ -75774,7 +72629,8 @@ public final class ContextOuterClass { public static final int LOCAL_PEER_PORT_FIELD_NUMBER = 3; - private volatile java.lang.Object localPeerPort_; + @SuppressWarnings("serial") + private volatile java.lang.Object localPeerPort_ = ""; /** * <code>string local_peer_port = 3;</code> @@ -75811,7 +72667,8 @@ public final class ContextOuterClass { public static final int REMOTE_PEER_PORT_FIELD_NUMBER = 4; - private volatile java.lang.Object remotePeerPort_; + @SuppressWarnings("serial") + private volatile java.lang.Object remotePeerPort_ = ""; /** * <code>string remote_peer_port = 4;</code> @@ -75848,6 +72705,7 @@ public final class ContextOuterClass { public static final int C_SLOTS_FIELD_NUMBER = 5; + @SuppressWarnings("serial") private com.google.protobuf.Internal.IntList cSlots_; /** @@ -75880,6 +72738,7 @@ public final class ContextOuterClass { public static final int L_SLOTS_FIELD_NUMBER = 6; + @SuppressWarnings("serial") private com.google.protobuf.Internal.IntList lSlots_; /** @@ -75912,6 +72771,7 @@ public final class ContextOuterClass { public static final int S_SLOTS_FIELD_NUMBER = 7; + @SuppressWarnings("serial") private com.google.protobuf.Internal.IntList sSlots_; /** @@ -75944,7 +72804,7 @@ public final class ContextOuterClass { public static final int LENGTH_FIELD_NUMBER = 8; - private float length_; + private float length_ = 0F; /** * <code>float length = 8;</code> @@ -75957,7 +72817,7 @@ public final class ContextOuterClass { public static final int USED_FIELD_NUMBER = 9; - private boolean used_; + private boolean used_ = false; /** * <code>bool used = 9;</code> @@ -75995,7 +72855,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.FiberIdOrBuilder getFiberUuidOrBuilder() { - return getFiberUuid(); + return fiberUuid_ == null ? context.ContextOuterClass.FiberId.getDefaultInstance() : fiberUuid_; } private byte memoizedIsInitialized = -1; @@ -76014,16 +72874,16 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (!getSrcPortBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(srcPort_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, srcPort_); } - if (!getDstPortBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dstPort_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dstPort_); } - if (!getLocalPeerPortBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(localPeerPort_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, localPeerPort_); } - if (!getRemotePeerPortBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remotePeerPort_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, remotePeerPort_); } if (getCSlotsList().size() > 0) { @@ -76047,19 +72907,19 @@ public final class ContextOuterClass { for (int i = 0; i < sSlots_.size(); i++) { output.writeInt32NoTag(sSlots_.getInt(i)); } - if (length_ != 0F) { + if (java.lang.Float.floatToRawIntBits(length_) != 0) { output.writeFloat(8, length_); } if (used_ != false) { output.writeBool(9, used_); } - if (!getIDBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(iD_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 10, iD_); } if (fiberUuid_ != null) { output.writeMessage(11, getFiberUuid()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -76068,16 +72928,16 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (!getSrcPortBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(srcPort_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, srcPort_); } - if (!getDstPortBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dstPort_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dstPort_); } - if (!getLocalPeerPortBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(localPeerPort_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, localPeerPort_); } - if (!getRemotePeerPortBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remotePeerPort_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, remotePeerPort_); } { @@ -76116,19 +72976,19 @@ public final class ContextOuterClass { } sSlotsMemoizedSerializedSize = dataSize; } - if (length_ != 0F) { + if (java.lang.Float.floatToRawIntBits(length_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(8, length_); } if (used_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(9, used_); } - if (!getIDBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(iD_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, iD_); } if (fiberUuid_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getFiberUuid()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -76168,7 +73028,7 @@ public final class ContextOuterClass { if (!getFiberUuid().equals(other.getFiberUuid())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -76210,7 +73070,7 @@ public final class ContextOuterClass { hash = (37 * hash) + FIBER_UUID_FIELD_NUMBER; hash = (53 * hash) + getFiberUuid().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -76304,39 +73164,29 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.Fiber.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; iD_ = ""; srcPort_ = ""; dstPort_ = ""; localPeerPort_ = ""; remotePeerPort_ = ""; cSlots_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); lSlots_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000002); sSlots_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000004); length_ = 0F; used_ = false; - if (fiberUuidBuilder_ == null) { - fiberUuid_ = null; - } else { - fiberUuid_ = null; + fiberUuid_ = null; + if (fiberUuidBuilder_ != null) { + fiberUuidBuilder_.dispose(); fiberUuidBuilder_ = null; } return this; @@ -76364,66 +73214,58 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.Fiber buildPartial() { context.ContextOuterClass.Fiber result = new context.ContextOuterClass.Fiber(this); - int from_bitField0_ = bitField0_; - result.iD_ = iD_; - result.srcPort_ = srcPort_; - result.dstPort_ = dstPort_; - result.localPeerPort_ = localPeerPort_; - result.remotePeerPort_ = remotePeerPort_; - if (((bitField0_ & 0x00000001) != 0)) { + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.Fiber result) { + if (((bitField0_ & 0x00000020) != 0)) { cSlots_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000020); } result.cSlots_ = cSlots_; - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000040) != 0)) { lSlots_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000040); } result.lSlots_ = lSlots_; - if (((bitField0_ & 0x00000004) != 0)) { + if (((bitField0_ & 0x00000080) != 0)) { sSlots_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000080); } result.sSlots_ = sSlots_; - result.length_ = length_; - result.used_ = used_; - if (fiberUuidBuilder_ == null) { - result.fiberUuid_ = fiberUuid_; - } else { - result.fiberUuid_ = fiberUuidBuilder_.build(); - } - onBuilt(); - return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.Fiber result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.iD_ = iD_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.srcPort_ = srcPort_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.dstPort_ = dstPort_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.localPeerPort_ = localPeerPort_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.remotePeerPort_ = remotePeerPort_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.length_ = length_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.used_ = used_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.fiberUuid_ = fiberUuidBuilder_ == null ? fiberUuid_ : fiberUuidBuilder_.build(); + } } @java.lang.Override @@ -76441,28 +73283,33 @@ public final class ContextOuterClass { return this; if (!other.getID().isEmpty()) { iD_ = other.iD_; + bitField0_ |= 0x00000001; onChanged(); } if (!other.getSrcPort().isEmpty()) { srcPort_ = other.srcPort_; + bitField0_ |= 0x00000002; onChanged(); } if (!other.getDstPort().isEmpty()) { dstPort_ = other.dstPort_; + bitField0_ |= 0x00000004; onChanged(); } if (!other.getLocalPeerPort().isEmpty()) { localPeerPort_ = other.localPeerPort_; + bitField0_ |= 0x00000008; onChanged(); } if (!other.getRemotePeerPort().isEmpty()) { remotePeerPort_ = other.remotePeerPort_; + bitField0_ |= 0x00000010; onChanged(); } if (!other.cSlots_.isEmpty()) { if (cSlots_.isEmpty()) { cSlots_ = other.cSlots_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000020); } else { ensureCSlotsIsMutable(); cSlots_.addAll(other.cSlots_); @@ -76472,7 +73319,7 @@ public final class ContextOuterClass { if (!other.lSlots_.isEmpty()) { if (lSlots_.isEmpty()) { lSlots_ = other.lSlots_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000040); } else { ensureLSlotsIsMutable(); lSlots_.addAll(other.lSlots_); @@ -76482,7 +73329,7 @@ public final class ContextOuterClass { if (!other.sSlots_.isEmpty()) { if (sSlots_.isEmpty()) { sSlots_ = other.sSlots_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000080); } else { ensureSSlotsIsMutable(); sSlots_.addAll(other.sSlots_); @@ -76498,7 +73345,7 @@ public final class ContextOuterClass { if (other.hasFiberUuid()) { mergeFiberUuid(other.getFiberUuid()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -76510,17 +73357,151 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.Fiber parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + srcPort_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 10 + case 18: + { + dstPort_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } + // case 18 + case 26: + { + localPeerPort_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } + // case 26 + case 34: + { + remotePeerPort_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } + // case 34 + case 40: + { + int v = input.readInt32(); + ensureCSlotsIsMutable(); + cSlots_.addInt(v); + break; + } + // case 40 + case 42: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureCSlotsIsMutable(); + while (input.getBytesUntilLimit() > 0) { + cSlots_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } + // case 42 + case 48: + { + int v = input.readInt32(); + ensureLSlotsIsMutable(); + lSlots_.addInt(v); + break; + } + // case 48 + case 50: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureLSlotsIsMutable(); + while (input.getBytesUntilLimit() > 0) { + lSlots_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } + // case 50 + case 56: + { + int v = input.readInt32(); + ensureSSlotsIsMutable(); + sSlots_.addInt(v); + break; + } + // case 56 + case 58: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureSSlotsIsMutable(); + while (input.getBytesUntilLimit() > 0) { + sSlots_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } + // case 58 + case 69: + { + length_ = input.readFloat(); + bitField0_ |= 0x00000100; + break; + } + // case 69 + case 72: + { + used_ = input.readBool(); + bitField0_ |= 0x00000200; + break; + } + // case 72 + case 82: + { + iD_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } + // case 82 + case 90: + { + input.readMessage(getFiberUuidFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } + // case 90 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.Fiber) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -76569,6 +73550,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } iD_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -76579,6 +73561,7 @@ public final class ContextOuterClass { */ public Builder clearID() { iD_ = getDefaultInstance().getID(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -76594,6 +73577,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); iD_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -76641,6 +73625,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } srcPort_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -76651,6 +73636,7 @@ public final class ContextOuterClass { */ public Builder clearSrcPort() { srcPort_ = getDefaultInstance().getSrcPort(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -76666,6 +73652,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); srcPort_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -76713,6 +73700,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } dstPort_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -76723,6 +73711,7 @@ public final class ContextOuterClass { */ public Builder clearDstPort() { dstPort_ = getDefaultInstance().getDstPort(); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } @@ -76738,6 +73727,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); dstPort_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -76785,6 +73775,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } localPeerPort_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -76795,6 +73786,7 @@ public final class ContextOuterClass { */ public Builder clearLocalPeerPort() { localPeerPort_ = getDefaultInstance().getLocalPeerPort(); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } @@ -76810,6 +73802,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); localPeerPort_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -76857,6 +73850,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } remotePeerPort_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -76867,6 +73861,7 @@ public final class ContextOuterClass { */ public Builder clearRemotePeerPort() { remotePeerPort_ = getDefaultInstance().getRemotePeerPort(); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } @@ -76882,6 +73877,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); remotePeerPort_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -76889,9 +73885,9 @@ public final class ContextOuterClass { private com.google.protobuf.Internal.IntList cSlots_ = emptyIntList(); private void ensureCSlotsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!((bitField0_ & 0x00000020) != 0)) { cSlots_ = mutableCopy(cSlots_); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000020; } } @@ -76900,7 +73896,7 @@ public final class ContextOuterClass { * @return A list containing the cSlots. */ public java.util.List<java.lang.Integer> getCSlotsList() { - return ((bitField0_ & 0x00000001) != 0) ? java.util.Collections.unmodifiableList(cSlots_) : cSlots_; + return ((bitField0_ & 0x00000020) != 0) ? java.util.Collections.unmodifiableList(cSlots_) : cSlots_; } /** @@ -76963,7 +73959,7 @@ public final class ContextOuterClass { */ public Builder clearCSlots() { cSlots_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } @@ -76971,9 +73967,9 @@ public final class ContextOuterClass { private com.google.protobuf.Internal.IntList lSlots_ = emptyIntList(); private void ensureLSlotsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { + if (!((bitField0_ & 0x00000040) != 0)) { lSlots_ = mutableCopy(lSlots_); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000040; } } @@ -76982,7 +73978,7 @@ public final class ContextOuterClass { * @return A list containing the lSlots. */ public java.util.List<java.lang.Integer> getLSlotsList() { - return ((bitField0_ & 0x00000002) != 0) ? java.util.Collections.unmodifiableList(lSlots_) : lSlots_; + return ((bitField0_ & 0x00000040) != 0) ? java.util.Collections.unmodifiableList(lSlots_) : lSlots_; } /** @@ -77045,7 +74041,7 @@ public final class ContextOuterClass { */ public Builder clearLSlots() { lSlots_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000040); onChanged(); return this; } @@ -77053,9 +74049,9 @@ public final class ContextOuterClass { private com.google.protobuf.Internal.IntList sSlots_ = emptyIntList(); private void ensureSSlotsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { + if (!((bitField0_ & 0x00000080) != 0)) { sSlots_ = mutableCopy(sSlots_); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000080; } } @@ -77064,7 +74060,7 @@ public final class ContextOuterClass { * @return A list containing the sSlots. */ public java.util.List<java.lang.Integer> getSSlotsList() { - return ((bitField0_ & 0x00000004) != 0) ? java.util.Collections.unmodifiableList(sSlots_) : sSlots_; + return ((bitField0_ & 0x00000080) != 0) ? java.util.Collections.unmodifiableList(sSlots_) : sSlots_; } /** @@ -77127,7 +74123,7 @@ public final class ContextOuterClass { */ public Builder clearSSlots() { sSlots_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000080); onChanged(); return this; } @@ -77150,6 +74146,7 @@ public final class ContextOuterClass { */ public Builder setLength(float value) { length_ = value; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -77159,6 +74156,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearLength() { + bitField0_ = (bitField0_ & ~0x00000100); length_ = 0F; onChanged(); return this; @@ -77182,6 +74180,7 @@ public final class ContextOuterClass { */ public Builder setUsed(boolean value) { used_ = value; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -77191,6 +74190,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearUsed() { + bitField0_ = (bitField0_ & ~0x00000200); used_ = false; onChanged(); return this; @@ -77205,7 +74205,7 @@ public final class ContextOuterClass { * @return Whether the fiberUuid field is set. */ public boolean hasFiberUuid() { - return fiberUuidBuilder_ != null || fiberUuid_ != null; + return ((bitField0_ & 0x00000400) != 0); } /** @@ -77229,10 +74229,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } fiberUuid_ = value; - onChanged(); } else { fiberUuidBuilder_.setMessage(value); } + bitField0_ |= 0x00000400; + onChanged(); return this; } @@ -77242,10 +74243,11 @@ public final class ContextOuterClass { public Builder setFiberUuid(context.ContextOuterClass.FiberId.Builder builderForValue) { if (fiberUuidBuilder_ == null) { fiberUuid_ = builderForValue.build(); - onChanged(); } else { fiberUuidBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000400; + onChanged(); return this; } @@ -77254,15 +74256,16 @@ public final class ContextOuterClass { */ public Builder mergeFiberUuid(context.ContextOuterClass.FiberId value) { if (fiberUuidBuilder_ == null) { - if (fiberUuid_ != null) { - fiberUuid_ = context.ContextOuterClass.FiberId.newBuilder(fiberUuid_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000400) != 0) && fiberUuid_ != null && fiberUuid_ != context.ContextOuterClass.FiberId.getDefaultInstance()) { + getFiberUuidBuilder().mergeFrom(value); } else { fiberUuid_ = value; } - onChanged(); } else { fiberUuidBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000400; + onChanged(); return this; } @@ -77270,13 +74273,13 @@ public final class ContextOuterClass { * <code>.context.FiberId fiber_uuid = 11;</code> */ public Builder clearFiberUuid() { - if (fiberUuidBuilder_ == null) { - fiberUuid_ = null; - onChanged(); - } else { - fiberUuid_ = null; + bitField0_ = (bitField0_ & ~0x00000400); + fiberUuid_ = null; + if (fiberUuidBuilder_ != null) { + fiberUuidBuilder_.dispose(); fiberUuidBuilder_ = null; } + onChanged(); return this; } @@ -77284,6 +74287,7 @@ public final class ContextOuterClass { * <code>.context.FiberId fiber_uuid = 11;</code> */ public context.ContextOuterClass.FiberId.Builder getFiberUuidBuilder() { + bitField0_ |= 0x00000400; onChanged(); return getFiberUuidFieldBuilder().getBuilder(); } @@ -77337,7 +74341,17 @@ public final class ContextOuterClass { @java.lang.Override public Fiber parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Fiber(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -77440,74 +74454,6 @@ public final class ContextOuterClass { return new OpticalLinkDetails(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private OpticalLinkDetails(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 13: - { - length_ = input.readFloat(); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - source_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - target_ = s; - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - fibers_ = new java.util.ArrayList<context.ContextOuterClass.Fiber>(); - mutable_bitField0_ |= 0x00000001; - } - fibers_.add(input.readMessage(context.ContextOuterClass.Fiber.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - fibers_ = java.util.Collections.unmodifiableList(fibers_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_OpticalLinkDetails_descriptor; } @@ -77519,7 +74465,7 @@ public final class ContextOuterClass { public static final int LENGTH_FIELD_NUMBER = 1; - private float length_; + private float length_ = 0F; /** * <code>float length = 1;</code> @@ -77532,7 +74478,8 @@ public final class ContextOuterClass { public static final int SOURCE_FIELD_NUMBER = 2; - private volatile java.lang.Object source_; + @SuppressWarnings("serial") + private volatile java.lang.Object source_ = ""; /** * <code>string source = 2;</code> @@ -77569,7 +74516,8 @@ public final class ContextOuterClass { public static final int TARGET_FIELD_NUMBER = 3; - private volatile java.lang.Object target_; + @SuppressWarnings("serial") + private volatile java.lang.Object target_ = ""; /** * <code>string target = 3;</code> @@ -77606,6 +74554,7 @@ public final class ContextOuterClass { public static final int FIBERS_FIELD_NUMBER = 4; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.Fiber> fibers_; /** @@ -77663,19 +74612,19 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (length_ != 0F) { + if (java.lang.Float.floatToRawIntBits(length_) != 0) { output.writeFloat(1, length_); } - if (!getSourceBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(source_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, source_); } - if (!getTargetBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, target_); } for (int i = 0; i < fibers_.size(); i++) { output.writeMessage(4, fibers_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -77684,19 +74633,19 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (length_ != 0F) { + if (java.lang.Float.floatToRawIntBits(length_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, length_); } - if (!getSourceBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(source_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, source_); } - if (!getTargetBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(target_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, target_); } for (int i = 0; i < fibers_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, fibers_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -77718,7 +74667,7 @@ public final class ContextOuterClass { return false; if (!getFibersList().equals(other.getFibersList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -77740,7 +74689,7 @@ public final class ContextOuterClass { hash = (37 * hash) + FIBERS_FIELD_NUMBER; hash = (53 * hash) + getFibersList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -77834,32 +74783,26 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.OpticalLinkDetails.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getFibersFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; length_ = 0F; source_ = ""; target_ = ""; if (fibersBuilder_ == null) { fibers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + fibers_ = null; fibersBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -77885,51 +74828,37 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.OpticalLinkDetails buildPartial() { context.ContextOuterClass.OpticalLinkDetails result = new context.ContextOuterClass.OpticalLinkDetails(this); - int from_bitField0_ = bitField0_; - result.length_ = length_; - result.source_ = source_; - result.target_ = target_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(context.ContextOuterClass.OpticalLinkDetails result) { if (fibersBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000008) != 0)) { fibers_ = java.util.Collections.unmodifiableList(fibers_); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000008); } result.fibers_ = fibers_; } else { result.fibers_ = fibersBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); } - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.OpticalLinkDetails result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.length_ = length_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.source_ = source_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.target_ = target_; + } } @java.lang.Override @@ -77950,17 +74879,19 @@ public final class ContextOuterClass { } if (!other.getSource().isEmpty()) { source_ = other.source_; + bitField0_ |= 0x00000002; onChanged(); } if (!other.getTarget().isEmpty()) { target_ = other.target_; + bitField0_ |= 0x00000004; onChanged(); } if (fibersBuilder_ == null) { if (!other.fibers_.isEmpty()) { if (fibers_.isEmpty()) { fibers_ = other.fibers_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000008); } else { ensureFibersIsMutable(); fibers_.addAll(other.fibers_); @@ -77973,14 +74904,14 @@ public final class ContextOuterClass { fibersBuilder_.dispose(); fibersBuilder_ = null; fibers_ = other.fibers_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000008); fibersBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getFibersFieldBuilder() : null; } else { fibersBuilder_.addAllMessages(other.fibers_); } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -77992,17 +74923,68 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.OpticalLinkDetails parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 13: + { + length_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } + // case 13 + case 18: + { + source_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 26: + { + target_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } + // case 26 + case 34: + { + context.ContextOuterClass.Fiber m = input.readMessage(context.ContextOuterClass.Fiber.parser(), extensionRegistry); + if (fibersBuilder_ == null) { + ensureFibersIsMutable(); + fibers_.add(m); + } else { + fibersBuilder_.addMessage(m); + } + break; + } + // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.OpticalLinkDetails) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -78026,6 +75008,7 @@ public final class ContextOuterClass { */ public Builder setLength(float value) { length_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -78035,6 +75018,7 @@ public final class ContextOuterClass { * @return This builder for chaining. */ public Builder clearLength() { + bitField0_ = (bitField0_ & ~0x00000001); length_ = 0F; onChanged(); return this; @@ -78083,6 +75067,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } source_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -78093,6 +75078,7 @@ public final class ContextOuterClass { */ public Builder clearSource() { source_ = getDefaultInstance().getSource(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -78108,6 +75094,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); source_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -78155,6 +75142,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } target_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -78165,6 +75153,7 @@ public final class ContextOuterClass { */ public Builder clearTarget() { target_ = getDefaultInstance().getTarget(); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } @@ -78180,6 +75169,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); target_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -78187,9 +75177,9 @@ public final class ContextOuterClass { private java.util.List<context.ContextOuterClass.Fiber> fibers_ = java.util.Collections.emptyList(); private void ensureFibersIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!((bitField0_ & 0x00000008) != 0)) { fibers_ = new java.util.ArrayList<context.ContextOuterClass.Fiber>(fibers_); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000008; } } @@ -78341,7 +75331,7 @@ public final class ContextOuterClass { public Builder clearFibers() { if (fibersBuilder_ == null) { fibers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { fibersBuilder_.clear(); @@ -78415,7 +75405,7 @@ public final class ContextOuterClass { private com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.Fiber, context.ContextOuterClass.Fiber.Builder, context.ContextOuterClass.FiberOrBuilder> getFibersFieldBuilder() { if (fibersBuilder_ == null) { - fibersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.Fiber, context.ContextOuterClass.Fiber.Builder, context.ContextOuterClass.FiberOrBuilder>(fibers_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + fibersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.Fiber, context.ContextOuterClass.Fiber.Builder, context.ContextOuterClass.FiberOrBuilder>(fibers_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); fibers_ = null; } return fibersBuilder_; @@ -78448,7 +75438,17 @@ public final class ContextOuterClass { @java.lang.Override public OpticalLinkDetails parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OpticalLinkDetails(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -78540,76 +75540,6 @@ public final class ContextOuterClass { return new OpticalLink(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private OpticalLink(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - name_ = s; - break; - } - case 18: - { - context.ContextOuterClass.OpticalLinkDetails.Builder subBuilder = null; - if (details_ != null) { - subBuilder = details_.toBuilder(); - } - details_ = input.readMessage(context.ContextOuterClass.OpticalLinkDetails.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(details_); - details_ = subBuilder.buildPartial(); - } - break; - } - case 26: - { - context.ContextOuterClass.OpticalLinkId.Builder subBuilder = null; - if (opticalLinkUuid_ != null) { - subBuilder = opticalLinkUuid_.toBuilder(); - } - opticalLinkUuid_ = input.readMessage(context.ContextOuterClass.OpticalLinkId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(opticalLinkUuid_); - opticalLinkUuid_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return context.ContextOuterClass.internal_static_context_OpticalLink_descriptor; } @@ -78621,7 +75551,8 @@ public final class ContextOuterClass { public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** * <code>string name = 1;</code> @@ -78683,7 +75614,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.OpticalLinkDetailsOrBuilder getDetailsOrBuilder() { - return getDetails(); + return details_ == null ? context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance() : details_; } public static final int OPTICAL_LINK_UUID_FIELD_NUMBER = 3; @@ -78713,7 +75644,7 @@ public final class ContextOuterClass { */ @java.lang.Override public context.ContextOuterClass.OpticalLinkIdOrBuilder getOpticalLinkUuidOrBuilder() { - return getOpticalLinkUuid(); + return opticalLinkUuid_ == null ? context.ContextOuterClass.OpticalLinkId.getDefaultInstance() : opticalLinkUuid_; } private byte memoizedIsInitialized = -1; @@ -78731,7 +75662,7 @@ public final class ContextOuterClass { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (details_ != null) { @@ -78740,7 +75671,7 @@ public final class ContextOuterClass { if (opticalLinkUuid_ != null) { output.writeMessage(3, getOpticalLinkUuid()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -78749,7 +75680,7 @@ public final class ContextOuterClass { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (details_ != null) { @@ -78758,7 +75689,7 @@ public final class ContextOuterClass { if (opticalLinkUuid_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOpticalLinkUuid()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -78786,7 +75717,7 @@ public final class ContextOuterClass { if (!getOpticalLinkUuid().equals(other.getOpticalLinkUuid())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -78808,7 +75739,7 @@ public final class ContextOuterClass { hash = (37 * hash) + OPTICAL_LINK_UUID_FIELD_NUMBER; hash = (53 * hash) + getOpticalLinkUuid().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -78902,33 +75833,25 @@ public final class ContextOuterClass { // Construct using context.ContextOuterClass.OpticalLink.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; name_ = ""; - if (detailsBuilder_ == null) { - details_ = null; - } else { - details_ = null; + details_ = null; + if (detailsBuilder_ != null) { + detailsBuilder_.dispose(); detailsBuilder_ = null; } - if (opticalLinkUuidBuilder_ == null) { - opticalLinkUuid_ = null; - } else { - opticalLinkUuid_ = null; + opticalLinkUuid_ = null; + if (opticalLinkUuidBuilder_ != null) { + opticalLinkUuidBuilder_.dispose(); opticalLinkUuidBuilder_ = null; } return this; @@ -78956,49 +75879,24 @@ public final class ContextOuterClass { @java.lang.Override public context.ContextOuterClass.OpticalLink buildPartial() { context.ContextOuterClass.OpticalLink result = new context.ContextOuterClass.OpticalLink(this); - result.name_ = name_; - if (detailsBuilder_ == null) { - result.details_ = details_; - } else { - result.details_ = detailsBuilder_.build(); - } - if (opticalLinkUuidBuilder_ == null) { - result.opticalLinkUuid_ = opticalLinkUuid_; - } else { - result.opticalLinkUuid_ = opticalLinkUuidBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(context.ContextOuterClass.OpticalLink result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.details_ = detailsBuilder_ == null ? details_ : detailsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.opticalLinkUuid_ = opticalLinkUuidBuilder_ == null ? opticalLinkUuid_ : opticalLinkUuidBuilder_.build(); + } } @java.lang.Override @@ -79016,6 +75914,7 @@ public final class ContextOuterClass { return this; if (!other.getName().isEmpty()) { name_ = other.name_; + bitField0_ |= 0x00000001; onChanged(); } if (other.hasDetails()) { @@ -79024,7 +75923,7 @@ public final class ContextOuterClass { if (other.hasOpticalLinkUuid()) { mergeOpticalLinkUuid(other.getOpticalLinkUuid()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -79036,20 +75935,61 @@ public final class ContextOuterClass { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - context.ContextOuterClass.OpticalLink parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + input.readMessage(getDetailsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 26: + { + input.readMessage(getOpticalLinkUuidFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } + // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (context.ContextOuterClass.OpticalLink) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private java.lang.Object name_ = ""; /** @@ -79093,6 +76033,7 @@ public final class ContextOuterClass { throw new NullPointerException(); } name_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -79103,6 +76044,7 @@ public final class ContextOuterClass { */ public Builder clearName() { name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -79118,6 +76060,7 @@ public final class ContextOuterClass { } checkByteStringIsUtf8(value); name_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -79131,7 +76074,7 @@ public final class ContextOuterClass { * @return Whether the details field is set. */ public boolean hasDetails() { - return detailsBuilder_ != null || details_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** @@ -79155,10 +76098,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } details_ = value; - onChanged(); } else { detailsBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -79168,10 +76112,11 @@ public final class ContextOuterClass { public Builder setDetails(context.ContextOuterClass.OpticalLinkDetails.Builder builderForValue) { if (detailsBuilder_ == null) { details_ = builderForValue.build(); - onChanged(); } else { detailsBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -79180,15 +76125,16 @@ public final class ContextOuterClass { */ public Builder mergeDetails(context.ContextOuterClass.OpticalLinkDetails value) { if (detailsBuilder_ == null) { - if (details_ != null) { - details_ = context.ContextOuterClass.OpticalLinkDetails.newBuilder(details_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000002) != 0) && details_ != null && details_ != context.ContextOuterClass.OpticalLinkDetails.getDefaultInstance()) { + getDetailsBuilder().mergeFrom(value); } else { details_ = value; } - onChanged(); } else { detailsBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -79196,13 +76142,13 @@ public final class ContextOuterClass { * <code>.context.OpticalLinkDetails details = 2;</code> */ public Builder clearDetails() { - if (detailsBuilder_ == null) { - details_ = null; - onChanged(); - } else { - details_ = null; + bitField0_ = (bitField0_ & ~0x00000002); + details_ = null; + if (detailsBuilder_ != null) { + detailsBuilder_.dispose(); detailsBuilder_ = null; } + onChanged(); return this; } @@ -79210,6 +76156,7 @@ public final class ContextOuterClass { * <code>.context.OpticalLinkDetails details = 2;</code> */ public context.ContextOuterClass.OpticalLinkDetails.Builder getDetailsBuilder() { + bitField0_ |= 0x00000002; onChanged(); return getDetailsFieldBuilder().getBuilder(); } @@ -79245,7 +76192,7 @@ public final class ContextOuterClass { * @return Whether the opticalLinkUuid field is set. */ public boolean hasOpticalLinkUuid() { - return opticalLinkUuidBuilder_ != null || opticalLinkUuid_ != null; + return ((bitField0_ & 0x00000004) != 0); } /** @@ -79269,10 +76216,11 @@ public final class ContextOuterClass { throw new NullPointerException(); } opticalLinkUuid_ = value; - onChanged(); } else { opticalLinkUuidBuilder_.setMessage(value); } + bitField0_ |= 0x00000004; + onChanged(); return this; } @@ -79282,10 +76230,11 @@ public final class ContextOuterClass { public Builder setOpticalLinkUuid(context.ContextOuterClass.OpticalLinkId.Builder builderForValue) { if (opticalLinkUuidBuilder_ == null) { opticalLinkUuid_ = builderForValue.build(); - onChanged(); } else { opticalLinkUuidBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000004; + onChanged(); return this; } @@ -79294,15 +76243,16 @@ public final class ContextOuterClass { */ public Builder mergeOpticalLinkUuid(context.ContextOuterClass.OpticalLinkId value) { if (opticalLinkUuidBuilder_ == null) { - if (opticalLinkUuid_ != null) { - opticalLinkUuid_ = context.ContextOuterClass.OpticalLinkId.newBuilder(opticalLinkUuid_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000004) != 0) && opticalLinkUuid_ != null && opticalLinkUuid_ != context.ContextOuterClass.OpticalLinkId.getDefaultInstance()) { + getOpticalLinkUuidBuilder().mergeFrom(value); } else { opticalLinkUuid_ = value; } - onChanged(); } else { opticalLinkUuidBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000004; + onChanged(); return this; } @@ -79310,13 +76260,13 @@ public final class ContextOuterClass { * <code>.context.OpticalLinkId optical_link_uuid = 3;</code> */ public Builder clearOpticalLinkUuid() { - if (opticalLinkUuidBuilder_ == null) { - opticalLinkUuid_ = null; - onChanged(); - } else { - opticalLinkUuid_ = null; + bitField0_ = (bitField0_ & ~0x00000004); + opticalLinkUuid_ = null; + if (opticalLinkUuidBuilder_ != null) { + opticalLinkUuidBuilder_.dispose(); opticalLinkUuidBuilder_ = null; } + onChanged(); return this; } @@ -79324,6 +76274,7 @@ public final class ContextOuterClass { * <code>.context.OpticalLinkId optical_link_uuid = 3;</code> */ public context.ContextOuterClass.OpticalLinkId.Builder getOpticalLinkUuidBuilder() { + bitField0_ |= 0x00000004; onChanged(); return getOpticalLinkUuidFieldBuilder().getBuilder(); } @@ -79377,7 +76328,17 @@ public final class ContextOuterClass { @java.lang.Override public OpticalLink parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OpticalLink(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -79751,7 +76712,7 @@ public final class ContextOuterClass { private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { - java.lang.String[] descriptorData = { "\n\rcontext.proto\022\007context\032\tacl.proto\032\026kpi" + "_sample_types.proto\"\007\n\005Empty\"\024\n\004Uuid\022\014\n\004" + "uuid\030\001 \001(\t\"\036\n\tTimestamp\022\021\n\ttimestamp\030\001 \001" + "(\001\"Z\n\005Event\022%\n\ttimestamp\030\001 \001(\0132\022.context" + ".Timestamp\022*\n\nevent_type\030\002 \001(\0162\026.context" + ".EventTypeEnum\"0\n\tContextId\022#\n\014context_u" + "uid\030\001 \001(\0132\r.context.Uuid\"\351\001\n\007Context\022&\n\n" + "context_id\030\001 \001(\0132\022.context.ContextId\022\014\n\004" + "name\030\002 \001(\t\022)\n\014topology_ids\030\003 \003(\0132\023.conte" + "xt.TopologyId\022\'\n\013service_ids\030\004 \003(\0132\022.con" + "text.ServiceId\022#\n\tslice_ids\030\005 \003(\0132\020.cont" + "ext.SliceId\022/\n\ncontroller\030\006 \001(\0132\033.contex" + "t.TeraFlowController\"8\n\rContextIdList\022\'\n" + "\013context_ids\030\001 \003(\0132\022.context.ContextId\"1" + "\n\013ContextList\022\"\n\010contexts\030\001 \003(\0132\020.contex" + "t.Context\"U\n\014ContextEvent\022\035\n\005event\030\001 \001(\013" + "2\016.context.Event\022&\n\ncontext_id\030\002 \001(\0132\022.c" + "ontext.ContextId\"Z\n\nTopologyId\022&\n\ncontex" + "t_id\030\001 \001(\0132\022.context.ContextId\022$\n\rtopolo" + "gy_uuid\030\002 \001(\0132\r.context.Uuid\"\214\001\n\010Topolog" + "y\022(\n\013topology_id\030\001 \001(\0132\023.context.Topolog" + "yId\022\014\n\004name\030\002 \001(\t\022%\n\ndevice_ids\030\003 \003(\0132\021." + "context.DeviceId\022!\n\010link_ids\030\004 \003(\0132\017.con" + "text.LinkId\"\211\001\n\017TopologyDetails\022(\n\013topol" + "ogy_id\030\001 \001(\0132\023.context.TopologyId\022\014\n\004nam" + "e\030\002 \001(\t\022 \n\007devices\030\003 \003(\0132\017.context.Devic" + "e\022\034\n\005links\030\004 \003(\0132\r.context.Link\";\n\016Topol" + "ogyIdList\022)\n\014topology_ids\030\001 \003(\0132\023.contex" + "t.TopologyId\"5\n\014TopologyList\022%\n\ntopologi" + "es\030\001 \003(\0132\021.context.Topology\"X\n\rTopologyE" + "vent\022\035\n\005event\030\001 \001(\0132\016.context.Event\022(\n\013t" + "opology_id\030\002 \001(\0132\023.context.TopologyId\".\n" + "\010DeviceId\022\"\n\013device_uuid\030\001 \001(\0132\r.context" + ".Uuid\"\372\002\n\006Device\022$\n\tdevice_id\030\001 \001(\0132\021.co" + "ntext.DeviceId\022\014\n\004name\030\002 \001(\t\022\023\n\013device_t" + "ype\030\003 \001(\t\022,\n\rdevice_config\030\004 \001(\0132\025.conte" + "xt.DeviceConfig\022G\n\031device_operational_st" + "atus\030\005 \001(\0162$.context.DeviceOperationalSt" + "atusEnum\0221\n\016device_drivers\030\006 \003(\0162\031.conte" + "xt.DeviceDriverEnum\022+\n\020device_endpoints\030" + "\007 \003(\0132\021.context.EndPoint\022&\n\ncomponents\030\010" + " \003(\0132\022.context.Component\022(\n\rcontroller_i" + "d\030\t \001(\0132\021.context.DeviceId\"\311\001\n\tComponent" + "\022%\n\016component_uuid\030\001 \001(\0132\r.context.Uuid\022" + "\014\n\004name\030\002 \001(\t\022\014\n\004type\030\003 \001(\t\0226\n\nattribute" + "s\030\004 \003(\0132\".context.Component.AttributesEn" + "try\022\016\n\006parent\030\005 \001(\t\0321\n\017AttributesEntry\022\013" + "\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"9\n\014Device" + "Config\022)\n\014config_rules\030\001 \003(\0132\023.context.C" + "onfigRule\"5\n\014DeviceIdList\022%\n\ndevice_ids\030" + "\001 \003(\0132\021.context.DeviceId\".\n\nDeviceList\022 " + "\n\007devices\030\001 \003(\0132\017.context.Device\"\216\001\n\014Dev" + "iceFilter\022)\n\ndevice_ids\030\001 \001(\0132\025.context." + "DeviceIdList\022\031\n\021include_endpoints\030\002 \001(\010\022" + "\034\n\024include_config_rules\030\003 \001(\010\022\032\n\022include" + "_components\030\004 \001(\010\"\200\001\n\013DeviceEvent\022\035\n\005eve" + "nt\030\001 \001(\0132\016.context.Event\022$\n\tdevice_id\030\002 " + "\001(\0132\021.context.DeviceId\022,\n\rdevice_config\030" + "\003 \001(\0132\025.context.DeviceConfig\"*\n\006LinkId\022 " + "\n\tlink_uuid\030\001 \001(\0132\r.context.Uuid\"I\n\016Link" + "Attributes\022\033\n\023total_capacity_gbps\030\001 \001(\002\022" + "\032\n\022used_capacity_gbps\030\002 \001(\002\"\223\001\n\004Link\022 \n\007" + "link_id\030\001 \001(\0132\017.context.LinkId\022\014\n\004name\030\002" + " \001(\t\022.\n\021link_endpoint_ids\030\003 \003(\0132\023.contex" + "t.EndPointId\022+\n\nattributes\030\004 \001(\0132\027.conte" + "xt.LinkAttributes\"/\n\nLinkIdList\022!\n\010link_" + "ids\030\001 \003(\0132\017.context.LinkId\"(\n\010LinkList\022\034" + "\n\005links\030\001 \003(\0132\r.context.Link\"L\n\tLinkEven" + "t\022\035\n\005event\030\001 \001(\0132\016.context.Event\022 \n\007link" + "_id\030\002 \001(\0132\017.context.LinkId\"X\n\tServiceId\022" + "&\n\ncontext_id\030\001 \001(\0132\022.context.ContextId\022" + "#\n\014service_uuid\030\002 \001(\0132\r.context.Uuid\"\333\002\n" + "\007Service\022&\n\nservice_id\030\001 \001(\0132\022.context.S" + "erviceId\022\014\n\004name\030\002 \001(\t\022.\n\014service_type\030\003" + " \001(\0162\030.context.ServiceTypeEnum\0221\n\024servic" + "e_endpoint_ids\030\004 \003(\0132\023.context.EndPointI" + "d\0220\n\023service_constraints\030\005 \003(\0132\023.context" + ".Constraint\022.\n\016service_status\030\006 \001(\0132\026.co" + "ntext.ServiceStatus\022.\n\016service_config\030\007 " + "\001(\0132\026.context.ServiceConfig\022%\n\ttimestamp" + "\030\010 \001(\0132\022.context.Timestamp\"C\n\rServiceSta" + "tus\0222\n\016service_status\030\001 \001(\0162\032.context.Se" + "rviceStatusEnum\":\n\rServiceConfig\022)\n\014conf" + "ig_rules\030\001 \003(\0132\023.context.ConfigRule\"8\n\rS" + "erviceIdList\022\'\n\013service_ids\030\001 \003(\0132\022.cont" + "ext.ServiceId\"1\n\013ServiceList\022\"\n\010services" + "\030\001 \003(\0132\020.context.Service\"\225\001\n\rServiceFilt" + "er\022+\n\013service_ids\030\001 \001(\0132\026.context.Servic" + "eIdList\022\034\n\024include_endpoint_ids\030\002 \001(\010\022\033\n" + "\023include_constraints\030\003 \001(\010\022\034\n\024include_co" + "nfig_rules\030\004 \001(\010\"U\n\014ServiceEvent\022\035\n\005even" + "t\030\001 \001(\0132\016.context.Event\022&\n\nservice_id\030\002 " + "\001(\0132\022.context.ServiceId\"T\n\007SliceId\022&\n\nco" + "ntext_id\030\001 \001(\0132\022.context.ContextId\022!\n\nsl" + "ice_uuid\030\002 \001(\0132\r.context.Uuid\"\240\003\n\005Slice\022" + "\"\n\010slice_id\030\001 \001(\0132\020.context.SliceId\022\014\n\004n" + "ame\030\002 \001(\t\022/\n\022slice_endpoint_ids\030\003 \003(\0132\023." + "context.EndPointId\022.\n\021slice_constraints\030" + "\004 \003(\0132\023.context.Constraint\022-\n\021slice_serv" + "ice_ids\030\005 \003(\0132\022.context.ServiceId\022,\n\022sli" + "ce_subslice_ids\030\006 \003(\0132\020.context.SliceId\022" + "*\n\014slice_status\030\007 \001(\0132\024.context.SliceSta" + "tus\022*\n\014slice_config\030\010 \001(\0132\024.context.Slic" + "eConfig\022(\n\013slice_owner\030\t \001(\0132\023.context.S" + "liceOwner\022%\n\ttimestamp\030\n \001(\0132\022.context.T" + "imestamp\"E\n\nSliceOwner\022!\n\nowner_uuid\030\001 \001" + "(\0132\r.context.Uuid\022\024\n\014owner_string\030\002 \001(\t\"" + "=\n\013SliceStatus\022.\n\014slice_status\030\001 \001(\0162\030.c" + "ontext.SliceStatusEnum\"8\n\013SliceConfig\022)\n" + "\014config_rules\030\001 \003(\0132\023.context.ConfigRule" + "\"2\n\013SliceIdList\022#\n\tslice_ids\030\001 \003(\0132\020.con" + "text.SliceId\"+\n\tSliceList\022\036\n\006slices\030\001 \003(" + "\0132\016.context.Slice\"\312\001\n\013SliceFilter\022\'\n\tsli" + "ce_ids\030\001 \001(\0132\024.context.SliceIdList\022\034\n\024in" + "clude_endpoint_ids\030\002 \001(\010\022\033\n\023include_cons" + "traints\030\003 \001(\010\022\033\n\023include_service_ids\030\004 \001" + "(\010\022\034\n\024include_subslice_ids\030\005 \001(\010\022\034\n\024incl" + "ude_config_rules\030\006 \001(\010\"O\n\nSliceEvent\022\035\n\005" + "event\030\001 \001(\0132\016.context.Event\022\"\n\010slice_id\030" + "\002 \001(\0132\020.context.SliceId\"6\n\014ConnectionId\022" + "&\n\017connection_uuid\030\001 \001(\0132\r.context.Uuid\"" + "2\n\025ConnectionSettings_L0\022\031\n\021lsp_symbolic" + "_name\030\001 \001(\t\"\236\001\n\025ConnectionSettings_L2\022\027\n" + "\017src_mac_address\030\001 \001(\t\022\027\n\017dst_mac_addres" + "s\030\002 \001(\t\022\022\n\nether_type\030\003 \001(\r\022\017\n\007vlan_id\030\004" + " \001(\r\022\022\n\nmpls_label\030\005 \001(\r\022\032\n\022mpls_traffic" + "_class\030\006 \001(\r\"t\n\025ConnectionSettings_L3\022\026\n" + "\016src_ip_address\030\001 \001(\t\022\026\n\016dst_ip_address\030" + "\002 \001(\t\022\014\n\004dscp\030\003 \001(\r\022\020\n\010protocol\030\004 \001(\r\022\013\n" + "\003ttl\030\005 \001(\r\"[\n\025ConnectionSettings_L4\022\020\n\010s" + "rc_port\030\001 \001(\r\022\020\n\010dst_port\030\002 \001(\r\022\021\n\ttcp_f" + "lags\030\003 \001(\r\022\013\n\003ttl\030\004 \001(\r\"\304\001\n\022ConnectionSe" + "ttings\022*\n\002l0\030\001 \001(\0132\036.context.ConnectionS" + "ettings_L0\022*\n\002l2\030\002 \001(\0132\036.context.Connect" + "ionSettings_L2\022*\n\002l3\030\003 \001(\0132\036.context.Con" + "nectionSettings_L3\022*\n\002l4\030\004 \001(\0132\036.context" + ".ConnectionSettings_L4\"\363\001\n\nConnection\022,\n" + "\rconnection_id\030\001 \001(\0132\025.context.Connectio" + "nId\022&\n\nservice_id\030\002 \001(\0132\022.context.Servic" + "eId\0223\n\026path_hops_endpoint_ids\030\003 \003(\0132\023.co" + "ntext.EndPointId\022+\n\017sub_service_ids\030\004 \003(" + "\0132\022.context.ServiceId\022-\n\010settings\030\005 \001(\0132" + "\033.context.ConnectionSettings\"A\n\020Connecti" + "onIdList\022-\n\016connection_ids\030\001 \003(\0132\025.conte" + "xt.ConnectionId\":\n\016ConnectionList\022(\n\013con" + "nections\030\001 \003(\0132\023.context.Connection\"^\n\017C" + "onnectionEvent\022\035\n\005event\030\001 \001(\0132\016.context." + "Event\022,\n\rconnection_id\030\002 \001(\0132\025.context.C" + "onnectionId\"\202\001\n\nEndPointId\022(\n\013topology_i" + "d\030\001 \001(\0132\023.context.TopologyId\022$\n\tdevice_i" + "d\030\002 \001(\0132\021.context.DeviceId\022$\n\rendpoint_u" + "uid\030\003 \001(\0132\r.context.Uuid\"\302\001\n\010EndPoint\022(\n" + "\013endpoint_id\030\001 \001(\0132\023.context.EndPointId\022" + "\014\n\004name\030\002 \001(\t\022\025\n\rendpoint_type\030\003 \001(\t\0229\n\020" + "kpi_sample_types\030\004 \003(\0162\037.kpi_sample_type" + "s.KpiSampleType\022,\n\021endpoint_location\030\005 \001" + "(\0132\021.context.Location\"{\n\014EndPointName\022(\n" + "\013endpoint_id\030\001 \001(\0132\023.context.EndPointId\022" + "\023\n\013device_name\030\002 \001(\t\022\025\n\rendpoint_name\030\003 " + "\001(\t\022\025\n\rendpoint_type\030\004 \001(\t\";\n\016EndPointId" + "List\022)\n\014endpoint_ids\030\001 \003(\0132\023.context.End" + "PointId\"A\n\020EndPointNameList\022-\n\016endpoint_" + "names\030\001 \003(\0132\025.context.EndPointName\"A\n\021Co" + "nfigRule_Custom\022\024\n\014resource_key\030\001 \001(\t\022\026\n" + "\016resource_value\030\002 \001(\t\"]\n\016ConfigRule_ACL\022" + "(\n\013endpoint_id\030\001 \001(\0132\023.context.EndPointI" + "d\022!\n\010rule_set\030\002 \001(\0132\017.acl.AclRuleSet\"\234\001\n" + "\nConfigRule\022)\n\006action\030\001 \001(\0162\031.context.Co" + "nfigActionEnum\022,\n\006custom\030\002 \001(\0132\032.context" + ".ConfigRule_CustomH\000\022&\n\003acl\030\003 \001(\0132\027.cont" + "ext.ConfigRule_ACLH\000B\r\n\013config_rule\"F\n\021C" + "onstraint_Custom\022\027\n\017constraint_type\030\001 \001(" + "\t\022\030\n\020constraint_value\030\002 \001(\t\"E\n\023Constrain" + "t_Schedule\022\027\n\017start_timestamp\030\001 \001(\002\022\025\n\rd" + "uration_days\030\002 \001(\002\"3\n\014GPS_Position\022\020\n\010la" + "titude\030\001 \001(\002\022\021\n\tlongitude\030\002 \001(\002\"W\n\010Locat" + "ion\022\020\n\006region\030\001 \001(\tH\000\022-\n\014gps_position\030\002 " + "\001(\0132\025.context.GPS_PositionH\000B\n\n\010location" + "\"l\n\033Constraint_EndPointLocation\022(\n\013endpo" + "int_id\030\001 \001(\0132\023.context.EndPointId\022#\n\010loc" + "ation\030\002 \001(\0132\021.context.Location\"Y\n\033Constr" + "aint_EndPointPriority\022(\n\013endpoint_id\030\001 \001" + "(\0132\023.context.EndPointId\022\020\n\010priority\030\002 \001(" + "\r\"0\n\026Constraint_SLA_Latency\022\026\n\016e2e_laten" + "cy_ms\030\001 \001(\002\"0\n\027Constraint_SLA_Capacity\022\025" + "\n\rcapacity_gbps\030\001 \001(\002\"c\n\033Constraint_SLA_" + "Availability\022\032\n\022num_disjoint_paths\030\001 \001(\r" + "\022\022\n\nall_active\030\002 \001(\010\022\024\n\014availability\030\003 \001" + "(\002\"V\n\036Constraint_SLA_Isolation_level\0224\n\017" + "isolation_level\030\001 \003(\0162\033.context.Isolatio" + "nLevelEnum\"\242\001\n\025Constraint_Exclusions\022\024\n\014" + "is_permanent\030\001 \001(\010\022%\n\ndevice_ids\030\002 \003(\0132\021" + ".context.DeviceId\022)\n\014endpoint_ids\030\003 \003(\0132" + "\023.context.EndPointId\022!\n\010link_ids\030\004 \003(\0132\017" + ".context.LinkId\"\333\004\n\nConstraint\022-\n\006action" + "\030\001 \001(\0162\035.context.ConstraintActionEnum\022,\n" + "\006custom\030\002 \001(\0132\032.context.Constraint_Custo" + "mH\000\0220\n\010schedule\030\003 \001(\0132\034.context.Constrai" + "nt_ScheduleH\000\022A\n\021endpoint_location\030\004 \001(\013" + "2$.context.Constraint_EndPointLocationH\000" + "\022A\n\021endpoint_priority\030\005 \001(\0132$.context.Co" + "nstraint_EndPointPriorityH\000\0228\n\014sla_capac" + "ity\030\006 \001(\0132 .context.Constraint_SLA_Capac" + "ityH\000\0226\n\013sla_latency\030\007 \001(\0132\037.context.Con" + "straint_SLA_LatencyH\000\022@\n\020sla_availabilit" + "y\030\010 \001(\0132$.context.Constraint_SLA_Availab" + "ilityH\000\022@\n\rsla_isolation\030\t \001(\0132\'.context" + ".Constraint_SLA_Isolation_levelH\000\0224\n\nexc" + "lusions\030\n \001(\0132\036.context.Constraint_Exclu" + "sionsH\000B\014\n\nconstraint\"^\n\022TeraFlowControl" + "ler\022&\n\ncontext_id\030\001 \001(\0132\022.context.Contex" + "tId\022\022\n\nip_address\030\002 \001(\t\022\014\n\004port\030\003 \001(\r\"U\n" + "\024AuthenticationResult\022&\n\ncontext_id\030\001 \001(" + "\0132\022.context.ContextId\022\025\n\rauthenticated\030\002" + " \001(\010\"-\n\017OpticalConfigId\022\032\n\022opticalconfig" + "_uuid\030\001 \001(\t\"S\n\rOpticalConfig\0222\n\020opticalc" + "onfig_id\030\001 \001(\0132\030.context.OpticalConfigId" + "\022\016\n\006config\030\002 \001(\t\"C\n\021OpticalConfigList\022.\n" + "\016opticalconfigs\030\001 \003(\0132\026.context.OpticalC" + "onfig\"9\n\rOpticalLinkId\022(\n\021optical_link_u" + "uid\030\001 \001(\0132\r.context.Uuid\",\n\007FiberId\022!\n\nf" + "iber_uuid\030\001 \001(\0132\r.context.Uuid\"\341\001\n\005Fiber" + "\022\n\n\002ID\030\n \001(\t\022\020\n\010src_port\030\001 \001(\t\022\020\n\010dst_po" + "rt\030\002 \001(\t\022\027\n\017local_peer_port\030\003 \001(\t\022\030\n\020rem" + "ote_peer_port\030\004 \001(\t\022\017\n\007c_slots\030\005 \003(\005\022\017\n\007" + "l_slots\030\006 \003(\005\022\017\n\007s_slots\030\007 \003(\005\022\016\n\006length" + "\030\010 \001(\002\022\014\n\004used\030\t \001(\010\022$\n\nfiber_uuid\030\013 \001(\013" + "2\020.context.FiberId\"d\n\022OpticalLinkDetails" + "\022\016\n\006length\030\001 \001(\002\022\016\n\006source\030\002 \001(\t\022\016\n\006targ" + "et\030\003 \001(\t\022\036\n\006fibers\030\004 \003(\0132\016.context.Fiber" + "\"|\n\013OpticalLink\022\014\n\004name\030\001 \001(\t\022,\n\007details" + "\030\002 \001(\0132\033.context.OpticalLinkDetails\0221\n\021o" + "ptical_link_uuid\030\003 \001(\0132\026.context.Optical" + "LinkId*j\n\rEventTypeEnum\022\027\n\023EVENTTYPE_UND" + "EFINED\020\000\022\024\n\020EVENTTYPE_CREATE\020\001\022\024\n\020EVENTT" + "YPE_UPDATE\020\002\022\024\n\020EVENTTYPE_REMOVE\020\003*\350\002\n\020D" + "eviceDriverEnum\022\032\n\026DEVICEDRIVER_UNDEFINE" + "D\020\000\022\033\n\027DEVICEDRIVER_OPENCONFIG\020\001\022\036\n\032DEVI" + "CEDRIVER_TRANSPORT_API\020\002\022\023\n\017DEVICEDRIVER" + "_P4\020\003\022&\n\"DEVICEDRIVER_IETF_NETWORK_TOPOL" + "OGY\020\004\022\033\n\027DEVICEDRIVER_ONF_TR_532\020\005\022\023\n\017DE" + "VICEDRIVER_XR\020\006\022\033\n\027DEVICEDRIVER_IETF_L2V" + "PN\020\007\022 \n\034DEVICEDRIVER_GNMI_OPENCONFIG\020\010\022\034" + "\n\030DEVICEDRIVER_OPTICAL_TFS\020\t\022\032\n\026DEVICEDR" + "IVER_IETF_ACTN\020\n\022\023\n\017DEVICEDRIVER_OC\020\013*\217\001" + "\n\033DeviceOperationalStatusEnum\022%\n!DEVICEO" + "PERATIONALSTATUS_UNDEFINED\020\000\022$\n DEVICEOP" + "ERATIONALSTATUS_DISABLED\020\001\022#\n\037DEVICEOPER" + "ATIONALSTATUS_ENABLED\020\002*\320\001\n\017ServiceTypeE" + "num\022\027\n\023SERVICETYPE_UNKNOWN\020\000\022\024\n\020SERVICET" + "YPE_L3NM\020\001\022\024\n\020SERVICETYPE_L2NM\020\002\022)\n%SERV" + "ICETYPE_TAPI_CONNECTIVITY_SERVICE\020\003\022\022\n\016S" + "ERVICETYPE_TE\020\004\022\023\n\017SERVICETYPE_E2E\020\005\022$\n " + "SERVICETYPE_OPTICAL_CONNECTIVITY\020\006*\304\001\n\021S" + "erviceStatusEnum\022\033\n\027SERVICESTATUS_UNDEFI" + "NED\020\000\022\031\n\025SERVICESTATUS_PLANNED\020\001\022\030\n\024SERV" + "ICESTATUS_ACTIVE\020\002\022\032\n\026SERVICESTATUS_UPDA" + "TING\020\003\022!\n\035SERVICESTATUS_PENDING_REMOVAL\020" + "\004\022\036\n\032SERVICESTATUS_SLA_VIOLATED\020\005*\251\001\n\017Sl" + "iceStatusEnum\022\031\n\025SLICESTATUS_UNDEFINED\020\000" + "\022\027\n\023SLICESTATUS_PLANNED\020\001\022\024\n\020SLICESTATUS" + "_INIT\020\002\022\026\n\022SLICESTATUS_ACTIVE\020\003\022\026\n\022SLICE" + "STATUS_DEINIT\020\004\022\034\n\030SLICESTATUS_SLA_VIOLA" + "TED\020\005*]\n\020ConfigActionEnum\022\032\n\026CONFIGACTIO" + "N_UNDEFINED\020\000\022\024\n\020CONFIGACTION_SET\020\001\022\027\n\023C" + "ONFIGACTION_DELETE\020\002*m\n\024ConstraintAction" + "Enum\022\036\n\032CONSTRAINTACTION_UNDEFINED\020\000\022\030\n\024" + "CONSTRAINTACTION_SET\020\001\022\033\n\027CONSTRAINTACTI" + "ON_DELETE\020\002*\203\002\n\022IsolationLevelEnum\022\020\n\014NO" + "_ISOLATION\020\000\022\026\n\022PHYSICAL_ISOLATION\020\001\022\025\n\021" + "LOGICAL_ISOLATION\020\002\022\025\n\021PROCESS_ISOLATION" + "\020\003\022\035\n\031PHYSICAL_MEMORY_ISOLATION\020\004\022\036\n\032PHY" + "SICAL_NETWORK_ISOLATION\020\005\022\036\n\032VIRTUAL_RES" + "OURCE_ISOLATION\020\006\022\037\n\033NETWORK_FUNCTIONS_I" + "SOLATION\020\007\022\025\n\021SERVICE_ISOLATION\020\0102\246\031\n\016Co" + "ntextService\022:\n\016ListContextIds\022\016.context" + ".Empty\032\026.context.ContextIdList\"\000\0226\n\014List" + "Contexts\022\016.context.Empty\032\024.context.Conte" + "xtList\"\000\0224\n\nGetContext\022\022.context.Context" + "Id\032\020.context.Context\"\000\0224\n\nSetContext\022\020.c" + "ontext.Context\032\022.context.ContextId\"\000\0225\n\r" + "RemoveContext\022\022.context.ContextId\032\016.cont" + "ext.Empty\"\000\022=\n\020GetContextEvents\022\016.contex" + "t.Empty\032\025.context.ContextEvent\"\0000\001\022@\n\017Li" + "stTopologyIds\022\022.context.ContextId\032\027.cont" + "ext.TopologyIdList\"\000\022=\n\016ListTopologies\022\022" + ".context.ContextId\032\025.context.TopologyLis" + "t\"\000\0227\n\013GetTopology\022\023.context.TopologyId\032" + "\021.context.Topology\"\000\022E\n\022GetTopologyDetai" + "ls\022\023.context.TopologyId\032\030.context.Topolo" + "gyDetails\"\000\0227\n\013SetTopology\022\021.context.Top" + "ology\032\023.context.TopologyId\"\000\0227\n\016RemoveTo" + "pology\022\023.context.TopologyId\032\016.context.Em" + "pty\"\000\022?\n\021GetTopologyEvents\022\016.context.Emp" + "ty\032\026.context.TopologyEvent\"\0000\001\0228\n\rListDe" + "viceIds\022\016.context.Empty\032\025.context.Device" + "IdList\"\000\0224\n\013ListDevices\022\016.context.Empty\032" + "\023.context.DeviceList\"\000\0221\n\tGetDevice\022\021.co" + "ntext.DeviceId\032\017.context.Device\"\000\0221\n\tSet" + "Device\022\017.context.Device\032\021.context.Device" + "Id\"\000\0223\n\014RemoveDevice\022\021.context.DeviceId\032" + "\016.context.Empty\"\000\022;\n\017GetDeviceEvents\022\016.c" + "ontext.Empty\032\024.context.DeviceEvent\"\0000\001\022<" + "\n\014SelectDevice\022\025.context.DeviceFilter\032\023." + "context.DeviceList\"\000\022I\n\021ListEndPointName" + "s\022\027.context.EndPointIdList\032\031.context.End" + "PointNameList\"\000\0224\n\013ListLinkIds\022\016.context" + ".Empty\032\023.context.LinkIdList\"\000\0220\n\tListLin" + "ks\022\016.context.Empty\032\021.context.LinkList\"\000\022" + "+\n\007GetLink\022\017.context.LinkId\032\r.context.Li" + "nk\"\000\022+\n\007SetLink\022\r.context.Link\032\017.context" + ".LinkId\"\000\022/\n\nRemoveLink\022\017.context.LinkId" + "\032\016.context.Empty\"\000\0227\n\rGetLinkEvents\022\016.co" + "ntext.Empty\032\022.context.LinkEvent\"\0000\001\022>\n\016L" + "istServiceIds\022\022.context.ContextId\032\026.cont" + "ext.ServiceIdList\"\000\022:\n\014ListServices\022\022.co" + "ntext.ContextId\032\024.context.ServiceList\"\000\022" + "4\n\nGetService\022\022.context.ServiceId\032\020.cont" + "ext.Service\"\000\0224\n\nSetService\022\020.context.Se" + "rvice\032\022.context.ServiceId\"\000\0226\n\014UnsetServ" + "ice\022\020.context.Service\032\022.context.ServiceI" + "d\"\000\0225\n\rRemoveService\022\022.context.ServiceId" + "\032\016.context.Empty\"\000\022=\n\020GetServiceEvents\022\016" + ".context.Empty\032\025.context.ServiceEvent\"\0000" + "\001\022?\n\rSelectService\022\026.context.ServiceFilt" + "er\032\024.context.ServiceList\"\000\022:\n\014ListSliceI" + "ds\022\022.context.ContextId\032\024.context.SliceId" + "List\"\000\0226\n\nListSlices\022\022.context.ContextId" + "\032\022.context.SliceList\"\000\022.\n\010GetSlice\022\020.con" + "text.SliceId\032\016.context.Slice\"\000\022.\n\010SetSli" + "ce\022\016.context.Slice\032\020.context.SliceId\"\000\0220" + "\n\nUnsetSlice\022\016.context.Slice\032\020.context.S" + "liceId\"\000\0221\n\013RemoveSlice\022\020.context.SliceI" + "d\032\016.context.Empty\"\000\0229\n\016GetSliceEvents\022\016." + "context.Empty\032\023.context.SliceEvent\"\0000\001\0229" + "\n\013SelectSlice\022\024.context.SliceFilter\032\022.co" + "ntext.SliceList\"\000\022D\n\021ListConnectionIds\022\022" + ".context.ServiceId\032\031.context.ConnectionI" + "dList\"\000\022@\n\017ListConnections\022\022.context.Ser" + "viceId\032\027.context.ConnectionList\"\000\022=\n\rGet" + "Connection\022\025.context.ConnectionId\032\023.cont" + "ext.Connection\"\000\022=\n\rSetConnection\022\023.cont" + "ext.Connection\032\025.context.ConnectionId\"\000\022" + ";\n\020RemoveConnection\022\025.context.Connection" + "Id\032\016.context.Empty\"\000\022C\n\023GetConnectionEve" + "nts\022\016.context.Empty\032\030.context.Connection" + "Event\"\0000\001\022@\n\020GetOpticalConfig\022\016.context." + "Empty\032\032.context.OpticalConfigList\"\000\022F\n\020S" + "etOpticalConfig\022\026.context.OpticalConfig\032" + "\030.context.OpticalConfigId\"\000\022I\n\023SelectOpt" + "icalConfig\022\030.context.OpticalConfigId\032\026.c" + "ontext.OpticalConfig\"\000\0228\n\016SetOpticalLink" + "\022\024.context.OpticalLink\032\016.context.Empty\"\000" + "\022@\n\016GetOpticalLink\022\026.context.OpticalLink" + "Id\032\024.context.OpticalLink\"\000\022.\n\010GetFiber\022\020" + ".context.FiberId\032\016.context.Fiber\"\000b\006prot" + "o3" }; + java.lang.String[] descriptorData = { "\n\rcontext.proto\022\007context\032\tacl.proto\032\026kpi" + "_sample_types.proto\"\007\n\005Empty\"\024\n\004Uuid\022\014\n\004" + "uuid\030\001 \001(\t\"\036\n\tTimestamp\022\021\n\ttimestamp\030\001 \001" + "(\001\"Z\n\005Event\022%\n\ttimestamp\030\001 \001(\0132\022.context" + ".Timestamp\022*\n\nevent_type\030\002 \001(\0162\026.context" + ".EventTypeEnum\"0\n\tContextId\022#\n\014context_u" + "uid\030\001 \001(\0132\r.context.Uuid\"\351\001\n\007Context\022&\n\n" + "context_id\030\001 \001(\0132\022.context.ContextId\022\014\n\004" + "name\030\002 \001(\t\022)\n\014topology_ids\030\003 \003(\0132\023.conte" + "xt.TopologyId\022\'\n\013service_ids\030\004 \003(\0132\022.con" + "text.ServiceId\022#\n\tslice_ids\030\005 \003(\0132\020.cont" + "ext.SliceId\022/\n\ncontroller\030\006 \001(\0132\033.contex" + "t.TeraFlowController\"8\n\rContextIdList\022\'\n" + "\013context_ids\030\001 \003(\0132\022.context.ContextId\"1" + "\n\013ContextList\022\"\n\010contexts\030\001 \003(\0132\020.contex" + "t.Context\"U\n\014ContextEvent\022\035\n\005event\030\001 \001(\013" + "2\016.context.Event\022&\n\ncontext_id\030\002 \001(\0132\022.c" + "ontext.ContextId\"Z\n\nTopologyId\022&\n\ncontex" + "t_id\030\001 \001(\0132\022.context.ContextId\022$\n\rtopolo" + "gy_uuid\030\002 \001(\0132\r.context.Uuid\"\214\001\n\010Topolog" + "y\022(\n\013topology_id\030\001 \001(\0132\023.context.Topolog" + "yId\022\014\n\004name\030\002 \001(\t\022%\n\ndevice_ids\030\003 \003(\0132\021." + "context.DeviceId\022!\n\010link_ids\030\004 \003(\0132\017.con" + "text.LinkId\"\211\001\n\017TopologyDetails\022(\n\013topol" + "ogy_id\030\001 \001(\0132\023.context.TopologyId\022\014\n\004nam" + "e\030\002 \001(\t\022 \n\007devices\030\003 \003(\0132\017.context.Devic" + "e\022\034\n\005links\030\004 \003(\0132\r.context.Link\";\n\016Topol" + "ogyIdList\022)\n\014topology_ids\030\001 \003(\0132\023.contex" + "t.TopologyId\"5\n\014TopologyList\022%\n\ntopologi" + "es\030\001 \003(\0132\021.context.Topology\"X\n\rTopologyE" + "vent\022\035\n\005event\030\001 \001(\0132\016.context.Event\022(\n\013t" + "opology_id\030\002 \001(\0132\023.context.TopologyId\".\n" + "\010DeviceId\022\"\n\013device_uuid\030\001 \001(\0132\r.context" + ".Uuid\"\372\002\n\006Device\022$\n\tdevice_id\030\001 \001(\0132\021.co" + "ntext.DeviceId\022\014\n\004name\030\002 \001(\t\022\023\n\013device_t" + "ype\030\003 \001(\t\022,\n\rdevice_config\030\004 \001(\0132\025.conte" + "xt.DeviceConfig\022G\n\031device_operational_st" + "atus\030\005 \001(\0162$.context.DeviceOperationalSt" + "atusEnum\0221\n\016device_drivers\030\006 \003(\0162\031.conte" + "xt.DeviceDriverEnum\022+\n\020device_endpoints\030" + "\007 \003(\0132\021.context.EndPoint\022&\n\ncomponents\030\010" + " \003(\0132\022.context.Component\022(\n\rcontroller_i" + "d\030\t \001(\0132\021.context.DeviceId\"\311\001\n\tComponent" + "\022%\n\016component_uuid\030\001 \001(\0132\r.context.Uuid\022" + "\014\n\004name\030\002 \001(\t\022\014\n\004type\030\003 \001(\t\0226\n\nattribute" + "s\030\004 \003(\0132\".context.Component.AttributesEn" + "try\022\016\n\006parent\030\005 \001(\t\0321\n\017AttributesEntry\022\013" + "\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"9\n\014Device" + "Config\022)\n\014config_rules\030\001 \003(\0132\023.context.C" + "onfigRule\"5\n\014DeviceIdList\022%\n\ndevice_ids\030" + "\001 \003(\0132\021.context.DeviceId\".\n\nDeviceList\022 " + "\n\007devices\030\001 \003(\0132\017.context.Device\"\216\001\n\014Dev" + "iceFilter\022)\n\ndevice_ids\030\001 \001(\0132\025.context." + "DeviceIdList\022\031\n\021include_endpoints\030\002 \001(\010\022" + "\034\n\024include_config_rules\030\003 \001(\010\022\032\n\022include" + "_components\030\004 \001(\010\"\200\001\n\013DeviceEvent\022\035\n\005eve" + "nt\030\001 \001(\0132\016.context.Event\022$\n\tdevice_id\030\002 " + "\001(\0132\021.context.DeviceId\022,\n\rdevice_config\030" + "\003 \001(\0132\025.context.DeviceConfig\"*\n\006LinkId\022 " + "\n\tlink_uuid\030\001 \001(\0132\r.context.Uuid\"I\n\016Link" + "Attributes\022\033\n\023total_capacity_gbps\030\001 \001(\002\022" + "\032\n\022used_capacity_gbps\030\002 \001(\002\"\223\001\n\004Link\022 \n\007" + "link_id\030\001 \001(\0132\017.context.LinkId\022\014\n\004name\030\002" + " \001(\t\022.\n\021link_endpoint_ids\030\003 \003(\0132\023.contex" + "t.EndPointId\022+\n\nattributes\030\004 \001(\0132\027.conte" + "xt.LinkAttributes\"/\n\nLinkIdList\022!\n\010link_" + "ids\030\001 \003(\0132\017.context.LinkId\"(\n\010LinkList\022\034" + "\n\005links\030\001 \003(\0132\r.context.Link\"L\n\tLinkEven" + "t\022\035\n\005event\030\001 \001(\0132\016.context.Event\022 \n\007link" + "_id\030\002 \001(\0132\017.context.LinkId\"X\n\tServiceId\022" + "&\n\ncontext_id\030\001 \001(\0132\022.context.ContextId\022" + "#\n\014service_uuid\030\002 \001(\0132\r.context.Uuid\"\333\002\n" + "\007Service\022&\n\nservice_id\030\001 \001(\0132\022.context.S" + "erviceId\022\014\n\004name\030\002 \001(\t\022.\n\014service_type\030\003" + " \001(\0162\030.context.ServiceTypeEnum\0221\n\024servic" + "e_endpoint_ids\030\004 \003(\0132\023.context.EndPointI" + "d\0220\n\023service_constraints\030\005 \003(\0132\023.context" + ".Constraint\022.\n\016service_status\030\006 \001(\0132\026.co" + "ntext.ServiceStatus\022.\n\016service_config\030\007 " + "\001(\0132\026.context.ServiceConfig\022%\n\ttimestamp" + "\030\010 \001(\0132\022.context.Timestamp\"C\n\rServiceSta" + "tus\0222\n\016service_status\030\001 \001(\0162\032.context.Se" + "rviceStatusEnum\":\n\rServiceConfig\022)\n\014conf" + "ig_rules\030\001 \003(\0132\023.context.ConfigRule\"8\n\rS" + "erviceIdList\022\'\n\013service_ids\030\001 \003(\0132\022.cont" + "ext.ServiceId\"1\n\013ServiceList\022\"\n\010services" + "\030\001 \003(\0132\020.context.Service\"\225\001\n\rServiceFilt" + "er\022+\n\013service_ids\030\001 \001(\0132\026.context.Servic" + "eIdList\022\034\n\024include_endpoint_ids\030\002 \001(\010\022\033\n" + "\023include_constraints\030\003 \001(\010\022\034\n\024include_co" + "nfig_rules\030\004 \001(\010\"U\n\014ServiceEvent\022\035\n\005even" + "t\030\001 \001(\0132\016.context.Event\022&\n\nservice_id\030\002 " + "\001(\0132\022.context.ServiceId\"T\n\007SliceId\022&\n\nco" + "ntext_id\030\001 \001(\0132\022.context.ContextId\022!\n\nsl" + "ice_uuid\030\002 \001(\0132\r.context.Uuid\"\240\003\n\005Slice\022" + "\"\n\010slice_id\030\001 \001(\0132\020.context.SliceId\022\014\n\004n" + "ame\030\002 \001(\t\022/\n\022slice_endpoint_ids\030\003 \003(\0132\023." + "context.EndPointId\022.\n\021slice_constraints\030" + "\004 \003(\0132\023.context.Constraint\022-\n\021slice_serv" + "ice_ids\030\005 \003(\0132\022.context.ServiceId\022,\n\022sli" + "ce_subslice_ids\030\006 \003(\0132\020.context.SliceId\022" + "*\n\014slice_status\030\007 \001(\0132\024.context.SliceSta" + "tus\022*\n\014slice_config\030\010 \001(\0132\024.context.Slic" + "eConfig\022(\n\013slice_owner\030\t \001(\0132\023.context.S" + "liceOwner\022%\n\ttimestamp\030\n \001(\0132\022.context.T" + "imestamp\"E\n\nSliceOwner\022!\n\nowner_uuid\030\001 \001" + "(\0132\r.context.Uuid\022\024\n\014owner_string\030\002 \001(\t\"" + "=\n\013SliceStatus\022.\n\014slice_status\030\001 \001(\0162\030.c" + "ontext.SliceStatusEnum\"8\n\013SliceConfig\022)\n" + "\014config_rules\030\001 \003(\0132\023.context.ConfigRule" + "\"2\n\013SliceIdList\022#\n\tslice_ids\030\001 \003(\0132\020.con" + "text.SliceId\"+\n\tSliceList\022\036\n\006slices\030\001 \003(" + "\0132\016.context.Slice\"\312\001\n\013SliceFilter\022\'\n\tsli" + "ce_ids\030\001 \001(\0132\024.context.SliceIdList\022\034\n\024in" + "clude_endpoint_ids\030\002 \001(\010\022\033\n\023include_cons" + "traints\030\003 \001(\010\022\033\n\023include_service_ids\030\004 \001" + "(\010\022\034\n\024include_subslice_ids\030\005 \001(\010\022\034\n\024incl" + "ude_config_rules\030\006 \001(\010\"O\n\nSliceEvent\022\035\n\005" + "event\030\001 \001(\0132\016.context.Event\022\"\n\010slice_id\030" + "\002 \001(\0132\020.context.SliceId\"6\n\014ConnectionId\022" + "&\n\017connection_uuid\030\001 \001(\0132\r.context.Uuid\"" + "2\n\025ConnectionSettings_L0\022\031\n\021lsp_symbolic" + "_name\030\001 \001(\t\"\236\001\n\025ConnectionSettings_L2\022\027\n" + "\017src_mac_address\030\001 \001(\t\022\027\n\017dst_mac_addres" + "s\030\002 \001(\t\022\022\n\nether_type\030\003 \001(\r\022\017\n\007vlan_id\030\004" + " \001(\r\022\022\n\nmpls_label\030\005 \001(\r\022\032\n\022mpls_traffic" + "_class\030\006 \001(\r\"t\n\025ConnectionSettings_L3\022\026\n" + "\016src_ip_address\030\001 \001(\t\022\026\n\016dst_ip_address\030" + "\002 \001(\t\022\014\n\004dscp\030\003 \001(\r\022\020\n\010protocol\030\004 \001(\r\022\013\n" + "\003ttl\030\005 \001(\r\"[\n\025ConnectionSettings_L4\022\020\n\010s" + "rc_port\030\001 \001(\r\022\020\n\010dst_port\030\002 \001(\r\022\021\n\ttcp_f" + "lags\030\003 \001(\r\022\013\n\003ttl\030\004 \001(\r\"\304\001\n\022ConnectionSe" + "ttings\022*\n\002l0\030\001 \001(\0132\036.context.ConnectionS" + "ettings_L0\022*\n\002l2\030\002 \001(\0132\036.context.Connect" + "ionSettings_L2\022*\n\002l3\030\003 \001(\0132\036.context.Con" + "nectionSettings_L3\022*\n\002l4\030\004 \001(\0132\036.context" + ".ConnectionSettings_L4\"\363\001\n\nConnection\022,\n" + "\rconnection_id\030\001 \001(\0132\025.context.Connectio" + "nId\022&\n\nservice_id\030\002 \001(\0132\022.context.Servic" + "eId\0223\n\026path_hops_endpoint_ids\030\003 \003(\0132\023.co" + "ntext.EndPointId\022+\n\017sub_service_ids\030\004 \003(" + "\0132\022.context.ServiceId\022-\n\010settings\030\005 \001(\0132" + "\033.context.ConnectionSettings\"A\n\020Connecti" + "onIdList\022-\n\016connection_ids\030\001 \003(\0132\025.conte" + "xt.ConnectionId\":\n\016ConnectionList\022(\n\013con" + "nections\030\001 \003(\0132\023.context.Connection\"^\n\017C" + "onnectionEvent\022\035\n\005event\030\001 \001(\0132\016.context." + "Event\022,\n\rconnection_id\030\002 \001(\0132\025.context.C" + "onnectionId\"\202\001\n\nEndPointId\022(\n\013topology_i" + "d\030\001 \001(\0132\023.context.TopologyId\022$\n\tdevice_i" + "d\030\002 \001(\0132\021.context.DeviceId\022$\n\rendpoint_u" + "uid\030\003 \001(\0132\r.context.Uuid\"\302\001\n\010EndPoint\022(\n" + "\013endpoint_id\030\001 \001(\0132\023.context.EndPointId\022" + "\014\n\004name\030\002 \001(\t\022\025\n\rendpoint_type\030\003 \001(\t\0229\n\020" + "kpi_sample_types\030\004 \003(\0162\037.kpi_sample_type" + "s.KpiSampleType\022,\n\021endpoint_location\030\005 \001" + "(\0132\021.context.Location\"{\n\014EndPointName\022(\n" + "\013endpoint_id\030\001 \001(\0132\023.context.EndPointId\022" + "\023\n\013device_name\030\002 \001(\t\022\025\n\rendpoint_name\030\003 " + "\001(\t\022\025\n\rendpoint_type\030\004 \001(\t\";\n\016EndPointId" + "List\022)\n\014endpoint_ids\030\001 \003(\0132\023.context.End" + "PointId\"A\n\020EndPointNameList\022-\n\016endpoint_" + "names\030\001 \003(\0132\025.context.EndPointName\"A\n\021Co" + "nfigRule_Custom\022\024\n\014resource_key\030\001 \001(\t\022\026\n" + "\016resource_value\030\002 \001(\t\"]\n\016ConfigRule_ACL\022" + "(\n\013endpoint_id\030\001 \001(\0132\023.context.EndPointI" + "d\022!\n\010rule_set\030\002 \001(\0132\017.acl.AclRuleSet\"\234\001\n" + "\nConfigRule\022)\n\006action\030\001 \001(\0162\031.context.Co" + "nfigActionEnum\022,\n\006custom\030\002 \001(\0132\032.context" + ".ConfigRule_CustomH\000\022&\n\003acl\030\003 \001(\0132\027.cont" + "ext.ConfigRule_ACLH\000B\r\n\013config_rule\"F\n\021C" + "onstraint_Custom\022\027\n\017constraint_type\030\001 \001(" + "\t\022\030\n\020constraint_value\030\002 \001(\t\"E\n\023Constrain" + "t_Schedule\022\027\n\017start_timestamp\030\001 \001(\002\022\025\n\rd" + "uration_days\030\002 \001(\002\"3\n\014GPS_Position\022\020\n\010la" + "titude\030\001 \001(\002\022\021\n\tlongitude\030\002 \001(\002\"W\n\010Locat" + "ion\022\020\n\006region\030\001 \001(\tH\000\022-\n\014gps_position\030\002 " + "\001(\0132\025.context.GPS_PositionH\000B\n\n\010location" + "\"l\n\033Constraint_EndPointLocation\022(\n\013endpo" + "int_id\030\001 \001(\0132\023.context.EndPointId\022#\n\010loc" + "ation\030\002 \001(\0132\021.context.Location\"Y\n\033Constr" + "aint_EndPointPriority\022(\n\013endpoint_id\030\001 \001" + "(\0132\023.context.EndPointId\022\020\n\010priority\030\002 \001(" + "\r\"0\n\026Constraint_SLA_Latency\022\026\n\016e2e_laten" + "cy_ms\030\001 \001(\002\"0\n\027Constraint_SLA_Capacity\022\025" + "\n\rcapacity_gbps\030\001 \001(\002\"c\n\033Constraint_SLA_" + "Availability\022\032\n\022num_disjoint_paths\030\001 \001(\r" + "\022\022\n\nall_active\030\002 \001(\010\022\024\n\014availability\030\003 \001" + "(\002\"V\n\036Constraint_SLA_Isolation_level\0224\n\017" + "isolation_level\030\001 \003(\0162\033.context.Isolatio" + "nLevelEnum\"\242\001\n\025Constraint_Exclusions\022\024\n\014" + "is_permanent\030\001 \001(\010\022%\n\ndevice_ids\030\002 \003(\0132\021" + ".context.DeviceId\022)\n\014endpoint_ids\030\003 \003(\0132" + "\023.context.EndPointId\022!\n\010link_ids\030\004 \003(\0132\017" + ".context.LinkId\"\333\004\n\nConstraint\022-\n\006action" + "\030\001 \001(\0162\035.context.ConstraintActionEnum\022,\n" + "\006custom\030\002 \001(\0132\032.context.Constraint_Custo" + "mH\000\0220\n\010schedule\030\003 \001(\0132\034.context.Constrai" + "nt_ScheduleH\000\022A\n\021endpoint_location\030\004 \001(\013" + "2$.context.Constraint_EndPointLocationH\000" + "\022A\n\021endpoint_priority\030\005 \001(\0132$.context.Co" + "nstraint_EndPointPriorityH\000\0228\n\014sla_capac" + "ity\030\006 \001(\0132 .context.Constraint_SLA_Capac" + "ityH\000\0226\n\013sla_latency\030\007 \001(\0132\037.context.Con" + "straint_SLA_LatencyH\000\022@\n\020sla_availabilit" + "y\030\010 \001(\0132$.context.Constraint_SLA_Availab" + "ilityH\000\022@\n\rsla_isolation\030\t \001(\0132\'.context" + ".Constraint_SLA_Isolation_levelH\000\0224\n\nexc" + "lusions\030\n \001(\0132\036.context.Constraint_Exclu" + "sionsH\000B\014\n\nconstraint\"^\n\022TeraFlowControl" + "ler\022&\n\ncontext_id\030\001 \001(\0132\022.context.Contex" + "tId\022\022\n\nip_address\030\002 \001(\t\022\014\n\004port\030\003 \001(\r\"U\n" + "\024AuthenticationResult\022&\n\ncontext_id\030\001 \001(" + "\0132\022.context.ContextId\022\025\n\rauthenticated\030\002" + " \001(\010\"-\n\017OpticalConfigId\022\032\n\022opticalconfig" + "_uuid\030\001 \001(\t\"S\n\rOpticalConfig\0222\n\020opticalc" + "onfig_id\030\001 \001(\0132\030.context.OpticalConfigId" + "\022\016\n\006config\030\002 \001(\t\"C\n\021OpticalConfigList\022.\n" + "\016opticalconfigs\030\001 \003(\0132\026.context.OpticalC" + "onfig\"9\n\rOpticalLinkId\022(\n\021optical_link_u" + "uid\030\001 \001(\0132\r.context.Uuid\",\n\007FiberId\022!\n\nf" + "iber_uuid\030\001 \001(\0132\r.context.Uuid\"\341\001\n\005Fiber" + "\022\n\n\002ID\030\n \001(\t\022\020\n\010src_port\030\001 \001(\t\022\020\n\010dst_po" + "rt\030\002 \001(\t\022\027\n\017local_peer_port\030\003 \001(\t\022\030\n\020rem" + "ote_peer_port\030\004 \001(\t\022\017\n\007c_slots\030\005 \003(\005\022\017\n\007" + "l_slots\030\006 \003(\005\022\017\n\007s_slots\030\007 \003(\005\022\016\n\006length" + "\030\010 \001(\002\022\014\n\004used\030\t \001(\010\022$\n\nfiber_uuid\030\013 \001(\013" + "2\020.context.FiberId\"d\n\022OpticalLinkDetails" + "\022\016\n\006length\030\001 \001(\002\022\016\n\006source\030\002 \001(\t\022\016\n\006targ" + "et\030\003 \001(\t\022\036\n\006fibers\030\004 \003(\0132\016.context.Fiber" + "\"|\n\013OpticalLink\022\014\n\004name\030\001 \001(\t\022,\n\007details" + "\030\002 \001(\0132\033.context.OpticalLinkDetails\0221\n\021o" + "ptical_link_uuid\030\003 \001(\0132\026.context.Optical" + "LinkId*j\n\rEventTypeEnum\022\027\n\023EVENTTYPE_UND" + "EFINED\020\000\022\024\n\020EVENTTYPE_CREATE\020\001\022\024\n\020EVENTT" + "YPE_UPDATE\020\002\022\024\n\020EVENTTYPE_REMOVE\020\003*\376\002\n\020D" + "eviceDriverEnum\022\032\n\026DEVICEDRIVER_UNDEFINE" + "D\020\000\022\033\n\027DEVICEDRIVER_OPENCONFIG\020\001\022\036\n\032DEVI" + "CEDRIVER_TRANSPORT_API\020\002\022\023\n\017DEVICEDRIVER" + "_P4\020\003\022&\n\"DEVICEDRIVER_IETF_NETWORK_TOPOL" + "OGY\020\004\022\033\n\027DEVICEDRIVER_ONF_TR_532\020\005\022\023\n\017DE" + "VICEDRIVER_XR\020\006\022\033\n\027DEVICEDRIVER_IETF_L2V" + "PN\020\007\022 \n\034DEVICEDRIVER_GNMI_OPENCONFIG\020\010\022\034" + "\n\030DEVICEDRIVER_OPTICAL_TFS\020\t\022\032\n\026DEVICEDR" + "IVER_IETF_ACTN\020\n\022\023\n\017DEVICEDRIVER_OC\020\013\022\024\n" + "\020DEVICEDRIVER_QKD\020\014*\217\001\n\033DeviceOperationa" + "lStatusEnum\022%\n!DEVICEOPERATIONALSTATUS_U" + "NDEFINED\020\000\022$\n DEVICEOPERATIONALSTATUS_DI" + "SABLED\020\001\022#\n\037DEVICEOPERATIONALSTATUS_ENAB" + "LED\020\002*\345\001\n\017ServiceTypeEnum\022\027\n\023SERVICETYPE" + "_UNKNOWN\020\000\022\024\n\020SERVICETYPE_L3NM\020\001\022\024\n\020SERV" + "ICETYPE_L2NM\020\002\022)\n%SERVICETYPE_TAPI_CONNE" + "CTIVITY_SERVICE\020\003\022\022\n\016SERVICETYPE_TE\020\004\022\023\n" + "\017SERVICETYPE_E2E\020\005\022$\n SERVICETYPE_OPTICA" + "L_CONNECTIVITY\020\006\022\023\n\017SERVICETYPE_QKD\020\007*\304\001" + "\n\021ServiceStatusEnum\022\033\n\027SERVICESTATUS_UND" + "EFINED\020\000\022\031\n\025SERVICESTATUS_PLANNED\020\001\022\030\n\024S" + "ERVICESTATUS_ACTIVE\020\002\022\032\n\026SERVICESTATUS_U" + "PDATING\020\003\022!\n\035SERVICESTATUS_PENDING_REMOV" + "AL\020\004\022\036\n\032SERVICESTATUS_SLA_VIOLATED\020\005*\251\001\n" + "\017SliceStatusEnum\022\031\n\025SLICESTATUS_UNDEFINE" + "D\020\000\022\027\n\023SLICESTATUS_PLANNED\020\001\022\024\n\020SLICESTA" + "TUS_INIT\020\002\022\026\n\022SLICESTATUS_ACTIVE\020\003\022\026\n\022SL" + "ICESTATUS_DEINIT\020\004\022\034\n\030SLICESTATUS_SLA_VI" + "OLATED\020\005*]\n\020ConfigActionEnum\022\032\n\026CONFIGAC" + "TION_UNDEFINED\020\000\022\024\n\020CONFIGACTION_SET\020\001\022\027" + "\n\023CONFIGACTION_DELETE\020\002*m\n\024ConstraintAct" + "ionEnum\022\036\n\032CONSTRAINTACTION_UNDEFINED\020\000\022" + "\030\n\024CONSTRAINTACTION_SET\020\001\022\033\n\027CONSTRAINTA" + "CTION_DELETE\020\002*\203\002\n\022IsolationLevelEnum\022\020\n" + "\014NO_ISOLATION\020\000\022\026\n\022PHYSICAL_ISOLATION\020\001\022" + "\025\n\021LOGICAL_ISOLATION\020\002\022\025\n\021PROCESS_ISOLAT" + "ION\020\003\022\035\n\031PHYSICAL_MEMORY_ISOLATION\020\004\022\036\n\032" + "PHYSICAL_NETWORK_ISOLATION\020\005\022\036\n\032VIRTUAL_" + "RESOURCE_ISOLATION\020\006\022\037\n\033NETWORK_FUNCTION" + "S_ISOLATION\020\007\022\025\n\021SERVICE_ISOLATION\020\0102\246\031\n" + "\016ContextService\022:\n\016ListContextIds\022\016.cont" + "ext.Empty\032\026.context.ContextIdList\"\000\0226\n\014L" + "istContexts\022\016.context.Empty\032\024.context.Co" + "ntextList\"\000\0224\n\nGetContext\022\022.context.Cont" + "extId\032\020.context.Context\"\000\0224\n\nSetContext\022" + "\020.context.Context\032\022.context.ContextId\"\000\022" + "5\n\rRemoveContext\022\022.context.ContextId\032\016.c" + "ontext.Empty\"\000\022=\n\020GetContextEvents\022\016.con" + "text.Empty\032\025.context.ContextEvent\"\0000\001\022@\n" + "\017ListTopologyIds\022\022.context.ContextId\032\027.c" + "ontext.TopologyIdList\"\000\022=\n\016ListTopologie" + "s\022\022.context.ContextId\032\025.context.Topology" + "List\"\000\0227\n\013GetTopology\022\023.context.Topology" + "Id\032\021.context.Topology\"\000\022E\n\022GetTopologyDe" + "tails\022\023.context.TopologyId\032\030.context.Top" + "ologyDetails\"\000\0227\n\013SetTopology\022\021.context." + "Topology\032\023.context.TopologyId\"\000\0227\n\016Remov" + "eTopology\022\023.context.TopologyId\032\016.context" + ".Empty\"\000\022?\n\021GetTopologyEvents\022\016.context." + "Empty\032\026.context.TopologyEvent\"\0000\001\0228\n\rLis" + "tDeviceIds\022\016.context.Empty\032\025.context.Dev" + "iceIdList\"\000\0224\n\013ListDevices\022\016.context.Emp" + "ty\032\023.context.DeviceList\"\000\0221\n\tGetDevice\022\021" + ".context.DeviceId\032\017.context.Device\"\000\0221\n\t" + "SetDevice\022\017.context.Device\032\021.context.Dev" + "iceId\"\000\0223\n\014RemoveDevice\022\021.context.Device" + "Id\032\016.context.Empty\"\000\022;\n\017GetDeviceEvents\022" + "\016.context.Empty\032\024.context.DeviceEvent\"\0000" + "\001\022<\n\014SelectDevice\022\025.context.DeviceFilter" + "\032\023.context.DeviceList\"\000\022I\n\021ListEndPointN" + "ames\022\027.context.EndPointIdList\032\031.context." + "EndPointNameList\"\000\0224\n\013ListLinkIds\022\016.cont" + "ext.Empty\032\023.context.LinkIdList\"\000\0220\n\tList" + "Links\022\016.context.Empty\032\021.context.LinkList" + "\"\000\022+\n\007GetLink\022\017.context.LinkId\032\r.context" + ".Link\"\000\022+\n\007SetLink\022\r.context.Link\032\017.cont" + "ext.LinkId\"\000\022/\n\nRemoveLink\022\017.context.Lin" + "kId\032\016.context.Empty\"\000\0227\n\rGetLinkEvents\022\016" + ".context.Empty\032\022.context.LinkEvent\"\0000\001\022>" + "\n\016ListServiceIds\022\022.context.ContextId\032\026.c" + "ontext.ServiceIdList\"\000\022:\n\014ListServices\022\022" + ".context.ContextId\032\024.context.ServiceList" + "\"\000\0224\n\nGetService\022\022.context.ServiceId\032\020.c" + "ontext.Service\"\000\0224\n\nSetService\022\020.context" + ".Service\032\022.context.ServiceId\"\000\0226\n\014UnsetS" + "ervice\022\020.context.Service\032\022.context.Servi" + "ceId\"\000\0225\n\rRemoveService\022\022.context.Servic" + "eId\032\016.context.Empty\"\000\022=\n\020GetServiceEvent" + "s\022\016.context.Empty\032\025.context.ServiceEvent" + "\"\0000\001\022?\n\rSelectService\022\026.context.ServiceF" + "ilter\032\024.context.ServiceList\"\000\022:\n\014ListSli" + "ceIds\022\022.context.ContextId\032\024.context.Slic" + "eIdList\"\000\0226\n\nListSlices\022\022.context.Contex" + "tId\032\022.context.SliceList\"\000\022.\n\010GetSlice\022\020." + "context.SliceId\032\016.context.Slice\"\000\022.\n\010Set" + "Slice\022\016.context.Slice\032\020.context.SliceId\"" + "\000\0220\n\nUnsetSlice\022\016.context.Slice\032\020.contex" + "t.SliceId\"\000\0221\n\013RemoveSlice\022\020.context.Sli" + "ceId\032\016.context.Empty\"\000\0229\n\016GetSliceEvents" + "\022\016.context.Empty\032\023.context.SliceEvent\"\0000" + "\001\0229\n\013SelectSlice\022\024.context.SliceFilter\032\022" + ".context.SliceList\"\000\022D\n\021ListConnectionId" + "s\022\022.context.ServiceId\032\031.context.Connecti" + "onIdList\"\000\022@\n\017ListConnections\022\022.context." + "ServiceId\032\027.context.ConnectionList\"\000\022=\n\r" + "GetConnection\022\025.context.ConnectionId\032\023.c" + "ontext.Connection\"\000\022=\n\rSetConnection\022\023.c" + "ontext.Connection\032\025.context.ConnectionId" + "\"\000\022;\n\020RemoveConnection\022\025.context.Connect" + "ionId\032\016.context.Empty\"\000\022C\n\023GetConnection" + "Events\022\016.context.Empty\032\030.context.Connect" + "ionEvent\"\0000\001\022@\n\020GetOpticalConfig\022\016.conte" + "xt.Empty\032\032.context.OpticalConfigList\"\000\022F" + "\n\020SetOpticalConfig\022\026.context.OpticalConf" + "ig\032\030.context.OpticalConfigId\"\000\022I\n\023Select" + "OpticalConfig\022\030.context.OpticalConfigId\032" + "\026.context.OpticalConfig\"\000\0228\n\016SetOpticalL" + "ink\022\024.context.OpticalLink\032\016.context.Empt" + "y\"\000\022@\n\016GetOpticalLink\022\026.context.OpticalL" + "inkId\032\024.context.OpticalLink\"\000\022.\n\010GetFibe" + "r\022\020.context.FiberId\032\016.context.Fiber\"\000b\006p" + "roto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { acl.Acl.getDescriptor(), kpi_sample_types.KpiSampleTypes.getDescriptor() }); internal_static_context_Empty_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_context_Empty_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(internal_static_context_Empty_descriptor, new java.lang.String[] {}); diff --git a/src/policy/target/generated-sources/grpc/context/ContextServiceGrpc.java b/src/policy/target/generated-sources/grpc/context/ContextServiceGrpc.java index a03f7e9491a695b715ef6bcadcf82150bdc3a231..233312dd76b68ffefd109cd2ec4ca48df68275fd 100644 --- a/src/policy/target/generated-sources/grpc/context/ContextServiceGrpc.java +++ b/src/policy/target/generated-sources/grpc/context/ContextServiceGrpc.java @@ -4,7 +4,8 @@ import static io.grpc.MethodDescriptor.generateFullMethodName; /** */ -@io.quarkus.grpc.common.Generated(value = "by gRPC proto compiler (version 1.38.1)", comments = "Source: context.proto") +@io.quarkus.grpc.common.Generated(value = "by gRPC proto compiler (version 1.55.1)", comments = "Source: context.proto") +@io.grpc.stub.annotations.GrpcGenerated public final class ContextServiceGrpc { private ContextServiceGrpc() { @@ -882,299 +883,299 @@ public final class ContextServiceGrpc { /** */ - public static abstract class ContextServiceImplBase implements io.grpc.BindableService { + public interface AsyncService { /** */ - public void listContextIds(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<context.ContextOuterClass.ContextIdList> responseObserver) { + default void listContextIds(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<context.ContextOuterClass.ContextIdList> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListContextIdsMethod(), responseObserver); } /** */ - public void listContexts(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<context.ContextOuterClass.ContextList> responseObserver) { + default void listContexts(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<context.ContextOuterClass.ContextList> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListContextsMethod(), responseObserver); } /** */ - public void getContext(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Context> responseObserver) { + default void getContext(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Context> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetContextMethod(), responseObserver); } /** */ - public void setContext(context.ContextOuterClass.Context request, io.grpc.stub.StreamObserver<context.ContextOuterClass.ContextId> responseObserver) { + default void setContext(context.ContextOuterClass.Context request, io.grpc.stub.StreamObserver<context.ContextOuterClass.ContextId> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetContextMethod(), responseObserver); } /** */ - public void removeContext(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { + default void removeContext(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveContextMethod(), responseObserver); } /** */ - public void getContextEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<context.ContextOuterClass.ContextEvent> responseObserver) { + default void getContextEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<context.ContextOuterClass.ContextEvent> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetContextEventsMethod(), responseObserver); } /** */ - public void listTopologyIds(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.TopologyIdList> responseObserver) { + default void listTopologyIds(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.TopologyIdList> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListTopologyIdsMethod(), responseObserver); } /** */ - public void listTopologies(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.TopologyList> responseObserver) { + default void listTopologies(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.TopologyList> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListTopologiesMethod(), responseObserver); } /** */ - public void getTopology(context.ContextOuterClass.TopologyId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Topology> responseObserver) { + default void getTopology(context.ContextOuterClass.TopologyId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Topology> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTopologyMethod(), responseObserver); } /** */ - public void getTopologyDetails(context.ContextOuterClass.TopologyId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.TopologyDetails> responseObserver) { + default void getTopologyDetails(context.ContextOuterClass.TopologyId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.TopologyDetails> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTopologyDetailsMethod(), responseObserver); } /** */ - public void setTopology(context.ContextOuterClass.Topology request, io.grpc.stub.StreamObserver<context.ContextOuterClass.TopologyId> responseObserver) { + default void setTopology(context.ContextOuterClass.Topology request, io.grpc.stub.StreamObserver<context.ContextOuterClass.TopologyId> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetTopologyMethod(), responseObserver); } /** */ - public void removeTopology(context.ContextOuterClass.TopologyId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { + default void removeTopology(context.ContextOuterClass.TopologyId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveTopologyMethod(), responseObserver); } /** */ - public void getTopologyEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<context.ContextOuterClass.TopologyEvent> responseObserver) { + default void getTopologyEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<context.ContextOuterClass.TopologyEvent> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetTopologyEventsMethod(), responseObserver); } /** */ - public void listDeviceIds(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<context.ContextOuterClass.DeviceIdList> responseObserver) { + default void listDeviceIds(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<context.ContextOuterClass.DeviceIdList> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListDeviceIdsMethod(), responseObserver); } /** */ - public void listDevices(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<context.ContextOuterClass.DeviceList> responseObserver) { + default void listDevices(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<context.ContextOuterClass.DeviceList> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListDevicesMethod(), responseObserver); } /** */ - public void getDevice(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Device> responseObserver) { + default void getDevice(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Device> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetDeviceMethod(), responseObserver); } /** */ - public void setDevice(context.ContextOuterClass.Device request, io.grpc.stub.StreamObserver<context.ContextOuterClass.DeviceId> responseObserver) { + default void setDevice(context.ContextOuterClass.Device request, io.grpc.stub.StreamObserver<context.ContextOuterClass.DeviceId> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetDeviceMethod(), responseObserver); } /** */ - public void removeDevice(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { + default void removeDevice(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveDeviceMethod(), responseObserver); } /** */ - public void getDeviceEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<context.ContextOuterClass.DeviceEvent> responseObserver) { + default void getDeviceEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<context.ContextOuterClass.DeviceEvent> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetDeviceEventsMethod(), responseObserver); } /** */ - public void selectDevice(context.ContextOuterClass.DeviceFilter request, io.grpc.stub.StreamObserver<context.ContextOuterClass.DeviceList> responseObserver) { + default void selectDevice(context.ContextOuterClass.DeviceFilter request, io.grpc.stub.StreamObserver<context.ContextOuterClass.DeviceList> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSelectDeviceMethod(), responseObserver); } /** */ - public void listEndPointNames(context.ContextOuterClass.EndPointIdList request, io.grpc.stub.StreamObserver<context.ContextOuterClass.EndPointNameList> responseObserver) { + default void listEndPointNames(context.ContextOuterClass.EndPointIdList request, io.grpc.stub.StreamObserver<context.ContextOuterClass.EndPointNameList> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListEndPointNamesMethod(), responseObserver); } /** */ - public void listLinkIds(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<context.ContextOuterClass.LinkIdList> responseObserver) { + default void listLinkIds(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<context.ContextOuterClass.LinkIdList> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListLinkIdsMethod(), responseObserver); } /** */ - public void listLinks(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<context.ContextOuterClass.LinkList> responseObserver) { + default void listLinks(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<context.ContextOuterClass.LinkList> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListLinksMethod(), responseObserver); } /** */ - public void getLink(context.ContextOuterClass.LinkId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Link> responseObserver) { + default void getLink(context.ContextOuterClass.LinkId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Link> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetLinkMethod(), responseObserver); } /** */ - public void setLink(context.ContextOuterClass.Link request, io.grpc.stub.StreamObserver<context.ContextOuterClass.LinkId> responseObserver) { + default void setLink(context.ContextOuterClass.Link request, io.grpc.stub.StreamObserver<context.ContextOuterClass.LinkId> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetLinkMethod(), responseObserver); } /** */ - public void removeLink(context.ContextOuterClass.LinkId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { + default void removeLink(context.ContextOuterClass.LinkId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveLinkMethod(), responseObserver); } /** */ - public void getLinkEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<context.ContextOuterClass.LinkEvent> responseObserver) { + default void getLinkEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<context.ContextOuterClass.LinkEvent> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetLinkEventsMethod(), responseObserver); } /** */ - public void listServiceIds(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.ServiceIdList> responseObserver) { + default void listServiceIds(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.ServiceIdList> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListServiceIdsMethod(), responseObserver); } /** */ - public void listServices(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.ServiceList> responseObserver) { + default void listServices(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.ServiceList> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListServicesMethod(), responseObserver); } /** */ - public void getService(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Service> responseObserver) { + default void getService(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Service> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetServiceMethod(), responseObserver); } /** */ - public void setService(context.ContextOuterClass.Service request, io.grpc.stub.StreamObserver<context.ContextOuterClass.ServiceId> responseObserver) { + default void setService(context.ContextOuterClass.Service request, io.grpc.stub.StreamObserver<context.ContextOuterClass.ServiceId> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetServiceMethod(), responseObserver); } /** */ - public void unsetService(context.ContextOuterClass.Service request, io.grpc.stub.StreamObserver<context.ContextOuterClass.ServiceId> responseObserver) { + default void unsetService(context.ContextOuterClass.Service request, io.grpc.stub.StreamObserver<context.ContextOuterClass.ServiceId> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnsetServiceMethod(), responseObserver); } /** */ - public void removeService(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { + default void removeService(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveServiceMethod(), responseObserver); } /** */ - public void getServiceEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<context.ContextOuterClass.ServiceEvent> responseObserver) { + default void getServiceEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<context.ContextOuterClass.ServiceEvent> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetServiceEventsMethod(), responseObserver); } /** */ - public void selectService(context.ContextOuterClass.ServiceFilter request, io.grpc.stub.StreamObserver<context.ContextOuterClass.ServiceList> responseObserver) { + default void selectService(context.ContextOuterClass.ServiceFilter request, io.grpc.stub.StreamObserver<context.ContextOuterClass.ServiceList> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSelectServiceMethod(), responseObserver); } /** */ - public void listSliceIds(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.SliceIdList> responseObserver) { + default void listSliceIds(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.SliceIdList> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListSliceIdsMethod(), responseObserver); } /** */ - public void listSlices(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.SliceList> responseObserver) { + default void listSlices(context.ContextOuterClass.ContextId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.SliceList> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListSlicesMethod(), responseObserver); } /** */ - public void getSlice(context.ContextOuterClass.SliceId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Slice> responseObserver) { + default void getSlice(context.ContextOuterClass.SliceId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Slice> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSliceMethod(), responseObserver); } /** */ - public void setSlice(context.ContextOuterClass.Slice request, io.grpc.stub.StreamObserver<context.ContextOuterClass.SliceId> responseObserver) { + default void setSlice(context.ContextOuterClass.Slice request, io.grpc.stub.StreamObserver<context.ContextOuterClass.SliceId> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetSliceMethod(), responseObserver); } /** */ - public void unsetSlice(context.ContextOuterClass.Slice request, io.grpc.stub.StreamObserver<context.ContextOuterClass.SliceId> responseObserver) { + default void unsetSlice(context.ContextOuterClass.Slice request, io.grpc.stub.StreamObserver<context.ContextOuterClass.SliceId> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUnsetSliceMethod(), responseObserver); } /** */ - public void removeSlice(context.ContextOuterClass.SliceId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { + default void removeSlice(context.ContextOuterClass.SliceId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveSliceMethod(), responseObserver); } /** */ - public void getSliceEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<context.ContextOuterClass.SliceEvent> responseObserver) { + default void getSliceEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<context.ContextOuterClass.SliceEvent> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSliceEventsMethod(), responseObserver); } /** */ - public void selectSlice(context.ContextOuterClass.SliceFilter request, io.grpc.stub.StreamObserver<context.ContextOuterClass.SliceList> responseObserver) { + default void selectSlice(context.ContextOuterClass.SliceFilter request, io.grpc.stub.StreamObserver<context.ContextOuterClass.SliceList> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSelectSliceMethod(), responseObserver); } /** */ - public void listConnectionIds(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.ConnectionIdList> responseObserver) { + default void listConnectionIds(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.ConnectionIdList> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListConnectionIdsMethod(), responseObserver); } /** */ - public void listConnections(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.ConnectionList> responseObserver) { + default void listConnections(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.ConnectionList> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListConnectionsMethod(), responseObserver); } /** */ - public void getConnection(context.ContextOuterClass.ConnectionId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Connection> responseObserver) { + default void getConnection(context.ContextOuterClass.ConnectionId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Connection> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetConnectionMethod(), responseObserver); } /** */ - public void setConnection(context.ContextOuterClass.Connection request, io.grpc.stub.StreamObserver<context.ContextOuterClass.ConnectionId> responseObserver) { + default void setConnection(context.ContextOuterClass.Connection request, io.grpc.stub.StreamObserver<context.ContextOuterClass.ConnectionId> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetConnectionMethod(), responseObserver); } /** */ - public void removeConnection(context.ContextOuterClass.ConnectionId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { + default void removeConnection(context.ContextOuterClass.ConnectionId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemoveConnectionMethod(), responseObserver); } /** */ - public void getConnectionEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<context.ContextOuterClass.ConnectionEvent> responseObserver) { + default void getConnectionEvents(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<context.ContextOuterClass.ConnectionEvent> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetConnectionEventsMethod(), responseObserver); } @@ -1183,47 +1184,54 @@ public final class ContextServiceGrpc { * ------------------------------ Experimental ----------------------------- * </pre> */ - public void getOpticalConfig(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<context.ContextOuterClass.OpticalConfigList> responseObserver) { + default void getOpticalConfig(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<context.ContextOuterClass.OpticalConfigList> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetOpticalConfigMethod(), responseObserver); } /** */ - public void setOpticalConfig(context.ContextOuterClass.OpticalConfig request, io.grpc.stub.StreamObserver<context.ContextOuterClass.OpticalConfigId> responseObserver) { + default void setOpticalConfig(context.ContextOuterClass.OpticalConfig request, io.grpc.stub.StreamObserver<context.ContextOuterClass.OpticalConfigId> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetOpticalConfigMethod(), responseObserver); } /** */ - public void selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.OpticalConfig> responseObserver) { + default void selectOpticalConfig(context.ContextOuterClass.OpticalConfigId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.OpticalConfig> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSelectOpticalConfigMethod(), responseObserver); } /** */ - public void setOpticalLink(context.ContextOuterClass.OpticalLink request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { + default void setOpticalLink(context.ContextOuterClass.OpticalLink request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetOpticalLinkMethod(), responseObserver); } /** */ - public void getOpticalLink(context.ContextOuterClass.OpticalLinkId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.OpticalLink> responseObserver) { + default void getOpticalLink(context.ContextOuterClass.OpticalLinkId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.OpticalLink> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetOpticalLinkMethod(), responseObserver); } /** */ - public void getFiber(context.ContextOuterClass.FiberId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Fiber> responseObserver) { + default void getFiber(context.ContextOuterClass.FiberId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Fiber> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetFiberMethod(), responseObserver); } + } + + /** + * Base class for the server implementation of the service ContextService. + */ + public static abstract class ContextServiceImplBase implements io.grpc.BindableService, AsyncService { @java.lang.Override public io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(getListContextIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Empty, context.ContextOuterClass.ContextIdList>(this, METHODID_LIST_CONTEXT_IDS))).addMethod(getListContextsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Empty, context.ContextOuterClass.ContextList>(this, METHODID_LIST_CONTEXTS))).addMethod(getGetContextMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.ContextId, context.ContextOuterClass.Context>(this, METHODID_GET_CONTEXT))).addMethod(getSetContextMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Context, context.ContextOuterClass.ContextId>(this, METHODID_SET_CONTEXT))).addMethod(getRemoveContextMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.ContextId, context.ContextOuterClass.Empty>(this, METHODID_REMOVE_CONTEXT))).addMethod(getGetContextEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers<context.ContextOuterClass.Empty, context.ContextOuterClass.ContextEvent>(this, METHODID_GET_CONTEXT_EVENTS))).addMethod(getListTopologyIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.ContextId, context.ContextOuterClass.TopologyIdList>(this, METHODID_LIST_TOPOLOGY_IDS))).addMethod(getListTopologiesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.ContextId, context.ContextOuterClass.TopologyList>(this, METHODID_LIST_TOPOLOGIES))).addMethod(getGetTopologyMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.TopologyId, context.ContextOuterClass.Topology>(this, METHODID_GET_TOPOLOGY))).addMethod(getGetTopologyDetailsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.TopologyId, context.ContextOuterClass.TopologyDetails>(this, METHODID_GET_TOPOLOGY_DETAILS))).addMethod(getSetTopologyMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Topology, context.ContextOuterClass.TopologyId>(this, METHODID_SET_TOPOLOGY))).addMethod(getRemoveTopologyMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.TopologyId, context.ContextOuterClass.Empty>(this, METHODID_REMOVE_TOPOLOGY))).addMethod(getGetTopologyEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers<context.ContextOuterClass.Empty, context.ContextOuterClass.TopologyEvent>(this, METHODID_GET_TOPOLOGY_EVENTS))).addMethod(getListDeviceIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Empty, context.ContextOuterClass.DeviceIdList>(this, METHODID_LIST_DEVICE_IDS))).addMethod(getListDevicesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Empty, context.ContextOuterClass.DeviceList>(this, METHODID_LIST_DEVICES))).addMethod(getGetDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.DeviceId, context.ContextOuterClass.Device>(this, METHODID_GET_DEVICE))).addMethod(getSetDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Device, context.ContextOuterClass.DeviceId>(this, METHODID_SET_DEVICE))).addMethod(getRemoveDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.DeviceId, context.ContextOuterClass.Empty>(this, METHODID_REMOVE_DEVICE))).addMethod(getGetDeviceEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers<context.ContextOuterClass.Empty, context.ContextOuterClass.DeviceEvent>(this, METHODID_GET_DEVICE_EVENTS))).addMethod(getSelectDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.DeviceFilter, context.ContextOuterClass.DeviceList>(this, METHODID_SELECT_DEVICE))).addMethod(getListEndPointNamesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.EndPointIdList, context.ContextOuterClass.EndPointNameList>(this, METHODID_LIST_END_POINT_NAMES))).addMethod(getListLinkIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Empty, context.ContextOuterClass.LinkIdList>(this, METHODID_LIST_LINK_IDS))).addMethod(getListLinksMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Empty, context.ContextOuterClass.LinkList>(this, METHODID_LIST_LINKS))).addMethod(getGetLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.LinkId, context.ContextOuterClass.Link>(this, METHODID_GET_LINK))).addMethod(getSetLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Link, context.ContextOuterClass.LinkId>(this, METHODID_SET_LINK))).addMethod(getRemoveLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.LinkId, context.ContextOuterClass.Empty>(this, METHODID_REMOVE_LINK))).addMethod(getGetLinkEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers<context.ContextOuterClass.Empty, context.ContextOuterClass.LinkEvent>(this, METHODID_GET_LINK_EVENTS))).addMethod(getListServiceIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.ContextId, context.ContextOuterClass.ServiceIdList>(this, METHODID_LIST_SERVICE_IDS))).addMethod(getListServicesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.ContextId, context.ContextOuterClass.ServiceList>(this, METHODID_LIST_SERVICES))).addMethod(getGetServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.ServiceId, context.ContextOuterClass.Service>(this, METHODID_GET_SERVICE))).addMethod(getSetServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Service, context.ContextOuterClass.ServiceId>(this, METHODID_SET_SERVICE))).addMethod(getUnsetServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Service, context.ContextOuterClass.ServiceId>(this, METHODID_UNSET_SERVICE))).addMethod(getRemoveServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.ServiceId, context.ContextOuterClass.Empty>(this, METHODID_REMOVE_SERVICE))).addMethod(getGetServiceEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers<context.ContextOuterClass.Empty, context.ContextOuterClass.ServiceEvent>(this, METHODID_GET_SERVICE_EVENTS))).addMethod(getSelectServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.ServiceFilter, context.ContextOuterClass.ServiceList>(this, METHODID_SELECT_SERVICE))).addMethod(getListSliceIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.ContextId, context.ContextOuterClass.SliceIdList>(this, METHODID_LIST_SLICE_IDS))).addMethod(getListSlicesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.ContextId, context.ContextOuterClass.SliceList>(this, METHODID_LIST_SLICES))).addMethod(getGetSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.SliceId, context.ContextOuterClass.Slice>(this, METHODID_GET_SLICE))).addMethod(getSetSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Slice, context.ContextOuterClass.SliceId>(this, METHODID_SET_SLICE))).addMethod(getUnsetSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Slice, context.ContextOuterClass.SliceId>(this, METHODID_UNSET_SLICE))).addMethod(getRemoveSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.SliceId, context.ContextOuterClass.Empty>(this, METHODID_REMOVE_SLICE))).addMethod(getGetSliceEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers<context.ContextOuterClass.Empty, context.ContextOuterClass.SliceEvent>(this, METHODID_GET_SLICE_EVENTS))).addMethod(getSelectSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.SliceFilter, context.ContextOuterClass.SliceList>(this, METHODID_SELECT_SLICE))).addMethod(getListConnectionIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.ServiceId, context.ContextOuterClass.ConnectionIdList>(this, METHODID_LIST_CONNECTION_IDS))).addMethod(getListConnectionsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.ServiceId, context.ContextOuterClass.ConnectionList>(this, METHODID_LIST_CONNECTIONS))).addMethod(getGetConnectionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.ConnectionId, context.ContextOuterClass.Connection>(this, METHODID_GET_CONNECTION))).addMethod(getSetConnectionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Connection, context.ContextOuterClass.ConnectionId>(this, METHODID_SET_CONNECTION))).addMethod(getRemoveConnectionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.ConnectionId, context.ContextOuterClass.Empty>(this, METHODID_REMOVE_CONNECTION))).addMethod(getGetConnectionEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers<context.ContextOuterClass.Empty, context.ContextOuterClass.ConnectionEvent>(this, METHODID_GET_CONNECTION_EVENTS))).addMethod(getGetOpticalConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Empty, context.ContextOuterClass.OpticalConfigList>(this, METHODID_GET_OPTICAL_CONFIG))).addMethod(getSetOpticalConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.OpticalConfig, context.ContextOuterClass.OpticalConfigId>(this, METHODID_SET_OPTICAL_CONFIG))).addMethod(getSelectOpticalConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.OpticalConfigId, context.ContextOuterClass.OpticalConfig>(this, METHODID_SELECT_OPTICAL_CONFIG))).addMethod(getSetOpticalLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.OpticalLink, context.ContextOuterClass.Empty>(this, METHODID_SET_OPTICAL_LINK))).addMethod(getGetOpticalLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.OpticalLinkId, context.ContextOuterClass.OpticalLink>(this, METHODID_GET_OPTICAL_LINK))).addMethod(getGetFiberMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.FiberId, context.ContextOuterClass.Fiber>(this, METHODID_GET_FIBER))).build(); + return ContextServiceGrpc.bindService(this); } } /** + * A stub to allow clients to do asynchronous rpc calls to service ContextService. */ public static class ContextServiceStub extends io.grpc.stub.AbstractAsyncStub<ContextServiceStub> { @@ -1571,6 +1579,7 @@ public final class ContextServiceGrpc { } /** + * A stub to allow clients to do synchronous rpc calls to service ContextService. */ public static class ContextServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub<ContextServiceBlockingStub> { @@ -1918,6 +1927,7 @@ public final class ContextServiceGrpc { } /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service ContextService. */ public static class ContextServiceFutureStub extends io.grpc.stub.AbstractFutureStub<ContextServiceFutureStub> { @@ -2334,11 +2344,11 @@ public final class ContextServiceGrpc { private static final class MethodHandlers<Req, Resp> implements io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>, io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>, io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>, io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> { - private final ContextServiceImplBase serviceImpl; + private final AsyncService serviceImpl; private final int methodId; - MethodHandlers(ContextServiceImplBase serviceImpl, int methodId) { + MethodHandlers(AsyncService serviceImpl, int methodId) { this.serviceImpl = serviceImpl; this.methodId = methodId; } @@ -2527,6 +2537,10 @@ public final class ContextServiceGrpc { } } + public static io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(getListContextIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Empty, context.ContextOuterClass.ContextIdList>(service, METHODID_LIST_CONTEXT_IDS))).addMethod(getListContextsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Empty, context.ContextOuterClass.ContextList>(service, METHODID_LIST_CONTEXTS))).addMethod(getGetContextMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.ContextId, context.ContextOuterClass.Context>(service, METHODID_GET_CONTEXT))).addMethod(getSetContextMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Context, context.ContextOuterClass.ContextId>(service, METHODID_SET_CONTEXT))).addMethod(getRemoveContextMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.ContextId, context.ContextOuterClass.Empty>(service, METHODID_REMOVE_CONTEXT))).addMethod(getGetContextEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers<context.ContextOuterClass.Empty, context.ContextOuterClass.ContextEvent>(service, METHODID_GET_CONTEXT_EVENTS))).addMethod(getListTopologyIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.ContextId, context.ContextOuterClass.TopologyIdList>(service, METHODID_LIST_TOPOLOGY_IDS))).addMethod(getListTopologiesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.ContextId, context.ContextOuterClass.TopologyList>(service, METHODID_LIST_TOPOLOGIES))).addMethod(getGetTopologyMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.TopologyId, context.ContextOuterClass.Topology>(service, METHODID_GET_TOPOLOGY))).addMethod(getGetTopologyDetailsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.TopologyId, context.ContextOuterClass.TopologyDetails>(service, METHODID_GET_TOPOLOGY_DETAILS))).addMethod(getSetTopologyMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Topology, context.ContextOuterClass.TopologyId>(service, METHODID_SET_TOPOLOGY))).addMethod(getRemoveTopologyMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.TopologyId, context.ContextOuterClass.Empty>(service, METHODID_REMOVE_TOPOLOGY))).addMethod(getGetTopologyEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers<context.ContextOuterClass.Empty, context.ContextOuterClass.TopologyEvent>(service, METHODID_GET_TOPOLOGY_EVENTS))).addMethod(getListDeviceIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Empty, context.ContextOuterClass.DeviceIdList>(service, METHODID_LIST_DEVICE_IDS))).addMethod(getListDevicesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Empty, context.ContextOuterClass.DeviceList>(service, METHODID_LIST_DEVICES))).addMethod(getGetDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.DeviceId, context.ContextOuterClass.Device>(service, METHODID_GET_DEVICE))).addMethod(getSetDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Device, context.ContextOuterClass.DeviceId>(service, METHODID_SET_DEVICE))).addMethod(getRemoveDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.DeviceId, context.ContextOuterClass.Empty>(service, METHODID_REMOVE_DEVICE))).addMethod(getGetDeviceEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers<context.ContextOuterClass.Empty, context.ContextOuterClass.DeviceEvent>(service, METHODID_GET_DEVICE_EVENTS))).addMethod(getSelectDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.DeviceFilter, context.ContextOuterClass.DeviceList>(service, METHODID_SELECT_DEVICE))).addMethod(getListEndPointNamesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.EndPointIdList, context.ContextOuterClass.EndPointNameList>(service, METHODID_LIST_END_POINT_NAMES))).addMethod(getListLinkIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Empty, context.ContextOuterClass.LinkIdList>(service, METHODID_LIST_LINK_IDS))).addMethod(getListLinksMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Empty, context.ContextOuterClass.LinkList>(service, METHODID_LIST_LINKS))).addMethod(getGetLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.LinkId, context.ContextOuterClass.Link>(service, METHODID_GET_LINK))).addMethod(getSetLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Link, context.ContextOuterClass.LinkId>(service, METHODID_SET_LINK))).addMethod(getRemoveLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.LinkId, context.ContextOuterClass.Empty>(service, METHODID_REMOVE_LINK))).addMethod(getGetLinkEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers<context.ContextOuterClass.Empty, context.ContextOuterClass.LinkEvent>(service, METHODID_GET_LINK_EVENTS))).addMethod(getListServiceIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.ContextId, context.ContextOuterClass.ServiceIdList>(service, METHODID_LIST_SERVICE_IDS))).addMethod(getListServicesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.ContextId, context.ContextOuterClass.ServiceList>(service, METHODID_LIST_SERVICES))).addMethod(getGetServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.ServiceId, context.ContextOuterClass.Service>(service, METHODID_GET_SERVICE))).addMethod(getSetServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Service, context.ContextOuterClass.ServiceId>(service, METHODID_SET_SERVICE))).addMethod(getUnsetServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Service, context.ContextOuterClass.ServiceId>(service, METHODID_UNSET_SERVICE))).addMethod(getRemoveServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.ServiceId, context.ContextOuterClass.Empty>(service, METHODID_REMOVE_SERVICE))).addMethod(getGetServiceEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers<context.ContextOuterClass.Empty, context.ContextOuterClass.ServiceEvent>(service, METHODID_GET_SERVICE_EVENTS))).addMethod(getSelectServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.ServiceFilter, context.ContextOuterClass.ServiceList>(service, METHODID_SELECT_SERVICE))).addMethod(getListSliceIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.ContextId, context.ContextOuterClass.SliceIdList>(service, METHODID_LIST_SLICE_IDS))).addMethod(getListSlicesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.ContextId, context.ContextOuterClass.SliceList>(service, METHODID_LIST_SLICES))).addMethod(getGetSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.SliceId, context.ContextOuterClass.Slice>(service, METHODID_GET_SLICE))).addMethod(getSetSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Slice, context.ContextOuterClass.SliceId>(service, METHODID_SET_SLICE))).addMethod(getUnsetSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Slice, context.ContextOuterClass.SliceId>(service, METHODID_UNSET_SLICE))).addMethod(getRemoveSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.SliceId, context.ContextOuterClass.Empty>(service, METHODID_REMOVE_SLICE))).addMethod(getGetSliceEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers<context.ContextOuterClass.Empty, context.ContextOuterClass.SliceEvent>(service, METHODID_GET_SLICE_EVENTS))).addMethod(getSelectSliceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.SliceFilter, context.ContextOuterClass.SliceList>(service, METHODID_SELECT_SLICE))).addMethod(getListConnectionIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.ServiceId, context.ContextOuterClass.ConnectionIdList>(service, METHODID_LIST_CONNECTION_IDS))).addMethod(getListConnectionsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.ServiceId, context.ContextOuterClass.ConnectionList>(service, METHODID_LIST_CONNECTIONS))).addMethod(getGetConnectionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.ConnectionId, context.ContextOuterClass.Connection>(service, METHODID_GET_CONNECTION))).addMethod(getSetConnectionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Connection, context.ContextOuterClass.ConnectionId>(service, METHODID_SET_CONNECTION))).addMethod(getRemoveConnectionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.ConnectionId, context.ContextOuterClass.Empty>(service, METHODID_REMOVE_CONNECTION))).addMethod(getGetConnectionEventsMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers<context.ContextOuterClass.Empty, context.ContextOuterClass.ConnectionEvent>(service, METHODID_GET_CONNECTION_EVENTS))).addMethod(getGetOpticalConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Empty, context.ContextOuterClass.OpticalConfigList>(service, METHODID_GET_OPTICAL_CONFIG))).addMethod(getSetOpticalConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.OpticalConfig, context.ContextOuterClass.OpticalConfigId>(service, METHODID_SET_OPTICAL_CONFIG))).addMethod(getSelectOpticalConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.OpticalConfigId, context.ContextOuterClass.OpticalConfig>(service, METHODID_SELECT_OPTICAL_CONFIG))).addMethod(getSetOpticalLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.OpticalLink, context.ContextOuterClass.Empty>(service, METHODID_SET_OPTICAL_LINK))).addMethod(getGetOpticalLinkMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.OpticalLinkId, context.ContextOuterClass.OpticalLink>(service, METHODID_GET_OPTICAL_LINK))).addMethod(getGetFiberMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.FiberId, context.ContextOuterClass.Fiber>(service, METHODID_GET_FIBER))).build(); + } + private static abstract class ContextServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { ContextServiceBaseDescriptorSupplier() { diff --git a/src/policy/target/generated-sources/grpc/context_policy/ContextPolicyServiceGrpc.java b/src/policy/target/generated-sources/grpc/context_policy/ContextPolicyServiceGrpc.java index f7123f88ff428fc2d67fc631e10d563dc9b224f8..721493b1e76ee46e66bccf1b193eb1f192247d1c 100644 --- a/src/policy/target/generated-sources/grpc/context_policy/ContextPolicyServiceGrpc.java +++ b/src/policy/target/generated-sources/grpc/context_policy/ContextPolicyServiceGrpc.java @@ -7,7 +7,8 @@ import static io.grpc.MethodDescriptor.generateFullMethodName; * created as a separate service to prevent import-loops in context and policy * </pre> */ -@io.quarkus.grpc.common.Generated(value = "by gRPC proto compiler (version 1.38.1)", comments = "Source: context_policy.proto") +@io.quarkus.grpc.common.Generated(value = "by gRPC proto compiler (version 1.55.1)", comments = "Source: context_policy.proto") +@io.grpc.stub.annotations.GrpcGenerated public final class ContextPolicyServiceGrpc { private ContextPolicyServiceGrpc() { @@ -138,45 +139,55 @@ public final class ContextPolicyServiceGrpc { * created as a separate service to prevent import-loops in context and policy * </pre> */ - public static abstract class ContextPolicyServiceImplBase implements io.grpc.BindableService { + public interface AsyncService { /** */ - public void listPolicyRuleIds(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleIdList> responseObserver) { + default void listPolicyRuleIds(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleIdList> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListPolicyRuleIdsMethod(), responseObserver); } /** */ - public void listPolicyRules(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleList> responseObserver) { + default void listPolicyRules(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleList> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListPolicyRulesMethod(), responseObserver); } /** */ - public void getPolicyRule(policy.Policy.PolicyRuleId request, io.grpc.stub.StreamObserver<policy.Policy.PolicyRule> responseObserver) { + default void getPolicyRule(policy.Policy.PolicyRuleId request, io.grpc.stub.StreamObserver<policy.Policy.PolicyRule> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetPolicyRuleMethod(), responseObserver); } /** */ - public void setPolicyRule(policy.Policy.PolicyRule request, io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleId> responseObserver) { + default void setPolicyRule(policy.Policy.PolicyRule request, io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleId> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetPolicyRuleMethod(), responseObserver); } /** */ - public void removePolicyRule(policy.Policy.PolicyRuleId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { + default void removePolicyRule(policy.Policy.PolicyRuleId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRemovePolicyRuleMethod(), responseObserver); } + } + + /** + * Base class for the server implementation of the service ContextPolicyService. + * <pre> + * created as a separate service to prevent import-loops in context and policy + * </pre> + */ + public static abstract class ContextPolicyServiceImplBase implements io.grpc.BindableService, AsyncService { @java.lang.Override public io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(getListPolicyRuleIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Empty, policy.Policy.PolicyRuleIdList>(this, METHODID_LIST_POLICY_RULE_IDS))).addMethod(getListPolicyRulesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Empty, policy.Policy.PolicyRuleList>(this, METHODID_LIST_POLICY_RULES))).addMethod(getGetPolicyRuleMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<policy.Policy.PolicyRuleId, policy.Policy.PolicyRule>(this, METHODID_GET_POLICY_RULE))).addMethod(getSetPolicyRuleMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<policy.Policy.PolicyRule, policy.Policy.PolicyRuleId>(this, METHODID_SET_POLICY_RULE))).addMethod(getRemovePolicyRuleMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<policy.Policy.PolicyRuleId, context.ContextOuterClass.Empty>(this, METHODID_REMOVE_POLICY_RULE))).build(); + return ContextPolicyServiceGrpc.bindService(this); } } /** + * A stub to allow clients to do asynchronous rpc calls to service ContextPolicyService. * <pre> * created as a separate service to prevent import-loops in context and policy * </pre> @@ -224,6 +235,7 @@ public final class ContextPolicyServiceGrpc { } /** + * A stub to allow clients to do synchronous rpc calls to service ContextPolicyService. * <pre> * created as a separate service to prevent import-loops in context and policy * </pre> @@ -271,6 +283,7 @@ public final class ContextPolicyServiceGrpc { } /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service ContextPolicyService. * <pre> * created as a separate service to prevent import-loops in context and policy * </pre> @@ -329,11 +342,11 @@ public final class ContextPolicyServiceGrpc { private static final class MethodHandlers<Req, Resp> implements io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>, io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>, io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>, io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> { - private final ContextPolicyServiceImplBase serviceImpl; + private final AsyncService serviceImpl; private final int methodId; - MethodHandlers(ContextPolicyServiceImplBase serviceImpl, int methodId) { + MethodHandlers(AsyncService serviceImpl, int methodId) { this.serviceImpl = serviceImpl; this.methodId = methodId; } @@ -372,6 +385,10 @@ public final class ContextPolicyServiceGrpc { } } + public static io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(getListPolicyRuleIdsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Empty, policy.Policy.PolicyRuleIdList>(service, METHODID_LIST_POLICY_RULE_IDS))).addMethod(getListPolicyRulesMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Empty, policy.Policy.PolicyRuleList>(service, METHODID_LIST_POLICY_RULES))).addMethod(getGetPolicyRuleMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<policy.Policy.PolicyRuleId, policy.Policy.PolicyRule>(service, METHODID_GET_POLICY_RULE))).addMethod(getSetPolicyRuleMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<policy.Policy.PolicyRule, policy.Policy.PolicyRuleId>(service, METHODID_SET_POLICY_RULE))).addMethod(getRemovePolicyRuleMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<policy.Policy.PolicyRuleId, context.ContextOuterClass.Empty>(service, METHODID_REMOVE_POLICY_RULE))).build(); + } + private static abstract class ContextPolicyServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { ContextPolicyServiceBaseDescriptorSupplier() { diff --git a/src/policy/target/generated-sources/grpc/device/Device.java b/src/policy/target/generated-sources/grpc/device/Device.java index 93bd490405da36c7ee2f26121e5abd94c3ec13a5..53ac328d63c864c382dea28aa7d9202939f49cac 100644 --- a/src/policy/target/generated-sources/grpc/device/Device.java +++ b/src/policy/target/generated-sources/grpc/device/Device.java @@ -18,35 +18,59 @@ public final class Device { com.google.protobuf.MessageOrBuilder { /** + * <pre> + * to be migrated to: "kpi_manager.KpiId" + * </pre> + * * <code>.monitoring.KpiId kpi_id = 1;</code> * @return Whether the kpiId field is set. */ boolean hasKpiId(); /** + * <pre> + * to be migrated to: "kpi_manager.KpiId" + * </pre> + * * <code>.monitoring.KpiId kpi_id = 1;</code> * @return The kpiId. */ monitoring.Monitoring.KpiId getKpiId(); /** + * <pre> + * to be migrated to: "kpi_manager.KpiId" + * </pre> + * * <code>.monitoring.KpiId kpi_id = 1;</code> */ monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); /** + * <pre> + * to be migrated to: "kpi_manager.KpiDescriptor" + * </pre> + * * <code>.monitoring.KpiDescriptor kpi_descriptor = 2;</code> * @return Whether the kpiDescriptor field is set. */ boolean hasKpiDescriptor(); /** + * <pre> + * to be migrated to: "kpi_manager.KpiDescriptor" + * </pre> + * * <code>.monitoring.KpiDescriptor kpi_descriptor = 2;</code> * @return The kpiDescriptor. */ monitoring.Monitoring.KpiDescriptor getKpiDescriptor(); /** + * <pre> + * to be migrated to: "kpi_manager.KpiDescriptor" + * </pre> + * * <code>.monitoring.KpiDescriptor kpi_descriptor = 2;</code> */ monitoring.Monitoring.KpiDescriptorOrBuilder getKpiDescriptorOrBuilder(); @@ -86,80 +110,6 @@ public final class Device { return new MonitoringSettings(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private MonitoringSettings(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - monitoring.Monitoring.KpiId.Builder subBuilder = null; - if (kpiId_ != null) { - subBuilder = kpiId_.toBuilder(); - } - kpiId_ = input.readMessage(monitoring.Monitoring.KpiId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(kpiId_); - kpiId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - monitoring.Monitoring.KpiDescriptor.Builder subBuilder = null; - if (kpiDescriptor_ != null) { - subBuilder = kpiDescriptor_.toBuilder(); - } - kpiDescriptor_ = input.readMessage(monitoring.Monitoring.KpiDescriptor.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(kpiDescriptor_); - kpiDescriptor_ = subBuilder.buildPartial(); - } - break; - } - case 29: - { - samplingDurationS_ = input.readFloat(); - break; - } - case 37: - { - samplingIntervalS_ = input.readFloat(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return device.Device.internal_static_device_MonitoringSettings_descriptor; } @@ -174,6 +124,10 @@ public final class Device { private monitoring.Monitoring.KpiId kpiId_; /** + * <pre> + * to be migrated to: "kpi_manager.KpiId" + * </pre> + * * <code>.monitoring.KpiId kpi_id = 1;</code> * @return Whether the kpiId field is set. */ @@ -183,6 +137,10 @@ public final class Device { } /** + * <pre> + * to be migrated to: "kpi_manager.KpiId" + * </pre> + * * <code>.monitoring.KpiId kpi_id = 1;</code> * @return The kpiId. */ @@ -192,11 +150,15 @@ public final class Device { } /** + * <pre> + * to be migrated to: "kpi_manager.KpiId" + * </pre> + * * <code>.monitoring.KpiId kpi_id = 1;</code> */ @java.lang.Override public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - return getKpiId(); + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; } public static final int KPI_DESCRIPTOR_FIELD_NUMBER = 2; @@ -204,6 +166,10 @@ public final class Device { private monitoring.Monitoring.KpiDescriptor kpiDescriptor_; /** + * <pre> + * to be migrated to: "kpi_manager.KpiDescriptor" + * </pre> + * * <code>.monitoring.KpiDescriptor kpi_descriptor = 2;</code> * @return Whether the kpiDescriptor field is set. */ @@ -213,6 +179,10 @@ public final class Device { } /** + * <pre> + * to be migrated to: "kpi_manager.KpiDescriptor" + * </pre> + * * <code>.monitoring.KpiDescriptor kpi_descriptor = 2;</code> * @return The kpiDescriptor. */ @@ -222,16 +192,20 @@ public final class Device { } /** + * <pre> + * to be migrated to: "kpi_manager.KpiDescriptor" + * </pre> + * * <code>.monitoring.KpiDescriptor kpi_descriptor = 2;</code> */ @java.lang.Override public monitoring.Monitoring.KpiDescriptorOrBuilder getKpiDescriptorOrBuilder() { - return getKpiDescriptor(); + return kpiDescriptor_ == null ? monitoring.Monitoring.KpiDescriptor.getDefaultInstance() : kpiDescriptor_; } public static final int SAMPLING_DURATION_S_FIELD_NUMBER = 3; - private float samplingDurationS_; + private float samplingDurationS_ = 0F; /** * <code>float sampling_duration_s = 3;</code> @@ -244,7 +218,7 @@ public final class Device { public static final int SAMPLING_INTERVAL_S_FIELD_NUMBER = 4; - private float samplingIntervalS_; + private float samplingIntervalS_ = 0F; /** * <code>float sampling_interval_s = 4;</code> @@ -276,13 +250,13 @@ public final class Device { if (kpiDescriptor_ != null) { output.writeMessage(2, getKpiDescriptor()); } - if (samplingDurationS_ != 0F) { + if (java.lang.Float.floatToRawIntBits(samplingDurationS_) != 0) { output.writeFloat(3, samplingDurationS_); } - if (samplingIntervalS_ != 0F) { + if (java.lang.Float.floatToRawIntBits(samplingIntervalS_) != 0) { output.writeFloat(4, samplingIntervalS_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -297,13 +271,13 @@ public final class Device { if (kpiDescriptor_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getKpiDescriptor()); } - if (samplingDurationS_ != 0F) { + if (java.lang.Float.floatToRawIntBits(samplingDurationS_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, samplingDurationS_); } - if (samplingIntervalS_ != 0F) { + if (java.lang.Float.floatToRawIntBits(samplingIntervalS_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, samplingIntervalS_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -333,7 +307,7 @@ public final class Device { return false; if (java.lang.Float.floatToIntBits(getSamplingIntervalS()) != java.lang.Float.floatToIntBits(other.getSamplingIntervalS())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -357,7 +331,7 @@ public final class Device { hash = (53 * hash) + java.lang.Float.floatToIntBits(getSamplingDurationS()); hash = (37 * hash) + SAMPLING_INTERVAL_S_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits(getSamplingIntervalS()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -451,32 +425,24 @@ public final class Device { // Construct using device.Device.MonitoringSettings.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (kpiIdBuilder_ == null) { - kpiId_ = null; - } else { - kpiId_ = null; + bitField0_ = 0; + kpiId_ = null; + if (kpiIdBuilder_ != null) { + kpiIdBuilder_.dispose(); kpiIdBuilder_ = null; } - if (kpiDescriptorBuilder_ == null) { - kpiDescriptor_ = null; - } else { - kpiDescriptor_ = null; + kpiDescriptor_ = null; + if (kpiDescriptorBuilder_ != null) { + kpiDescriptorBuilder_.dispose(); kpiDescriptorBuilder_ = null; } samplingDurationS_ = 0F; @@ -506,50 +472,27 @@ public final class Device { @java.lang.Override public device.Device.MonitoringSettings buildPartial() { device.Device.MonitoringSettings result = new device.Device.MonitoringSettings(this); - if (kpiIdBuilder_ == null) { - result.kpiId_ = kpiId_; - } else { - result.kpiId_ = kpiIdBuilder_.build(); - } - if (kpiDescriptorBuilder_ == null) { - result.kpiDescriptor_ = kpiDescriptor_; - } else { - result.kpiDescriptor_ = kpiDescriptorBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } - result.samplingDurationS_ = samplingDurationS_; - result.samplingIntervalS_ = samplingIntervalS_; onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(device.Device.MonitoringSettings result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.kpiId_ = kpiIdBuilder_ == null ? kpiId_ : kpiIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.kpiDescriptor_ = kpiDescriptorBuilder_ == null ? kpiDescriptor_ : kpiDescriptorBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.samplingDurationS_ = samplingDurationS_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.samplingIntervalS_ = samplingIntervalS_; + } } @java.lang.Override @@ -577,7 +520,7 @@ public final class Device { if (other.getSamplingIntervalS() != 0F) { setSamplingIntervalS(other.getSamplingIntervalS()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -589,33 +532,89 @@ public final class Device { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - device.Device.MonitoringSettings parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getKpiIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + input.readMessage(getKpiDescriptorFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 29: + { + samplingDurationS_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } + // case 29 + case 37: + { + samplingIntervalS_ = input.readFloat(); + bitField0_ |= 0x00000008; + break; + } + // case 37 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (device.Device.MonitoringSettings) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private monitoring.Monitoring.KpiId kpiId_; private com.google.protobuf.SingleFieldBuilderV3<monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> kpiIdBuilder_; /** + * <pre> + * to be migrated to: "kpi_manager.KpiId" + * </pre> + * * <code>.monitoring.KpiId kpi_id = 1;</code> * @return Whether the kpiId field is set. */ public boolean hasKpiId() { - return kpiIdBuilder_ != null || kpiId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** + * <pre> + * to be migrated to: "kpi_manager.KpiId" + * </pre> + * * <code>.monitoring.KpiId kpi_id = 1;</code> * @return The kpiId. */ @@ -628,6 +627,10 @@ public final class Device { } /** + * <pre> + * to be migrated to: "kpi_manager.KpiId" + * </pre> + * * <code>.monitoring.KpiId kpi_id = 1;</code> */ public Builder setKpiId(monitoring.Monitoring.KpiId value) { @@ -636,66 +639,90 @@ public final class Device { throw new NullPointerException(); } kpiId_ = value; - onChanged(); } else { kpiIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } /** + * <pre> + * to be migrated to: "kpi_manager.KpiId" + * </pre> + * * <code>.monitoring.KpiId kpi_id = 1;</code> */ public Builder setKpiId(monitoring.Monitoring.KpiId.Builder builderForValue) { if (kpiIdBuilder_ == null) { kpiId_ = builderForValue.build(); - onChanged(); } else { kpiIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } /** + * <pre> + * to be migrated to: "kpi_manager.KpiId" + * </pre> + * * <code>.monitoring.KpiId kpi_id = 1;</code> */ public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { if (kpiIdBuilder_ == null) { - if (kpiId_ != null) { - kpiId_ = monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && kpiId_ != null && kpiId_ != monitoring.Monitoring.KpiId.getDefaultInstance()) { + getKpiIdBuilder().mergeFrom(value); } else { kpiId_ = value; } - onChanged(); } else { kpiIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } /** + * <pre> + * to be migrated to: "kpi_manager.KpiId" + * </pre> + * * <code>.monitoring.KpiId kpi_id = 1;</code> */ public Builder clearKpiId() { - if (kpiIdBuilder_ == null) { - kpiId_ = null; - onChanged(); - } else { - kpiId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + kpiId_ = null; + if (kpiIdBuilder_ != null) { + kpiIdBuilder_.dispose(); kpiIdBuilder_ = null; } + onChanged(); return this; } /** + * <pre> + * to be migrated to: "kpi_manager.KpiId" + * </pre> + * * <code>.monitoring.KpiId kpi_id = 1;</code> */ public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getKpiIdFieldBuilder().getBuilder(); } /** + * <pre> + * to be migrated to: "kpi_manager.KpiId" + * </pre> + * * <code>.monitoring.KpiId kpi_id = 1;</code> */ public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { @@ -707,6 +734,10 @@ public final class Device { } /** + * <pre> + * to be migrated to: "kpi_manager.KpiId" + * </pre> + * * <code>.monitoring.KpiId kpi_id = 1;</code> */ private com.google.protobuf.SingleFieldBuilderV3<monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> getKpiIdFieldBuilder() { @@ -722,14 +753,22 @@ public final class Device { private com.google.protobuf.SingleFieldBuilderV3<monitoring.Monitoring.KpiDescriptor, monitoring.Monitoring.KpiDescriptor.Builder, monitoring.Monitoring.KpiDescriptorOrBuilder> kpiDescriptorBuilder_; /** + * <pre> + * to be migrated to: "kpi_manager.KpiDescriptor" + * </pre> + * * <code>.monitoring.KpiDescriptor kpi_descriptor = 2;</code> * @return Whether the kpiDescriptor field is set. */ public boolean hasKpiDescriptor() { - return kpiDescriptorBuilder_ != null || kpiDescriptor_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** + * <pre> + * to be migrated to: "kpi_manager.KpiDescriptor" + * </pre> + * * <code>.monitoring.KpiDescriptor kpi_descriptor = 2;</code> * @return The kpiDescriptor. */ @@ -742,6 +781,10 @@ public final class Device { } /** + * <pre> + * to be migrated to: "kpi_manager.KpiDescriptor" + * </pre> + * * <code>.monitoring.KpiDescriptor kpi_descriptor = 2;</code> */ public Builder setKpiDescriptor(monitoring.Monitoring.KpiDescriptor value) { @@ -750,66 +793,90 @@ public final class Device { throw new NullPointerException(); } kpiDescriptor_ = value; - onChanged(); } else { kpiDescriptorBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } /** + * <pre> + * to be migrated to: "kpi_manager.KpiDescriptor" + * </pre> + * * <code>.monitoring.KpiDescriptor kpi_descriptor = 2;</code> */ public Builder setKpiDescriptor(monitoring.Monitoring.KpiDescriptor.Builder builderForValue) { if (kpiDescriptorBuilder_ == null) { kpiDescriptor_ = builderForValue.build(); - onChanged(); } else { kpiDescriptorBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); return this; } /** + * <pre> + * to be migrated to: "kpi_manager.KpiDescriptor" + * </pre> + * * <code>.monitoring.KpiDescriptor kpi_descriptor = 2;</code> */ public Builder mergeKpiDescriptor(monitoring.Monitoring.KpiDescriptor value) { if (kpiDescriptorBuilder_ == null) { - if (kpiDescriptor_ != null) { - kpiDescriptor_ = monitoring.Monitoring.KpiDescriptor.newBuilder(kpiDescriptor_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000002) != 0) && kpiDescriptor_ != null && kpiDescriptor_ != monitoring.Monitoring.KpiDescriptor.getDefaultInstance()) { + getKpiDescriptorBuilder().mergeFrom(value); } else { kpiDescriptor_ = value; } - onChanged(); } else { kpiDescriptorBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } /** + * <pre> + * to be migrated to: "kpi_manager.KpiDescriptor" + * </pre> + * * <code>.monitoring.KpiDescriptor kpi_descriptor = 2;</code> */ public Builder clearKpiDescriptor() { - if (kpiDescriptorBuilder_ == null) { - kpiDescriptor_ = null; - onChanged(); - } else { - kpiDescriptor_ = null; + bitField0_ = (bitField0_ & ~0x00000002); + kpiDescriptor_ = null; + if (kpiDescriptorBuilder_ != null) { + kpiDescriptorBuilder_.dispose(); kpiDescriptorBuilder_ = null; } + onChanged(); return this; } /** + * <pre> + * to be migrated to: "kpi_manager.KpiDescriptor" + * </pre> + * * <code>.monitoring.KpiDescriptor kpi_descriptor = 2;</code> */ public monitoring.Monitoring.KpiDescriptor.Builder getKpiDescriptorBuilder() { + bitField0_ |= 0x00000002; onChanged(); return getKpiDescriptorFieldBuilder().getBuilder(); } /** + * <pre> + * to be migrated to: "kpi_manager.KpiDescriptor" + * </pre> + * * <code>.monitoring.KpiDescriptor kpi_descriptor = 2;</code> */ public monitoring.Monitoring.KpiDescriptorOrBuilder getKpiDescriptorOrBuilder() { @@ -821,6 +888,10 @@ public final class Device { } /** + * <pre> + * to be migrated to: "kpi_manager.KpiDescriptor" + * </pre> + * * <code>.monitoring.KpiDescriptor kpi_descriptor = 2;</code> */ private com.google.protobuf.SingleFieldBuilderV3<monitoring.Monitoring.KpiDescriptor, monitoring.Monitoring.KpiDescriptor.Builder, monitoring.Monitoring.KpiDescriptorOrBuilder> getKpiDescriptorFieldBuilder() { @@ -849,6 +920,7 @@ public final class Device { */ public Builder setSamplingDurationS(float value) { samplingDurationS_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -858,6 +930,7 @@ public final class Device { * @return This builder for chaining. */ public Builder clearSamplingDurationS() { + bitField0_ = (bitField0_ & ~0x00000004); samplingDurationS_ = 0F; onChanged(); return this; @@ -881,6 +954,7 @@ public final class Device { */ public Builder setSamplingIntervalS(float value) { samplingIntervalS_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -890,6 +964,7 @@ public final class Device { * @return This builder for chaining. */ public Builder clearSamplingIntervalS() { + bitField0_ = (bitField0_ & ~0x00000008); samplingIntervalS_ = 0F; onChanged(); return this; @@ -922,7 +997,17 @@ public final class Device { @java.lang.Override public MonitoringSettings parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MonitoringSettings(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/src/policy/target/generated-sources/grpc/device/DeviceServiceGrpc.java b/src/policy/target/generated-sources/grpc/device/DeviceServiceGrpc.java index a6886d8d620182790146164fbfef36762cf4368b..7e0cf9a8bb4cc207f65ce27177f7307567a19f04 100644 --- a/src/policy/target/generated-sources/grpc/device/DeviceServiceGrpc.java +++ b/src/policy/target/generated-sources/grpc/device/DeviceServiceGrpc.java @@ -4,7 +4,8 @@ import static io.grpc.MethodDescriptor.generateFullMethodName; /** */ -@io.quarkus.grpc.common.Generated(value = "by gRPC proto compiler (version 1.38.1)", comments = "Source: device.proto") +@io.quarkus.grpc.common.Generated(value = "by gRPC proto compiler (version 1.55.1)", comments = "Source: device.proto") +@io.grpc.stub.annotations.GrpcGenerated public final class DeviceServiceGrpc { private DeviceServiceGrpc() { @@ -132,45 +133,52 @@ public final class DeviceServiceGrpc { /** */ - public static abstract class DeviceServiceImplBase implements io.grpc.BindableService { + public interface AsyncService { /** */ - public void addDevice(context.ContextOuterClass.Device request, io.grpc.stub.StreamObserver<context.ContextOuterClass.DeviceId> responseObserver) { + default void addDevice(context.ContextOuterClass.Device request, io.grpc.stub.StreamObserver<context.ContextOuterClass.DeviceId> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAddDeviceMethod(), responseObserver); } /** */ - public void configureDevice(context.ContextOuterClass.Device request, io.grpc.stub.StreamObserver<context.ContextOuterClass.DeviceId> responseObserver) { + default void configureDevice(context.ContextOuterClass.Device request, io.grpc.stub.StreamObserver<context.ContextOuterClass.DeviceId> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getConfigureDeviceMethod(), responseObserver); } /** */ - public void deleteDevice(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { + default void deleteDevice(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteDeviceMethod(), responseObserver); } /** */ - public void getInitialConfig(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.DeviceConfig> responseObserver) { + default void getInitialConfig(context.ContextOuterClass.DeviceId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.DeviceConfig> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetInitialConfigMethod(), responseObserver); } /** */ - public void monitorDeviceKpi(device.Device.MonitoringSettings request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { + default void monitorDeviceKpi(device.Device.MonitoringSettings request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getMonitorDeviceKpiMethod(), responseObserver); } + } + + /** + * Base class for the server implementation of the service DeviceService. + */ + public static abstract class DeviceServiceImplBase implements io.grpc.BindableService, AsyncService { @java.lang.Override public io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(getAddDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Device, context.ContextOuterClass.DeviceId>(this, METHODID_ADD_DEVICE))).addMethod(getConfigureDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Device, context.ContextOuterClass.DeviceId>(this, METHODID_CONFIGURE_DEVICE))).addMethod(getDeleteDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.DeviceId, context.ContextOuterClass.Empty>(this, METHODID_DELETE_DEVICE))).addMethod(getGetInitialConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceConfig>(this, METHODID_GET_INITIAL_CONFIG))).addMethod(getMonitorDeviceKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<device.Device.MonitoringSettings, context.ContextOuterClass.Empty>(this, METHODID_MONITOR_DEVICE_KPI))).build(); + return DeviceServiceGrpc.bindService(this); } } /** + * A stub to allow clients to do asynchronous rpc calls to service DeviceService. */ public static class DeviceServiceStub extends io.grpc.stub.AbstractAsyncStub<DeviceServiceStub> { @@ -215,6 +223,7 @@ public final class DeviceServiceGrpc { } /** + * A stub to allow clients to do synchronous rpc calls to service DeviceService. */ public static class DeviceServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub<DeviceServiceBlockingStub> { @@ -259,6 +268,7 @@ public final class DeviceServiceGrpc { } /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service DeviceService. */ public static class DeviceServiceFutureStub extends io.grpc.stub.AbstractFutureStub<DeviceServiceFutureStub> { @@ -314,11 +324,11 @@ public final class DeviceServiceGrpc { private static final class MethodHandlers<Req, Resp> implements io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>, io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>, io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>, io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> { - private final DeviceServiceImplBase serviceImpl; + private final AsyncService serviceImpl; private final int methodId; - MethodHandlers(DeviceServiceImplBase serviceImpl, int methodId) { + MethodHandlers(AsyncService serviceImpl, int methodId) { this.serviceImpl = serviceImpl; this.methodId = methodId; } @@ -357,6 +367,10 @@ public final class DeviceServiceGrpc { } } + public static io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(getAddDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Device, context.ContextOuterClass.DeviceId>(service, METHODID_ADD_DEVICE))).addMethod(getConfigureDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Device, context.ContextOuterClass.DeviceId>(service, METHODID_CONFIGURE_DEVICE))).addMethod(getDeleteDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.DeviceId, context.ContextOuterClass.Empty>(service, METHODID_DELETE_DEVICE))).addMethod(getGetInitialConfigMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceConfig>(service, METHODID_GET_INITIAL_CONFIG))).addMethod(getMonitorDeviceKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<device.Device.MonitoringSettings, context.ContextOuterClass.Empty>(service, METHODID_MONITOR_DEVICE_KPI))).build(); + } + private static abstract class DeviceServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { DeviceServiceBaseDescriptorSupplier() { diff --git a/src/policy/target/generated-sources/grpc/monitoring/Monitoring.java b/src/policy/target/generated-sources/grpc/monitoring/Monitoring.java index 4c80f4a06fe9c1d408fe41a05056c76612a9c61e..2f98ce3eb35a8ba9fda3a6d6bf4c17079c720bbe 100644 --- a/src/policy/target/generated-sources/grpc/monitoring/Monitoring.java +++ b/src/policy/target/generated-sources/grpc/monitoring/Monitoring.java @@ -211,160 +211,6 @@ public final class Monitoring { return new KpiDescriptor(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private KpiDescriptor(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - monitoring.Monitoring.KpiId.Builder subBuilder = null; - if (kpiId_ != null) { - subBuilder = kpiId_.toBuilder(); - } - kpiId_ = input.readMessage(monitoring.Monitoring.KpiId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(kpiId_); - kpiId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - kpiDescription_ = s; - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - kpiIdList_ = new java.util.ArrayList<monitoring.Monitoring.KpiId>(); - mutable_bitField0_ |= 0x00000001; - } - kpiIdList_.add(input.readMessage(monitoring.Monitoring.KpiId.parser(), extensionRegistry)); - break; - } - case 32: - { - int rawValue = input.readEnum(); - kpiSampleType_ = rawValue; - break; - } - case 42: - { - context.ContextOuterClass.DeviceId.Builder subBuilder = null; - if (deviceId_ != null) { - subBuilder = deviceId_.toBuilder(); - } - deviceId_ = input.readMessage(context.ContextOuterClass.DeviceId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deviceId_); - deviceId_ = subBuilder.buildPartial(); - } - break; - } - case 50: - { - context.ContextOuterClass.EndPointId.Builder subBuilder = null; - if (endpointId_ != null) { - subBuilder = endpointId_.toBuilder(); - } - endpointId_ = input.readMessage(context.ContextOuterClass.EndPointId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endpointId_); - endpointId_ = subBuilder.buildPartial(); - } - break; - } - case 58: - { - context.ContextOuterClass.ServiceId.Builder subBuilder = null; - if (serviceId_ != null) { - subBuilder = serviceId_.toBuilder(); - } - serviceId_ = input.readMessage(context.ContextOuterClass.ServiceId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(serviceId_); - serviceId_ = subBuilder.buildPartial(); - } - break; - } - case 66: - { - context.ContextOuterClass.SliceId.Builder subBuilder = null; - if (sliceId_ != null) { - subBuilder = sliceId_.toBuilder(); - } - sliceId_ = input.readMessage(context.ContextOuterClass.SliceId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sliceId_); - sliceId_ = subBuilder.buildPartial(); - } - break; - } - case 74: - { - context.ContextOuterClass.ConnectionId.Builder subBuilder = null; - if (connectionId_ != null) { - subBuilder = connectionId_.toBuilder(); - } - connectionId_ = input.readMessage(context.ContextOuterClass.ConnectionId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(connectionId_); - connectionId_ = subBuilder.buildPartial(); - } - break; - } - case 82: - { - context.ContextOuterClass.LinkId.Builder subBuilder = null; - if (linkId_ != null) { - subBuilder = linkId_.toBuilder(); - } - linkId_ = input.readMessage(context.ContextOuterClass.LinkId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(linkId_); - linkId_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - kpiIdList_ = java.util.Collections.unmodifiableList(kpiIdList_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return monitoring.Monitoring.internal_static_monitoring_KpiDescriptor_descriptor; } @@ -401,12 +247,13 @@ public final class Monitoring { */ @java.lang.Override public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - return getKpiId(); + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; } public static final int KPI_DESCRIPTION_FIELD_NUMBER = 2; - private volatile java.lang.Object kpiDescription_; + @SuppressWarnings("serial") + private volatile java.lang.Object kpiDescription_ = ""; /** * <code>string kpi_description = 2;</code> @@ -443,6 +290,7 @@ public final class Monitoring { public static final int KPI_ID_LIST_FIELD_NUMBER = 3; + @SuppressWarnings("serial") private java.util.List<monitoring.Monitoring.KpiId> kpiIdList_; /** @@ -487,7 +335,7 @@ public final class Monitoring { public static final int KPI_SAMPLE_TYPE_FIELD_NUMBER = 4; - private int kpiSampleType_; + private int kpiSampleType_ = 0; /** * <code>.kpi_sample_types.KpiSampleType kpi_sample_type = 4;</code> @@ -504,8 +352,7 @@ public final class Monitoring { */ @java.lang.Override public kpi_sample_types.KpiSampleTypes.KpiSampleType getKpiSampleType() { - @SuppressWarnings("deprecation") - kpi_sample_types.KpiSampleTypes.KpiSampleType result = kpi_sample_types.KpiSampleTypes.KpiSampleType.valueOf(kpiSampleType_); + kpi_sample_types.KpiSampleTypes.KpiSampleType result = kpi_sample_types.KpiSampleTypes.KpiSampleType.forNumber(kpiSampleType_); return result == null ? kpi_sample_types.KpiSampleTypes.KpiSampleType.UNRECOGNIZED : result; } @@ -536,7 +383,7 @@ public final class Monitoring { */ @java.lang.Override public context.ContextOuterClass.DeviceIdOrBuilder getDeviceIdOrBuilder() { - return getDeviceId(); + return deviceId_ == null ? context.ContextOuterClass.DeviceId.getDefaultInstance() : deviceId_; } public static final int ENDPOINT_ID_FIELD_NUMBER = 6; @@ -566,7 +413,7 @@ public final class Monitoring { */ @java.lang.Override public context.ContextOuterClass.EndPointIdOrBuilder getEndpointIdOrBuilder() { - return getEndpointId(); + return endpointId_ == null ? context.ContextOuterClass.EndPointId.getDefaultInstance() : endpointId_; } public static final int SERVICE_ID_FIELD_NUMBER = 7; @@ -596,7 +443,7 @@ public final class Monitoring { */ @java.lang.Override public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { - return getServiceId(); + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; } public static final int SLICE_ID_FIELD_NUMBER = 8; @@ -626,7 +473,7 @@ public final class Monitoring { */ @java.lang.Override public context.ContextOuterClass.SliceIdOrBuilder getSliceIdOrBuilder() { - return getSliceId(); + return sliceId_ == null ? context.ContextOuterClass.SliceId.getDefaultInstance() : sliceId_; } public static final int CONNECTION_ID_FIELD_NUMBER = 9; @@ -656,7 +503,7 @@ public final class Monitoring { */ @java.lang.Override public context.ContextOuterClass.ConnectionIdOrBuilder getConnectionIdOrBuilder() { - return getConnectionId(); + return connectionId_ == null ? context.ContextOuterClass.ConnectionId.getDefaultInstance() : connectionId_; } public static final int LINK_ID_FIELD_NUMBER = 10; @@ -686,7 +533,7 @@ public final class Monitoring { */ @java.lang.Override public context.ContextOuterClass.LinkIdOrBuilder getLinkIdOrBuilder() { - return getLinkId(); + return linkId_ == null ? context.ContextOuterClass.LinkId.getDefaultInstance() : linkId_; } private byte memoizedIsInitialized = -1; @@ -707,7 +554,7 @@ public final class Monitoring { if (kpiId_ != null) { output.writeMessage(1, getKpiId()); } - if (!getKpiDescriptionBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kpiDescription_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, kpiDescription_); } for (int i = 0; i < kpiIdList_.size(); i++) { @@ -734,7 +581,7 @@ public final class Monitoring { if (linkId_ != null) { output.writeMessage(10, getLinkId()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -746,7 +593,7 @@ public final class Monitoring { if (kpiId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getKpiId()); } - if (!getKpiDescriptionBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kpiDescription_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, kpiDescription_); } for (int i = 0; i < kpiIdList_.size(); i++) { @@ -773,7 +620,7 @@ public final class Monitoring { if (linkId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getLinkId()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -835,7 +682,7 @@ public final class Monitoring { if (!getLinkId().equals(other.getLinkId())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -883,7 +730,7 @@ public final class Monitoring { hash = (37 * hash) + LINK_ID_FIELD_NUMBER; hash = (53 * hash) + getLinkId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -977,71 +824,58 @@ public final class Monitoring { // Construct using monitoring.Monitoring.KpiDescriptor.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getKpiIdListFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); - if (kpiIdBuilder_ == null) { - kpiId_ = null; - } else { - kpiId_ = null; + bitField0_ = 0; + kpiId_ = null; + if (kpiIdBuilder_ != null) { + kpiIdBuilder_.dispose(); kpiIdBuilder_ = null; } kpiDescription_ = ""; if (kpiIdListBuilder_ == null) { kpiIdList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + kpiIdList_ = null; kpiIdListBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); kpiSampleType_ = 0; - if (deviceIdBuilder_ == null) { - deviceId_ = null; - } else { - deviceId_ = null; + deviceId_ = null; + if (deviceIdBuilder_ != null) { + deviceIdBuilder_.dispose(); deviceIdBuilder_ = null; } - if (endpointIdBuilder_ == null) { - endpointId_ = null; - } else { - endpointId_ = null; + endpointId_ = null; + if (endpointIdBuilder_ != null) { + endpointIdBuilder_.dispose(); endpointIdBuilder_ = null; } - if (serviceIdBuilder_ == null) { - serviceId_ = null; - } else { - serviceId_ = null; + serviceId_ = null; + if (serviceIdBuilder_ != null) { + serviceIdBuilder_.dispose(); serviceIdBuilder_ = null; } - if (sliceIdBuilder_ == null) { - sliceId_ = null; - } else { - sliceId_ = null; + sliceId_ = null; + if (sliceIdBuilder_ != null) { + sliceIdBuilder_.dispose(); sliceIdBuilder_ = null; } - if (connectionIdBuilder_ == null) { - connectionId_ = null; - } else { - connectionId_ = null; + connectionId_ = null; + if (connectionIdBuilder_ != null) { + connectionIdBuilder_.dispose(); connectionIdBuilder_ = null; } - if (linkIdBuilder_ == null) { - linkId_ = null; - } else { - linkId_ = null; + linkId_ = null; + if (linkIdBuilder_ != null) { + linkIdBuilder_.dispose(); linkIdBuilder_ = null; } return this; @@ -1069,85 +903,55 @@ public final class Monitoring { @java.lang.Override public monitoring.Monitoring.KpiDescriptor buildPartial() { monitoring.Monitoring.KpiDescriptor result = new monitoring.Monitoring.KpiDescriptor(this); - int from_bitField0_ = bitField0_; - if (kpiIdBuilder_ == null) { - result.kpiId_ = kpiId_; - } else { - result.kpiId_ = kpiIdBuilder_.build(); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); } - result.kpiDescription_ = kpiDescription_; + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(monitoring.Monitoring.KpiDescriptor result) { if (kpiIdListBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { kpiIdList_ = java.util.Collections.unmodifiableList(kpiIdList_); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); } result.kpiIdList_ = kpiIdList_; } else { result.kpiIdList_ = kpiIdListBuilder_.build(); } - result.kpiSampleType_ = kpiSampleType_; - if (deviceIdBuilder_ == null) { - result.deviceId_ = deviceId_; - } else { - result.deviceId_ = deviceIdBuilder_.build(); + } + + private void buildPartial0(monitoring.Monitoring.KpiDescriptor result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.kpiId_ = kpiIdBuilder_ == null ? kpiId_ : kpiIdBuilder_.build(); } - if (endpointIdBuilder_ == null) { - result.endpointId_ = endpointId_; - } else { - result.endpointId_ = endpointIdBuilder_.build(); + if (((from_bitField0_ & 0x00000002) != 0)) { + result.kpiDescription_ = kpiDescription_; } - if (serviceIdBuilder_ == null) { - result.serviceId_ = serviceId_; - } else { - result.serviceId_ = serviceIdBuilder_.build(); + if (((from_bitField0_ & 0x00000008) != 0)) { + result.kpiSampleType_ = kpiSampleType_; } - if (sliceIdBuilder_ == null) { - result.sliceId_ = sliceId_; - } else { - result.sliceId_ = sliceIdBuilder_.build(); + if (((from_bitField0_ & 0x00000010) != 0)) { + result.deviceId_ = deviceIdBuilder_ == null ? deviceId_ : deviceIdBuilder_.build(); } - if (connectionIdBuilder_ == null) { - result.connectionId_ = connectionId_; - } else { - result.connectionId_ = connectionIdBuilder_.build(); + if (((from_bitField0_ & 0x00000020) != 0)) { + result.endpointId_ = endpointIdBuilder_ == null ? endpointId_ : endpointIdBuilder_.build(); } - if (linkIdBuilder_ == null) { - result.linkId_ = linkId_; - } else { - result.linkId_ = linkIdBuilder_.build(); + if (((from_bitField0_ & 0x00000040) != 0)) { + result.serviceId_ = serviceIdBuilder_ == null ? serviceId_ : serviceIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.sliceId_ = sliceIdBuilder_ == null ? sliceId_ : sliceIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.connectionId_ = connectionIdBuilder_ == null ? connectionId_ : connectionIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.linkId_ = linkIdBuilder_ == null ? linkId_ : linkIdBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); } @java.lang.Override @@ -1168,13 +972,14 @@ public final class Monitoring { } if (!other.getKpiDescription().isEmpty()) { kpiDescription_ = other.kpiDescription_; + bitField0_ |= 0x00000002; onChanged(); } if (kpiIdListBuilder_ == null) { if (!other.kpiIdList_.isEmpty()) { if (kpiIdList_.isEmpty()) { kpiIdList_ = other.kpiIdList_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); } else { ensureKpiIdListIsMutable(); kpiIdList_.addAll(other.kpiIdList_); @@ -1187,7 +992,7 @@ public final class Monitoring { kpiIdListBuilder_.dispose(); kpiIdListBuilder_ = null; kpiIdList_ = other.kpiIdList_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); kpiIdListBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getKpiIdListFieldBuilder() : null; } else { kpiIdListBuilder_.addAllMessages(other.kpiIdList_); @@ -1215,7 +1020,7 @@ public final class Monitoring { if (other.hasLinkId()) { mergeLinkId(other.getLinkId()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1227,17 +1032,110 @@ public final class Monitoring { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - monitoring.Monitoring.KpiDescriptor parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getKpiIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + kpiDescription_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 26: + { + monitoring.Monitoring.KpiId m = input.readMessage(monitoring.Monitoring.KpiId.parser(), extensionRegistry); + if (kpiIdListBuilder_ == null) { + ensureKpiIdListIsMutable(); + kpiIdList_.add(m); + } else { + kpiIdListBuilder_.addMessage(m); + } + break; + } + // case 26 + case 32: + { + kpiSampleType_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } + // case 32 + case 42: + { + input.readMessage(getDeviceIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } + // case 42 + case 50: + { + input.readMessage(getEndpointIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } + // case 50 + case 58: + { + input.readMessage(getServiceIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } + // case 58 + case 66: + { + input.readMessage(getSliceIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } + // case 66 + case 74: + { + input.readMessage(getConnectionIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } + // case 74 + case 82: + { + input.readMessage(getLinkIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } + // case 82 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.KpiDescriptor) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -1252,7 +1150,7 @@ public final class Monitoring { * @return Whether the kpiId field is set. */ public boolean hasKpiId() { - return kpiIdBuilder_ != null || kpiId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -1276,10 +1174,11 @@ public final class Monitoring { throw new NullPointerException(); } kpiId_ = value; - onChanged(); } else { kpiIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -1289,10 +1188,11 @@ public final class Monitoring { public Builder setKpiId(monitoring.Monitoring.KpiId.Builder builderForValue) { if (kpiIdBuilder_ == null) { kpiId_ = builderForValue.build(); - onChanged(); } else { kpiIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -1301,15 +1201,16 @@ public final class Monitoring { */ public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { if (kpiIdBuilder_ == null) { - if (kpiId_ != null) { - kpiId_ = monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && kpiId_ != null && kpiId_ != monitoring.Monitoring.KpiId.getDefaultInstance()) { + getKpiIdBuilder().mergeFrom(value); } else { kpiId_ = value; } - onChanged(); } else { kpiIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -1317,13 +1218,13 @@ public final class Monitoring { * <code>.monitoring.KpiId kpi_id = 1;</code> */ public Builder clearKpiId() { - if (kpiIdBuilder_ == null) { - kpiId_ = null; - onChanged(); - } else { - kpiId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + kpiId_ = null; + if (kpiIdBuilder_ != null) { + kpiIdBuilder_.dispose(); kpiIdBuilder_ = null; } + onChanged(); return this; } @@ -1331,6 +1232,7 @@ public final class Monitoring { * <code>.monitoring.KpiId kpi_id = 1;</code> */ public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getKpiIdFieldBuilder().getBuilder(); } @@ -1400,6 +1302,7 @@ public final class Monitoring { throw new NullPointerException(); } kpiDescription_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -1410,6 +1313,7 @@ public final class Monitoring { */ public Builder clearKpiDescription() { kpiDescription_ = getDefaultInstance().getKpiDescription(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -1425,6 +1329,7 @@ public final class Monitoring { } checkByteStringIsUtf8(value); kpiDescription_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -1432,9 +1337,9 @@ public final class Monitoring { private java.util.List<monitoring.Monitoring.KpiId> kpiIdList_ = java.util.Collections.emptyList(); private void ensureKpiIdListIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!((bitField0_ & 0x00000004) != 0)) { kpiIdList_ = new java.util.ArrayList<monitoring.Monitoring.KpiId>(kpiIdList_); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000004; } } @@ -1586,7 +1491,7 @@ public final class Monitoring { public Builder clearKpiIdList() { if (kpiIdListBuilder_ == null) { kpiIdList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { kpiIdListBuilder_.clear(); @@ -1660,7 +1565,7 @@ public final class Monitoring { private com.google.protobuf.RepeatedFieldBuilderV3<monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> getKpiIdListFieldBuilder() { if (kpiIdListBuilder_ == null) { - kpiIdListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder>(kpiIdList_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + kpiIdListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder>(kpiIdList_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); kpiIdList_ = null; } return kpiIdListBuilder_; @@ -1684,6 +1589,7 @@ public final class Monitoring { */ public Builder setKpiSampleTypeValue(int value) { kpiSampleType_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1694,8 +1600,7 @@ public final class Monitoring { */ @java.lang.Override public kpi_sample_types.KpiSampleTypes.KpiSampleType getKpiSampleType() { - @SuppressWarnings("deprecation") - kpi_sample_types.KpiSampleTypes.KpiSampleType result = kpi_sample_types.KpiSampleTypes.KpiSampleType.valueOf(kpiSampleType_); + kpi_sample_types.KpiSampleTypes.KpiSampleType result = kpi_sample_types.KpiSampleTypes.KpiSampleType.forNumber(kpiSampleType_); return result == null ? kpi_sample_types.KpiSampleTypes.KpiSampleType.UNRECOGNIZED : result; } @@ -1708,6 +1613,7 @@ public final class Monitoring { if (value == null) { throw new NullPointerException(); } + bitField0_ |= 0x00000008; kpiSampleType_ = value.getNumber(); onChanged(); return this; @@ -1718,6 +1624,7 @@ public final class Monitoring { * @return This builder for chaining. */ public Builder clearKpiSampleType() { + bitField0_ = (bitField0_ & ~0x00000008); kpiSampleType_ = 0; onChanged(); return this; @@ -1732,7 +1639,7 @@ public final class Monitoring { * @return Whether the deviceId field is set. */ public boolean hasDeviceId() { - return deviceIdBuilder_ != null || deviceId_ != null; + return ((bitField0_ & 0x00000010) != 0); } /** @@ -1756,10 +1663,11 @@ public final class Monitoring { throw new NullPointerException(); } deviceId_ = value; - onChanged(); } else { deviceIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000010; + onChanged(); return this; } @@ -1769,10 +1677,11 @@ public final class Monitoring { public Builder setDeviceId(context.ContextOuterClass.DeviceId.Builder builderForValue) { if (deviceIdBuilder_ == null) { deviceId_ = builderForValue.build(); - onChanged(); } else { deviceIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000010; + onChanged(); return this; } @@ -1781,15 +1690,16 @@ public final class Monitoring { */ public Builder mergeDeviceId(context.ContextOuterClass.DeviceId value) { if (deviceIdBuilder_ == null) { - if (deviceId_ != null) { - deviceId_ = context.ContextOuterClass.DeviceId.newBuilder(deviceId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000010) != 0) && deviceId_ != null && deviceId_ != context.ContextOuterClass.DeviceId.getDefaultInstance()) { + getDeviceIdBuilder().mergeFrom(value); } else { deviceId_ = value; } - onChanged(); } else { deviceIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000010; + onChanged(); return this; } @@ -1797,13 +1707,13 @@ public final class Monitoring { * <code>.context.DeviceId device_id = 5;</code> */ public Builder clearDeviceId() { - if (deviceIdBuilder_ == null) { - deviceId_ = null; - onChanged(); - } else { - deviceId_ = null; + bitField0_ = (bitField0_ & ~0x00000010); + deviceId_ = null; + if (deviceIdBuilder_ != null) { + deviceIdBuilder_.dispose(); deviceIdBuilder_ = null; } + onChanged(); return this; } @@ -1811,6 +1721,7 @@ public final class Monitoring { * <code>.context.DeviceId device_id = 5;</code> */ public context.ContextOuterClass.DeviceId.Builder getDeviceIdBuilder() { + bitField0_ |= 0x00000010; onChanged(); return getDeviceIdFieldBuilder().getBuilder(); } @@ -1846,7 +1757,7 @@ public final class Monitoring { * @return Whether the endpointId field is set. */ public boolean hasEndpointId() { - return endpointIdBuilder_ != null || endpointId_ != null; + return ((bitField0_ & 0x00000020) != 0); } /** @@ -1870,10 +1781,11 @@ public final class Monitoring { throw new NullPointerException(); } endpointId_ = value; - onChanged(); } else { endpointIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000020; + onChanged(); return this; } @@ -1883,10 +1795,11 @@ public final class Monitoring { public Builder setEndpointId(context.ContextOuterClass.EndPointId.Builder builderForValue) { if (endpointIdBuilder_ == null) { endpointId_ = builderForValue.build(); - onChanged(); } else { endpointIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000020; + onChanged(); return this; } @@ -1895,15 +1808,16 @@ public final class Monitoring { */ public Builder mergeEndpointId(context.ContextOuterClass.EndPointId value) { if (endpointIdBuilder_ == null) { - if (endpointId_ != null) { - endpointId_ = context.ContextOuterClass.EndPointId.newBuilder(endpointId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000020) != 0) && endpointId_ != null && endpointId_ != context.ContextOuterClass.EndPointId.getDefaultInstance()) { + getEndpointIdBuilder().mergeFrom(value); } else { endpointId_ = value; } - onChanged(); } else { endpointIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000020; + onChanged(); return this; } @@ -1911,13 +1825,13 @@ public final class Monitoring { * <code>.context.EndPointId endpoint_id = 6;</code> */ public Builder clearEndpointId() { - if (endpointIdBuilder_ == null) { - endpointId_ = null; - onChanged(); - } else { - endpointId_ = null; + bitField0_ = (bitField0_ & ~0x00000020); + endpointId_ = null; + if (endpointIdBuilder_ != null) { + endpointIdBuilder_.dispose(); endpointIdBuilder_ = null; } + onChanged(); return this; } @@ -1925,6 +1839,7 @@ public final class Monitoring { * <code>.context.EndPointId endpoint_id = 6;</code> */ public context.ContextOuterClass.EndPointId.Builder getEndpointIdBuilder() { + bitField0_ |= 0x00000020; onChanged(); return getEndpointIdFieldBuilder().getBuilder(); } @@ -1960,7 +1875,7 @@ public final class Monitoring { * @return Whether the serviceId field is set. */ public boolean hasServiceId() { - return serviceIdBuilder_ != null || serviceId_ != null; + return ((bitField0_ & 0x00000040) != 0); } /** @@ -1984,10 +1899,11 @@ public final class Monitoring { throw new NullPointerException(); } serviceId_ = value; - onChanged(); } else { serviceIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000040; + onChanged(); return this; } @@ -1997,10 +1913,11 @@ public final class Monitoring { public Builder setServiceId(context.ContextOuterClass.ServiceId.Builder builderForValue) { if (serviceIdBuilder_ == null) { serviceId_ = builderForValue.build(); - onChanged(); } else { serviceIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000040; + onChanged(); return this; } @@ -2009,15 +1926,16 @@ public final class Monitoring { */ public Builder mergeServiceId(context.ContextOuterClass.ServiceId value) { if (serviceIdBuilder_ == null) { - if (serviceId_ != null) { - serviceId_ = context.ContextOuterClass.ServiceId.newBuilder(serviceId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000040) != 0) && serviceId_ != null && serviceId_ != context.ContextOuterClass.ServiceId.getDefaultInstance()) { + getServiceIdBuilder().mergeFrom(value); } else { serviceId_ = value; } - onChanged(); } else { serviceIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000040; + onChanged(); return this; } @@ -2025,13 +1943,13 @@ public final class Monitoring { * <code>.context.ServiceId service_id = 7;</code> */ public Builder clearServiceId() { - if (serviceIdBuilder_ == null) { - serviceId_ = null; - onChanged(); - } else { - serviceId_ = null; + bitField0_ = (bitField0_ & ~0x00000040); + serviceId_ = null; + if (serviceIdBuilder_ != null) { + serviceIdBuilder_.dispose(); serviceIdBuilder_ = null; } + onChanged(); return this; } @@ -2039,6 +1957,7 @@ public final class Monitoring { * <code>.context.ServiceId service_id = 7;</code> */ public context.ContextOuterClass.ServiceId.Builder getServiceIdBuilder() { + bitField0_ |= 0x00000040; onChanged(); return getServiceIdFieldBuilder().getBuilder(); } @@ -2074,7 +1993,7 @@ public final class Monitoring { * @return Whether the sliceId field is set. */ public boolean hasSliceId() { - return sliceIdBuilder_ != null || sliceId_ != null; + return ((bitField0_ & 0x00000080) != 0); } /** @@ -2098,10 +2017,11 @@ public final class Monitoring { throw new NullPointerException(); } sliceId_ = value; - onChanged(); } else { sliceIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000080; + onChanged(); return this; } @@ -2111,10 +2031,11 @@ public final class Monitoring { public Builder setSliceId(context.ContextOuterClass.SliceId.Builder builderForValue) { if (sliceIdBuilder_ == null) { sliceId_ = builderForValue.build(); - onChanged(); } else { sliceIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000080; + onChanged(); return this; } @@ -2123,15 +2044,16 @@ public final class Monitoring { */ public Builder mergeSliceId(context.ContextOuterClass.SliceId value) { if (sliceIdBuilder_ == null) { - if (sliceId_ != null) { - sliceId_ = context.ContextOuterClass.SliceId.newBuilder(sliceId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000080) != 0) && sliceId_ != null && sliceId_ != context.ContextOuterClass.SliceId.getDefaultInstance()) { + getSliceIdBuilder().mergeFrom(value); } else { sliceId_ = value; } - onChanged(); } else { sliceIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000080; + onChanged(); return this; } @@ -2139,13 +2061,13 @@ public final class Monitoring { * <code>.context.SliceId slice_id = 8;</code> */ public Builder clearSliceId() { - if (sliceIdBuilder_ == null) { - sliceId_ = null; - onChanged(); - } else { - sliceId_ = null; + bitField0_ = (bitField0_ & ~0x00000080); + sliceId_ = null; + if (sliceIdBuilder_ != null) { + sliceIdBuilder_.dispose(); sliceIdBuilder_ = null; } + onChanged(); return this; } @@ -2153,6 +2075,7 @@ public final class Monitoring { * <code>.context.SliceId slice_id = 8;</code> */ public context.ContextOuterClass.SliceId.Builder getSliceIdBuilder() { + bitField0_ |= 0x00000080; onChanged(); return getSliceIdFieldBuilder().getBuilder(); } @@ -2188,7 +2111,7 @@ public final class Monitoring { * @return Whether the connectionId field is set. */ public boolean hasConnectionId() { - return connectionIdBuilder_ != null || connectionId_ != null; + return ((bitField0_ & 0x00000100) != 0); } /** @@ -2212,10 +2135,11 @@ public final class Monitoring { throw new NullPointerException(); } connectionId_ = value; - onChanged(); } else { connectionIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000100; + onChanged(); return this; } @@ -2225,10 +2149,11 @@ public final class Monitoring { public Builder setConnectionId(context.ContextOuterClass.ConnectionId.Builder builderForValue) { if (connectionIdBuilder_ == null) { connectionId_ = builderForValue.build(); - onChanged(); } else { connectionIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000100; + onChanged(); return this; } @@ -2237,15 +2162,16 @@ public final class Monitoring { */ public Builder mergeConnectionId(context.ContextOuterClass.ConnectionId value) { if (connectionIdBuilder_ == null) { - if (connectionId_ != null) { - connectionId_ = context.ContextOuterClass.ConnectionId.newBuilder(connectionId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000100) != 0) && connectionId_ != null && connectionId_ != context.ContextOuterClass.ConnectionId.getDefaultInstance()) { + getConnectionIdBuilder().mergeFrom(value); } else { connectionId_ = value; } - onChanged(); } else { connectionIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000100; + onChanged(); return this; } @@ -2253,13 +2179,13 @@ public final class Monitoring { * <code>.context.ConnectionId connection_id = 9;</code> */ public Builder clearConnectionId() { - if (connectionIdBuilder_ == null) { - connectionId_ = null; - onChanged(); - } else { - connectionId_ = null; + bitField0_ = (bitField0_ & ~0x00000100); + connectionId_ = null; + if (connectionIdBuilder_ != null) { + connectionIdBuilder_.dispose(); connectionIdBuilder_ = null; } + onChanged(); return this; } @@ -2267,6 +2193,7 @@ public final class Monitoring { * <code>.context.ConnectionId connection_id = 9;</code> */ public context.ContextOuterClass.ConnectionId.Builder getConnectionIdBuilder() { + bitField0_ |= 0x00000100; onChanged(); return getConnectionIdFieldBuilder().getBuilder(); } @@ -2302,7 +2229,7 @@ public final class Monitoring { * @return Whether the linkId field is set. */ public boolean hasLinkId() { - return linkIdBuilder_ != null || linkId_ != null; + return ((bitField0_ & 0x00000200) != 0); } /** @@ -2326,10 +2253,11 @@ public final class Monitoring { throw new NullPointerException(); } linkId_ = value; - onChanged(); } else { linkIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000200; + onChanged(); return this; } @@ -2339,10 +2267,11 @@ public final class Monitoring { public Builder setLinkId(context.ContextOuterClass.LinkId.Builder builderForValue) { if (linkIdBuilder_ == null) { linkId_ = builderForValue.build(); - onChanged(); } else { linkIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000200; + onChanged(); return this; } @@ -2351,15 +2280,16 @@ public final class Monitoring { */ public Builder mergeLinkId(context.ContextOuterClass.LinkId value) { if (linkIdBuilder_ == null) { - if (linkId_ != null) { - linkId_ = context.ContextOuterClass.LinkId.newBuilder(linkId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000200) != 0) && linkId_ != null && linkId_ != context.ContextOuterClass.LinkId.getDefaultInstance()) { + getLinkIdBuilder().mergeFrom(value); } else { linkId_ = value; } - onChanged(); } else { linkIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000200; + onChanged(); return this; } @@ -2367,13 +2297,13 @@ public final class Monitoring { * <code>.context.LinkId link_id = 10;</code> */ public Builder clearLinkId() { - if (linkIdBuilder_ == null) { - linkId_ = null; - onChanged(); - } else { - linkId_ = null; + bitField0_ = (bitField0_ & ~0x00000200); + linkId_ = null; + if (linkIdBuilder_ != null) { + linkIdBuilder_.dispose(); linkIdBuilder_ = null; } + onChanged(); return this; } @@ -2381,6 +2311,7 @@ public final class Monitoring { * <code>.context.LinkId link_id = 10;</code> */ public context.ContextOuterClass.LinkId.Builder getLinkIdBuilder() { + bitField0_ |= 0x00000200; onChanged(); return getLinkIdFieldBuilder().getBuilder(); } @@ -2434,7 +2365,17 @@ public final class Monitoring { @java.lang.Override public KpiDescriptor parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new KpiDescriptor(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2512,74 +2453,13 @@ public final class Monitoring { return new MonitorKpiRequest(); } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return monitoring.Monitoring.internal_static_monitoring_MonitorKpiRequest_descriptor; + } + @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private MonitorKpiRequest(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - monitoring.Monitoring.KpiId.Builder subBuilder = null; - if (kpiId_ != null) { - subBuilder = kpiId_.toBuilder(); - } - kpiId_ = input.readMessage(monitoring.Monitoring.KpiId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(kpiId_); - kpiId_ = subBuilder.buildPartial(); - } - break; - } - case 21: - { - monitoringWindowS_ = input.readFloat(); - break; - } - case 29: - { - samplingRateS_ = input.readFloat(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return monitoring.Monitoring.internal_static_monitoring_MonitorKpiRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return monitoring.Monitoring.internal_static_monitoring_MonitorKpiRequest_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.MonitorKpiRequest.class, monitoring.Monitoring.MonitorKpiRequest.Builder.class); + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { + return monitoring.Monitoring.internal_static_monitoring_MonitorKpiRequest_fieldAccessorTable.ensureFieldAccessorsInitialized(monitoring.Monitoring.MonitorKpiRequest.class, monitoring.Monitoring.MonitorKpiRequest.Builder.class); } public static final int KPI_ID_FIELD_NUMBER = 1; @@ -2609,12 +2489,12 @@ public final class Monitoring { */ @java.lang.Override public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - return getKpiId(); + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; } public static final int MONITORING_WINDOW_S_FIELD_NUMBER = 2; - private float monitoringWindowS_; + private float monitoringWindowS_ = 0F; /** * <code>float monitoring_window_s = 2;</code> @@ -2627,7 +2507,7 @@ public final class Monitoring { public static final int SAMPLING_RATE_S_FIELD_NUMBER = 3; - private float samplingRateS_; + private float samplingRateS_ = 0F; /** * <pre> @@ -2660,13 +2540,13 @@ public final class Monitoring { if (kpiId_ != null) { output.writeMessage(1, getKpiId()); } - if (monitoringWindowS_ != 0F) { + if (java.lang.Float.floatToRawIntBits(monitoringWindowS_) != 0) { output.writeFloat(2, monitoringWindowS_); } - if (samplingRateS_ != 0F) { + if (java.lang.Float.floatToRawIntBits(samplingRateS_) != 0) { output.writeFloat(3, samplingRateS_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2678,13 +2558,13 @@ public final class Monitoring { if (kpiId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getKpiId()); } - if (monitoringWindowS_ != 0F) { + if (java.lang.Float.floatToRawIntBits(monitoringWindowS_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, monitoringWindowS_); } - if (samplingRateS_ != 0F) { + if (java.lang.Float.floatToRawIntBits(samplingRateS_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, samplingRateS_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2708,7 +2588,7 @@ public final class Monitoring { return false; if (java.lang.Float.floatToIntBits(getSamplingRateS()) != java.lang.Float.floatToIntBits(other.getSamplingRateS())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2728,7 +2608,7 @@ public final class Monitoring { hash = (53 * hash) + java.lang.Float.floatToIntBits(getMonitoringWindowS()); hash = (37 * hash) + SAMPLING_RATE_S_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits(getSamplingRateS()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2822,26 +2702,19 @@ public final class Monitoring { // Construct using monitoring.Monitoring.MonitorKpiRequest.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (kpiIdBuilder_ == null) { - kpiId_ = null; - } else { - kpiId_ = null; + bitField0_ = 0; + kpiId_ = null; + if (kpiIdBuilder_ != null) { + kpiIdBuilder_.dispose(); kpiIdBuilder_ = null; } monitoringWindowS_ = 0F; @@ -2871,45 +2744,24 @@ public final class Monitoring { @java.lang.Override public monitoring.Monitoring.MonitorKpiRequest buildPartial() { monitoring.Monitoring.MonitorKpiRequest result = new monitoring.Monitoring.MonitorKpiRequest(this); - if (kpiIdBuilder_ == null) { - result.kpiId_ = kpiId_; - } else { - result.kpiId_ = kpiIdBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } - result.monitoringWindowS_ = monitoringWindowS_; - result.samplingRateS_ = samplingRateS_; onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(monitoring.Monitoring.MonitorKpiRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.kpiId_ = kpiIdBuilder_ == null ? kpiId_ : kpiIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.monitoringWindowS_ = monitoringWindowS_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.samplingRateS_ = samplingRateS_; + } } @java.lang.Override @@ -2934,7 +2786,7 @@ public final class Monitoring { if (other.getSamplingRateS() != 0F) { setSamplingRateS(other.getSamplingRateS()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2946,20 +2798,61 @@ public final class Monitoring { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - monitoring.Monitoring.MonitorKpiRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getKpiIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 21: + { + monitoringWindowS_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } + // case 21 + case 29: + { + samplingRateS_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } + // case 29 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.MonitorKpiRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private monitoring.Monitoring.KpiId kpiId_; private com.google.protobuf.SingleFieldBuilderV3<monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> kpiIdBuilder_; @@ -2969,7 +2862,7 @@ public final class Monitoring { * @return Whether the kpiId field is set. */ public boolean hasKpiId() { - return kpiIdBuilder_ != null || kpiId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -2993,10 +2886,11 @@ public final class Monitoring { throw new NullPointerException(); } kpiId_ = value; - onChanged(); } else { kpiIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -3006,10 +2900,11 @@ public final class Monitoring { public Builder setKpiId(monitoring.Monitoring.KpiId.Builder builderForValue) { if (kpiIdBuilder_ == null) { kpiId_ = builderForValue.build(); - onChanged(); } else { kpiIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -3018,15 +2913,16 @@ public final class Monitoring { */ public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { if (kpiIdBuilder_ == null) { - if (kpiId_ != null) { - kpiId_ = monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && kpiId_ != null && kpiId_ != monitoring.Monitoring.KpiId.getDefaultInstance()) { + getKpiIdBuilder().mergeFrom(value); } else { kpiId_ = value; } - onChanged(); } else { kpiIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -3034,13 +2930,13 @@ public final class Monitoring { * <code>.monitoring.KpiId kpi_id = 1;</code> */ public Builder clearKpiId() { - if (kpiIdBuilder_ == null) { - kpiId_ = null; - onChanged(); - } else { - kpiId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + kpiId_ = null; + if (kpiIdBuilder_ != null) { + kpiIdBuilder_.dispose(); kpiIdBuilder_ = null; } + onChanged(); return this; } @@ -3048,6 +2944,7 @@ public final class Monitoring { * <code>.monitoring.KpiId kpi_id = 1;</code> */ public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getKpiIdFieldBuilder().getBuilder(); } @@ -3092,6 +2989,7 @@ public final class Monitoring { */ public Builder setMonitoringWindowS(float value) { monitoringWindowS_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -3101,6 +2999,7 @@ public final class Monitoring { * @return This builder for chaining. */ public Builder clearMonitoringWindowS() { + bitField0_ = (bitField0_ & ~0x00000002); monitoringWindowS_ = 0F; onChanged(); return this; @@ -3132,6 +3031,7 @@ public final class Monitoring { */ public Builder setSamplingRateS(float value) { samplingRateS_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -3145,6 +3045,7 @@ public final class Monitoring { * @return This builder for chaining. */ public Builder clearSamplingRateS() { + bitField0_ = (bitField0_ & ~0x00000004); samplingRateS_ = 0F; onChanged(); return this; @@ -3177,7 +3078,17 @@ public final class Monitoring { @java.lang.Override public MonitorKpiRequest parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MonitorKpiRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -3322,93 +3233,6 @@ public final class Monitoring { return new KpiQuery(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private KpiQuery(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - kpiIds_ = new java.util.ArrayList<monitoring.Monitoring.KpiId>(); - mutable_bitField0_ |= 0x00000001; - } - kpiIds_.add(input.readMessage(monitoring.Monitoring.KpiId.parser(), extensionRegistry)); - break; - } - case 21: - { - monitoringWindowS_ = input.readFloat(); - break; - } - case 24: - { - lastNSamples_ = input.readUInt32(); - break; - } - case 34: - { - context.ContextOuterClass.Timestamp.Builder subBuilder = null; - if (startTimestamp_ != null) { - subBuilder = startTimestamp_.toBuilder(); - } - startTimestamp_ = input.readMessage(context.ContextOuterClass.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(startTimestamp_); - startTimestamp_ = subBuilder.buildPartial(); - } - break; - } - case 42: - { - context.ContextOuterClass.Timestamp.Builder subBuilder = null; - if (endTimestamp_ != null) { - subBuilder = endTimestamp_.toBuilder(); - } - endTimestamp_ = input.readMessage(context.ContextOuterClass.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTimestamp_); - endTimestamp_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - kpiIds_ = java.util.Collections.unmodifiableList(kpiIds_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return monitoring.Monitoring.internal_static_monitoring_KpiQuery_descriptor; } @@ -3420,6 +3244,7 @@ public final class Monitoring { public static final int KPI_IDS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List<monitoring.Monitoring.KpiId> kpiIds_; /** @@ -3464,7 +3289,7 @@ public final class Monitoring { public static final int MONITORING_WINDOW_S_FIELD_NUMBER = 2; - private float monitoringWindowS_; + private float monitoringWindowS_ = 0F; /** * <code>float monitoring_window_s = 2;</code> @@ -3477,7 +3302,7 @@ public final class Monitoring { public static final int LAST_N_SAMPLES_FIELD_NUMBER = 3; - private int lastNSamples_; + private int lastNSamples_ = 0; /** * <pre> @@ -3531,7 +3356,7 @@ public final class Monitoring { */ @java.lang.Override public context.ContextOuterClass.TimestampOrBuilder getStartTimestampOrBuilder() { - return getStartTimestamp(); + return startTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : startTimestamp_; } public static final int END_TIMESTAMP_FIELD_NUMBER = 5; @@ -3573,7 +3398,7 @@ public final class Monitoring { */ @java.lang.Override public context.ContextOuterClass.TimestampOrBuilder getEndTimestampOrBuilder() { - return getEndTimestamp(); + return endTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : endTimestamp_; } private byte memoizedIsInitialized = -1; @@ -3594,7 +3419,7 @@ public final class Monitoring { for (int i = 0; i < kpiIds_.size(); i++) { output.writeMessage(1, kpiIds_.get(i)); } - if (monitoringWindowS_ != 0F) { + if (java.lang.Float.floatToRawIntBits(monitoringWindowS_) != 0) { output.writeFloat(2, monitoringWindowS_); } if (lastNSamples_ != 0) { @@ -3606,7 +3431,7 @@ public final class Monitoring { if (endTimestamp_ != null) { output.writeMessage(5, getEndTimestamp()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3618,7 +3443,7 @@ public final class Monitoring { for (int i = 0; i < kpiIds_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, kpiIds_.get(i)); } - if (monitoringWindowS_ != 0F) { + if (java.lang.Float.floatToRawIntBits(monitoringWindowS_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, monitoringWindowS_); } if (lastNSamples_ != 0) { @@ -3630,7 +3455,7 @@ public final class Monitoring { if (endTimestamp_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getEndTimestamp()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3662,7 +3487,7 @@ public final class Monitoring { if (!getEndTimestamp().equals(other.getEndTimestamp())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3690,7 +3515,7 @@ public final class Monitoring { hash = (37 * hash) + END_TIMESTAMP_FIELD_NUMBER; hash = (53 * hash) + getEndTimestamp().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3784,41 +3609,33 @@ public final class Monitoring { // Construct using monitoring.Monitoring.KpiQuery.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getKpiIdsFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (kpiIdsBuilder_ == null) { kpiIds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + kpiIds_ = null; kpiIdsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); monitoringWindowS_ = 0F; lastNSamples_ = 0; - if (startTimestampBuilder_ == null) { - startTimestamp_ = null; - } else { - startTimestamp_ = null; + startTimestamp_ = null; + if (startTimestampBuilder_ != null) { + startTimestampBuilder_.dispose(); startTimestampBuilder_ = null; } - if (endTimestampBuilder_ == null) { - endTimestamp_ = null; - } else { - endTimestamp_ = null; + endTimestamp_ = null; + if (endTimestampBuilder_ != null) { + endTimestampBuilder_.dispose(); endTimestampBuilder_ = null; } return this; @@ -3846,7 +3663,15 @@ public final class Monitoring { @java.lang.Override public monitoring.Monitoring.KpiQuery buildPartial() { monitoring.Monitoring.KpiQuery result = new monitoring.Monitoring.KpiQuery(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(monitoring.Monitoring.KpiQuery result) { if (kpiIdsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { kpiIds_ = java.util.Collections.unmodifiableList(kpiIds_); @@ -3856,50 +3681,22 @@ public final class Monitoring { } else { result.kpiIds_ = kpiIdsBuilder_.build(); } - result.monitoringWindowS_ = monitoringWindowS_; - result.lastNSamples_ = lastNSamples_; - if (startTimestampBuilder_ == null) { - result.startTimestamp_ = startTimestamp_; - } else { - result.startTimestamp_ = startTimestampBuilder_.build(); - } - if (endTimestampBuilder_ == null) { - result.endTimestamp_ = endTimestamp_; - } else { - result.endTimestamp_ = endTimestampBuilder_.build(); - } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); } - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(monitoring.Monitoring.KpiQuery result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.monitoringWindowS_ = monitoringWindowS_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.lastNSamples_ = lastNSamples_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.startTimestamp_ = startTimestampBuilder_ == null ? startTimestamp_ : startTimestampBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.endTimestamp_ = endTimestampBuilder_ == null ? endTimestamp_ : endTimestampBuilder_.build(); + } } @java.lang.Override @@ -3951,7 +3748,7 @@ public final class Monitoring { if (other.hasEndTimestamp()) { mergeEndTimestamp(other.getEndTimestamp()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3963,17 +3760,75 @@ public final class Monitoring { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - monitoring.Monitoring.KpiQuery parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + monitoring.Monitoring.KpiId m = input.readMessage(monitoring.Monitoring.KpiId.parser(), extensionRegistry); + if (kpiIdsBuilder_ == null) { + ensureKpiIdsIsMutable(); + kpiIds_.add(m); + } else { + kpiIdsBuilder_.addMessage(m); + } + break; + } + // case 10 + case 21: + { + monitoringWindowS_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } + // case 21 + case 24: + { + lastNSamples_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } + // case 24 + case 34: + { + input.readMessage(getStartTimestampFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } + // case 34 + case 42: + { + input.readMessage(getEndTimestampFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } + // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.KpiQuery) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -4234,6 +4089,7 @@ public final class Monitoring { */ public Builder setMonitoringWindowS(float value) { monitoringWindowS_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -4243,6 +4099,7 @@ public final class Monitoring { * @return This builder for chaining. */ public Builder clearMonitoringWindowS() { + bitField0_ = (bitField0_ & ~0x00000002); monitoringWindowS_ = 0F; onChanged(); return this; @@ -4274,6 +4131,7 @@ public final class Monitoring { */ public Builder setLastNSamples(int value) { lastNSamples_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -4287,6 +4145,7 @@ public final class Monitoring { * @return This builder for chaining. */ public Builder clearLastNSamples() { + bitField0_ = (bitField0_ & ~0x00000004); lastNSamples_ = 0; onChanged(); return this; @@ -4305,7 +4164,7 @@ public final class Monitoring { * @return Whether the startTimestamp field is set. */ public boolean hasStartTimestamp() { - return startTimestampBuilder_ != null || startTimestamp_ != null; + return ((bitField0_ & 0x00000008) != 0); } /** @@ -4337,10 +4196,11 @@ public final class Monitoring { throw new NullPointerException(); } startTimestamp_ = value; - onChanged(); } else { startTimestampBuilder_.setMessage(value); } + bitField0_ |= 0x00000008; + onChanged(); return this; } @@ -4354,10 +4214,11 @@ public final class Monitoring { public Builder setStartTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) { if (startTimestampBuilder_ == null) { startTimestamp_ = builderForValue.build(); - onChanged(); } else { startTimestampBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000008; + onChanged(); return this; } @@ -4370,15 +4231,16 @@ public final class Monitoring { */ public Builder mergeStartTimestamp(context.ContextOuterClass.Timestamp value) { if (startTimestampBuilder_ == null) { - if (startTimestamp_ != null) { - startTimestamp_ = context.ContextOuterClass.Timestamp.newBuilder(startTimestamp_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000008) != 0) && startTimestamp_ != null && startTimestamp_ != context.ContextOuterClass.Timestamp.getDefaultInstance()) { + getStartTimestampBuilder().mergeFrom(value); } else { startTimestamp_ = value; } - onChanged(); } else { startTimestampBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000008; + onChanged(); return this; } @@ -4390,13 +4252,13 @@ public final class Monitoring { * <code>.context.Timestamp start_timestamp = 4;</code> */ public Builder clearStartTimestamp() { - if (startTimestampBuilder_ == null) { - startTimestamp_ = null; - onChanged(); - } else { - startTimestamp_ = null; + bitField0_ = (bitField0_ & ~0x00000008); + startTimestamp_ = null; + if (startTimestampBuilder_ != null) { + startTimestampBuilder_.dispose(); startTimestampBuilder_ = null; } + onChanged(); return this; } @@ -4408,6 +4270,7 @@ public final class Monitoring { * <code>.context.Timestamp start_timestamp = 4;</code> */ public context.ContextOuterClass.Timestamp.Builder getStartTimestampBuilder() { + bitField0_ |= 0x00000008; onChanged(); return getStartTimestampFieldBuilder().getBuilder(); } @@ -4455,7 +4318,7 @@ public final class Monitoring { * @return Whether the endTimestamp field is set. */ public boolean hasEndTimestamp() { - return endTimestampBuilder_ != null || endTimestamp_ != null; + return ((bitField0_ & 0x00000010) != 0); } /** @@ -4487,10 +4350,11 @@ public final class Monitoring { throw new NullPointerException(); } endTimestamp_ = value; - onChanged(); } else { endTimestampBuilder_.setMessage(value); } + bitField0_ |= 0x00000010; + onChanged(); return this; } @@ -4504,10 +4368,11 @@ public final class Monitoring { public Builder setEndTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) { if (endTimestampBuilder_ == null) { endTimestamp_ = builderForValue.build(); - onChanged(); } else { endTimestampBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000010; + onChanged(); return this; } @@ -4520,15 +4385,16 @@ public final class Monitoring { */ public Builder mergeEndTimestamp(context.ContextOuterClass.Timestamp value) { if (endTimestampBuilder_ == null) { - if (endTimestamp_ != null) { - endTimestamp_ = context.ContextOuterClass.Timestamp.newBuilder(endTimestamp_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000010) != 0) && endTimestamp_ != null && endTimestamp_ != context.ContextOuterClass.Timestamp.getDefaultInstance()) { + getEndTimestampBuilder().mergeFrom(value); } else { endTimestamp_ = value; } - onChanged(); } else { endTimestampBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000010; + onChanged(); return this; } @@ -4540,13 +4406,13 @@ public final class Monitoring { * <code>.context.Timestamp end_timestamp = 5;</code> */ public Builder clearEndTimestamp() { - if (endTimestampBuilder_ == null) { - endTimestamp_ = null; - onChanged(); - } else { - endTimestamp_ = null; + bitField0_ = (bitField0_ & ~0x00000010); + endTimestamp_ = null; + if (endTimestampBuilder_ != null) { + endTimestampBuilder_.dispose(); endTimestampBuilder_ = null; } + onChanged(); return this; } @@ -4558,6 +4424,7 @@ public final class Monitoring { * <code>.context.Timestamp end_timestamp = 5;</code> */ public context.ContextOuterClass.Timestamp.Builder getEndTimestampBuilder() { + bitField0_ |= 0x00000010; onChanged(); return getEndTimestampFieldBuilder().getBuilder(); } @@ -4619,7 +4486,17 @@ public final class Monitoring { @java.lang.Override public KpiQuery parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new KpiQuery(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -4702,70 +4579,6 @@ public final class Monitoring { return new RawKpi(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private RawKpi(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.Timestamp.Builder subBuilder = null; - if (timestamp_ != null) { - subBuilder = timestamp_.toBuilder(); - } - timestamp_ = input.readMessage(context.ContextOuterClass.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(timestamp_); - timestamp_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - monitoring.Monitoring.KpiValue.Builder subBuilder = null; - if (kpiValue_ != null) { - subBuilder = kpiValue_.toBuilder(); - } - kpiValue_ = input.readMessage(monitoring.Monitoring.KpiValue.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(kpiValue_); - kpiValue_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return monitoring.Monitoring.internal_static_monitoring_RawKpi_descriptor; } @@ -4802,7 +4615,7 @@ public final class Monitoring { */ @java.lang.Override public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - return getTimestamp(); + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; } public static final int KPI_VALUE_FIELD_NUMBER = 2; @@ -4832,7 +4645,7 @@ public final class Monitoring { */ @java.lang.Override public monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder() { - return getKpiValue(); + return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; } private byte memoizedIsInitialized = -1; @@ -4856,7 +4669,7 @@ public final class Monitoring { if (kpiValue_ != null) { output.writeMessage(2, getKpiValue()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -4871,7 +4684,7 @@ public final class Monitoring { if (kpiValue_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getKpiValue()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -4897,7 +4710,7 @@ public final class Monitoring { if (!getKpiValue().equals(other.getKpiValue())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4917,7 +4730,7 @@ public final class Monitoring { hash = (37 * hash) + KPI_VALUE_FIELD_NUMBER; hash = (53 * hash) + getKpiValue().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -5015,32 +4828,24 @@ public final class Monitoring { // Construct using monitoring.Monitoring.RawKpi.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (timestampBuilder_ == null) { - timestamp_ = null; - } else { - timestamp_ = null; + bitField0_ = 0; + timestamp_ = null; + if (timestampBuilder_ != null) { + timestampBuilder_.dispose(); timestampBuilder_ = null; } - if (kpiValueBuilder_ == null) { - kpiValue_ = null; - } else { - kpiValue_ = null; + kpiValue_ = null; + if (kpiValueBuilder_ != null) { + kpiValueBuilder_.dispose(); kpiValueBuilder_ = null; } return this; @@ -5068,48 +4873,21 @@ public final class Monitoring { @java.lang.Override public monitoring.Monitoring.RawKpi buildPartial() { monitoring.Monitoring.RawKpi result = new monitoring.Monitoring.RawKpi(this); - if (timestampBuilder_ == null) { - result.timestamp_ = timestamp_; - } else { - result.timestamp_ = timestampBuilder_.build(); - } - if (kpiValueBuilder_ == null) { - result.kpiValue_ = kpiValue_; - } else { - result.kpiValue_ = kpiValueBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(monitoring.Monitoring.RawKpi result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.timestamp_ = timestampBuilder_ == null ? timestamp_ : timestampBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.kpiValue_ = kpiValueBuilder_ == null ? kpiValue_ : kpiValueBuilder_.build(); + } } @java.lang.Override @@ -5131,7 +4909,7 @@ public final class Monitoring { if (other.hasKpiValue()) { mergeKpiValue(other.getKpiValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -5143,20 +4921,54 @@ public final class Monitoring { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - monitoring.Monitoring.RawKpi parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.RawKpi) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getTimestampFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + input.readMessage(getKpiValueFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } + // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) } + // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.Timestamp timestamp_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.Timestamp, context.ContextOuterClass.Timestamp.Builder, context.ContextOuterClass.TimestampOrBuilder> timestampBuilder_; @@ -5166,7 +4978,7 @@ public final class Monitoring { * @return Whether the timestamp field is set. */ public boolean hasTimestamp() { - return timestampBuilder_ != null || timestamp_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -5190,10 +5002,11 @@ public final class Monitoring { throw new NullPointerException(); } timestamp_ = value; - onChanged(); } else { timestampBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -5203,10 +5016,11 @@ public final class Monitoring { public Builder setTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) { if (timestampBuilder_ == null) { timestamp_ = builderForValue.build(); - onChanged(); } else { timestampBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -5215,15 +5029,16 @@ public final class Monitoring { */ public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) { if (timestampBuilder_ == null) { - if (timestamp_ != null) { - timestamp_ = context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && timestamp_ != null && timestamp_ != context.ContextOuterClass.Timestamp.getDefaultInstance()) { + getTimestampBuilder().mergeFrom(value); } else { timestamp_ = value; } - onChanged(); } else { timestampBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -5231,13 +5046,13 @@ public final class Monitoring { * <code>.context.Timestamp timestamp = 1;</code> */ public Builder clearTimestamp() { - if (timestampBuilder_ == null) { - timestamp_ = null; - onChanged(); - } else { - timestamp_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + timestamp_ = null; + if (timestampBuilder_ != null) { + timestampBuilder_.dispose(); timestampBuilder_ = null; } + onChanged(); return this; } @@ -5245,6 +5060,7 @@ public final class Monitoring { * <code>.context.Timestamp timestamp = 1;</code> */ public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getTimestampFieldBuilder().getBuilder(); } @@ -5280,7 +5096,7 @@ public final class Monitoring { * @return Whether the kpiValue field is set. */ public boolean hasKpiValue() { - return kpiValueBuilder_ != null || kpiValue_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** @@ -5304,10 +5120,11 @@ public final class Monitoring { throw new NullPointerException(); } kpiValue_ = value; - onChanged(); } else { kpiValueBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -5317,10 +5134,11 @@ public final class Monitoring { public Builder setKpiValue(monitoring.Monitoring.KpiValue.Builder builderForValue) { if (kpiValueBuilder_ == null) { kpiValue_ = builderForValue.build(); - onChanged(); } else { kpiValueBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -5329,15 +5147,16 @@ public final class Monitoring { */ public Builder mergeKpiValue(monitoring.Monitoring.KpiValue value) { if (kpiValueBuilder_ == null) { - if (kpiValue_ != null) { - kpiValue_ = monitoring.Monitoring.KpiValue.newBuilder(kpiValue_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000002) != 0) && kpiValue_ != null && kpiValue_ != monitoring.Monitoring.KpiValue.getDefaultInstance()) { + getKpiValueBuilder().mergeFrom(value); } else { kpiValue_ = value; } - onChanged(); } else { kpiValueBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -5345,13 +5164,13 @@ public final class Monitoring { * <code>.monitoring.KpiValue kpi_value = 2;</code> */ public Builder clearKpiValue() { - if (kpiValueBuilder_ == null) { - kpiValue_ = null; - onChanged(); - } else { - kpiValue_ = null; + bitField0_ = (bitField0_ & ~0x00000002); + kpiValue_ = null; + if (kpiValueBuilder_ != null) { + kpiValueBuilder_.dispose(); kpiValueBuilder_ = null; } + onChanged(); return this; } @@ -5359,6 +5178,7 @@ public final class Monitoring { * <code>.monitoring.KpiValue kpi_value = 2;</code> */ public monitoring.Monitoring.KpiValue.Builder getKpiValueBuilder() { + bitField0_ |= 0x00000002; onChanged(); return getKpiValueFieldBuilder().getBuilder(); } @@ -5412,7 +5232,17 @@ public final class Monitoring { @java.lang.Override public RawKpi parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RawKpi(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -5504,70 +5334,6 @@ public final class Monitoring { return new RawKpiList(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private RawKpiList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - monitoring.Monitoring.KpiId.Builder subBuilder = null; - if (kpiId_ != null) { - subBuilder = kpiId_.toBuilder(); - } - kpiId_ = input.readMessage(monitoring.Monitoring.KpiId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(kpiId_); - kpiId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - rawKpis_ = new java.util.ArrayList<monitoring.Monitoring.RawKpi>(); - mutable_bitField0_ |= 0x00000001; - } - rawKpis_.add(input.readMessage(monitoring.Monitoring.RawKpi.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - rawKpis_ = java.util.Collections.unmodifiableList(rawKpis_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return monitoring.Monitoring.internal_static_monitoring_RawKpiList_descriptor; } @@ -5604,11 +5370,12 @@ public final class Monitoring { */ @java.lang.Override public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - return getKpiId(); + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; } public static final int RAW_KPIS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") private java.util.List<monitoring.Monitoring.RawKpi> rawKpis_; /** @@ -5672,7 +5439,7 @@ public final class Monitoring { for (int i = 0; i < rawKpis_.size(); i++) { output.writeMessage(2, rawKpis_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -5687,7 +5454,7 @@ public final class Monitoring { for (int i = 0; i < rawKpis_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, rawKpis_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -5709,7 +5476,7 @@ public final class Monitoring { } if (!getRawKpisList().equals(other.getRawKpisList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -5729,7 +5496,7 @@ public final class Monitoring { hash = (37 * hash) + RAW_KPIS_FIELD_NUMBER; hash = (53 * hash) + getRawKpisList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -5827,35 +5594,28 @@ public final class Monitoring { // Construct using monitoring.Monitoring.RawKpiList.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getRawKpisFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); - if (kpiIdBuilder_ == null) { - kpiId_ = null; - } else { - kpiId_ = null; + bitField0_ = 0; + kpiId_ = null; + if (kpiIdBuilder_ != null) { + kpiIdBuilder_.dispose(); kpiIdBuilder_ = null; } if (rawKpisBuilder_ == null) { rawKpis_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + rawKpis_ = null; rawKpisBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -5881,53 +5641,31 @@ public final class Monitoring { @java.lang.Override public monitoring.Monitoring.RawKpiList buildPartial() { monitoring.Monitoring.RawKpiList result = new monitoring.Monitoring.RawKpiList(this); - int from_bitField0_ = bitField0_; - if (kpiIdBuilder_ == null) { - result.kpiId_ = kpiId_; - } else { - result.kpiId_ = kpiIdBuilder_.build(); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(monitoring.Monitoring.RawKpiList result) { if (rawKpisBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000002) != 0)) { rawKpis_ = java.util.Collections.unmodifiableList(rawKpis_); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); } result.rawKpis_ = rawKpis_; } else { result.rawKpis_ = rawKpisBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); } - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(monitoring.Monitoring.RawKpiList result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.kpiId_ = kpiIdBuilder_ == null ? kpiId_ : kpiIdBuilder_.build(); + } } @java.lang.Override @@ -5950,7 +5688,7 @@ public final class Monitoring { if (!other.rawKpis_.isEmpty()) { if (rawKpis_.isEmpty()) { rawKpis_ = other.rawKpis_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); } else { ensureRawKpisIsMutable(); rawKpis_.addAll(other.rawKpis_); @@ -5963,14 +5701,14 @@ public final class Monitoring { rawKpisBuilder_.dispose(); rawKpisBuilder_ = null; rawKpis_ = other.rawKpis_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); rawKpisBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getRawKpisFieldBuilder() : null; } else { rawKpisBuilder_.addAllMessages(other.rawKpis_); } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -5982,17 +5720,54 @@ public final class Monitoring { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - monitoring.Monitoring.RawKpiList parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getKpiIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + monitoring.Monitoring.RawKpi m = input.readMessage(monitoring.Monitoring.RawKpi.parser(), extensionRegistry); + if (rawKpisBuilder_ == null) { + ensureRawKpisIsMutable(); + rawKpis_.add(m); + } else { + rawKpisBuilder_.addMessage(m); + } + break; + } + // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.RawKpiList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -6007,7 +5782,7 @@ public final class Monitoring { * @return Whether the kpiId field is set. */ public boolean hasKpiId() { - return kpiIdBuilder_ != null || kpiId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -6031,10 +5806,11 @@ public final class Monitoring { throw new NullPointerException(); } kpiId_ = value; - onChanged(); } else { kpiIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -6044,10 +5820,11 @@ public final class Monitoring { public Builder setKpiId(monitoring.Monitoring.KpiId.Builder builderForValue) { if (kpiIdBuilder_ == null) { kpiId_ = builderForValue.build(); - onChanged(); } else { kpiIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -6056,15 +5833,16 @@ public final class Monitoring { */ public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { if (kpiIdBuilder_ == null) { - if (kpiId_ != null) { - kpiId_ = monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && kpiId_ != null && kpiId_ != monitoring.Monitoring.KpiId.getDefaultInstance()) { + getKpiIdBuilder().mergeFrom(value); } else { kpiId_ = value; } - onChanged(); } else { kpiIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -6072,13 +5850,13 @@ public final class Monitoring { * <code>.monitoring.KpiId kpi_id = 1;</code> */ public Builder clearKpiId() { - if (kpiIdBuilder_ == null) { - kpiId_ = null; - onChanged(); - } else { - kpiId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + kpiId_ = null; + if (kpiIdBuilder_ != null) { + kpiIdBuilder_.dispose(); kpiIdBuilder_ = null; } + onChanged(); return this; } @@ -6086,6 +5864,7 @@ public final class Monitoring { * <code>.monitoring.KpiId kpi_id = 1;</code> */ public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getKpiIdFieldBuilder().getBuilder(); } @@ -6115,9 +5894,9 @@ public final class Monitoring { private java.util.List<monitoring.Monitoring.RawKpi> rawKpis_ = java.util.Collections.emptyList(); private void ensureRawKpisIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!((bitField0_ & 0x00000002) != 0)) { rawKpis_ = new java.util.ArrayList<monitoring.Monitoring.RawKpi>(rawKpis_); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000002; } } @@ -6269,7 +6048,7 @@ public final class Monitoring { public Builder clearRawKpis() { if (rawKpisBuilder_ == null) { rawKpis_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { rawKpisBuilder_.clear(); @@ -6343,7 +6122,7 @@ public final class Monitoring { private com.google.protobuf.RepeatedFieldBuilderV3<monitoring.Monitoring.RawKpi, monitoring.Monitoring.RawKpi.Builder, monitoring.Monitoring.RawKpiOrBuilder> getRawKpisFieldBuilder() { if (rawKpisBuilder_ == null) { - rawKpisBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<monitoring.Monitoring.RawKpi, monitoring.Monitoring.RawKpi.Builder, monitoring.Monitoring.RawKpiOrBuilder>(rawKpis_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + rawKpisBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<monitoring.Monitoring.RawKpi, monitoring.Monitoring.RawKpi.Builder, monitoring.Monitoring.RawKpiOrBuilder>(rawKpis_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); rawKpis_ = null; } return rawKpisBuilder_; @@ -6376,7 +6155,17 @@ public final class Monitoring { @java.lang.Override public RawKpiList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RawKpiList(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -6451,57 +6240,6 @@ public final class Monitoring { return new RawKpiTable(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private RawKpiTable(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - rawKpiLists_ = new java.util.ArrayList<monitoring.Monitoring.RawKpiList>(); - mutable_bitField0_ |= 0x00000001; - } - rawKpiLists_.add(input.readMessage(monitoring.Monitoring.RawKpiList.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - rawKpiLists_ = java.util.Collections.unmodifiableList(rawKpiLists_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return monitoring.Monitoring.internal_static_monitoring_RawKpiTable_descriptor; } @@ -6513,6 +6251,7 @@ public final class Monitoring { public static final int RAW_KPI_LISTS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List<monitoring.Monitoring.RawKpiList> rawKpiLists_; /** @@ -6573,7 +6312,7 @@ public final class Monitoring { for (int i = 0; i < rawKpiLists_.size(); i++) { output.writeMessage(1, rawKpiLists_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -6585,7 +6324,7 @@ public final class Monitoring { for (int i = 0; i < rawKpiLists_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, rawKpiLists_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -6601,7 +6340,7 @@ public final class Monitoring { monitoring.Monitoring.RawKpiTable other = (monitoring.Monitoring.RawKpiTable) obj; if (!getRawKpiListsList().equals(other.getRawKpiListsList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -6617,7 +6356,7 @@ public final class Monitoring { hash = (37 * hash) + RAW_KPI_LISTS_FIELD_NUMBER; hash = (53 * hash) + getRawKpiListsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -6715,29 +6454,23 @@ public final class Monitoring { // Construct using monitoring.Monitoring.RawKpiTable.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getRawKpiListsFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (rawKpiListsBuilder_ == null) { rawKpiLists_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + rawKpiLists_ = null; rawKpiListsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -6763,7 +6496,15 @@ public final class Monitoring { @java.lang.Override public monitoring.Monitoring.RawKpiTable buildPartial() { monitoring.Monitoring.RawKpiTable result = new monitoring.Monitoring.RawKpiTable(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(monitoring.Monitoring.RawKpiTable result) { if (rawKpiListsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { rawKpiLists_ = java.util.Collections.unmodifiableList(rawKpiLists_); @@ -6773,38 +6514,10 @@ public final class Monitoring { } else { result.rawKpiLists_ = rawKpiListsBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); } - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(monitoring.Monitoring.RawKpiTable result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -6844,7 +6557,7 @@ public final class Monitoring { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -6856,17 +6569,47 @@ public final class Monitoring { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - monitoring.Monitoring.RawKpiTable parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + monitoring.Monitoring.RawKpiList m = input.readMessage(monitoring.Monitoring.RawKpiList.parser(), extensionRegistry); + if (rawKpiListsBuilder_ == null) { + ensureRawKpiListsIsMutable(); + rawKpiLists_.add(m); + } else { + rawKpiListsBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.RawKpiTable) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -7136,7 +6879,17 @@ public final class Monitoring { @java.lang.Override public RawKpiTable parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RawKpiTable(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -7198,57 +6951,6 @@ public final class Monitoring { return new KpiId(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private KpiId(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.Uuid.Builder subBuilder = null; - if (kpiId_ != null) { - subBuilder = kpiId_.toBuilder(); - } - kpiId_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(kpiId_); - kpiId_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return monitoring.Monitoring.internal_static_monitoring_KpiId_descriptor; } @@ -7285,7 +6987,7 @@ public final class Monitoring { */ @java.lang.Override public context.ContextOuterClass.UuidOrBuilder getKpiIdOrBuilder() { - return getKpiId(); + return kpiId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : kpiId_; } private byte memoizedIsInitialized = -1; @@ -7306,7 +7008,7 @@ public final class Monitoring { if (kpiId_ != null) { output.writeMessage(1, getKpiId()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -7318,7 +7020,7 @@ public final class Monitoring { if (kpiId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getKpiId()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -7338,7 +7040,7 @@ public final class Monitoring { if (!getKpiId().equals(other.getKpiId())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -7354,7 +7056,7 @@ public final class Monitoring { hash = (37 * hash) + KPI_ID_FIELD_NUMBER; hash = (53 * hash) + getKpiId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -7448,26 +7150,19 @@ public final class Monitoring { // Construct using monitoring.Monitoring.KpiId.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (kpiIdBuilder_ == null) { - kpiId_ = null; - } else { - kpiId_ = null; + bitField0_ = 0; + kpiId_ = null; + if (kpiIdBuilder_ != null) { + kpiIdBuilder_.dispose(); kpiIdBuilder_ = null; } return this; @@ -7495,43 +7190,18 @@ public final class Monitoring { @java.lang.Override public monitoring.Monitoring.KpiId buildPartial() { monitoring.Monitoring.KpiId result = new monitoring.Monitoring.KpiId(this); - if (kpiIdBuilder_ == null) { - result.kpiId_ = kpiId_; - } else { - result.kpiId_ = kpiIdBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(monitoring.Monitoring.KpiId result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.kpiId_ = kpiIdBuilder_ == null ? kpiId_ : kpiIdBuilder_.build(); + } } @java.lang.Override @@ -7550,7 +7220,7 @@ public final class Monitoring { if (other.hasKpiId()) { mergeKpiId(other.getKpiId()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -7562,20 +7232,47 @@ public final class Monitoring { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - monitoring.Monitoring.KpiId parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getKpiIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.KpiId) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.Uuid kpiId_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> kpiIdBuilder_; @@ -7585,7 +7282,7 @@ public final class Monitoring { * @return Whether the kpiId field is set. */ public boolean hasKpiId() { - return kpiIdBuilder_ != null || kpiId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -7609,10 +7306,11 @@ public final class Monitoring { throw new NullPointerException(); } kpiId_ = value; - onChanged(); } else { kpiIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -7622,10 +7320,11 @@ public final class Monitoring { public Builder setKpiId(context.ContextOuterClass.Uuid.Builder builderForValue) { if (kpiIdBuilder_ == null) { kpiId_ = builderForValue.build(); - onChanged(); } else { kpiIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -7634,15 +7333,16 @@ public final class Monitoring { */ public Builder mergeKpiId(context.ContextOuterClass.Uuid value) { if (kpiIdBuilder_ == null) { - if (kpiId_ != null) { - kpiId_ = context.ContextOuterClass.Uuid.newBuilder(kpiId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && kpiId_ != null && kpiId_ != context.ContextOuterClass.Uuid.getDefaultInstance()) { + getKpiIdBuilder().mergeFrom(value); } else { kpiId_ = value; } - onChanged(); } else { kpiIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -7650,13 +7350,13 @@ public final class Monitoring { * <code>.context.Uuid kpi_id = 1;</code> */ public Builder clearKpiId() { - if (kpiIdBuilder_ == null) { - kpiId_ = null; - onChanged(); - } else { - kpiId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + kpiId_ = null; + if (kpiIdBuilder_ != null) { + kpiIdBuilder_.dispose(); kpiIdBuilder_ = null; } + onChanged(); return this; } @@ -7664,6 +7364,7 @@ public final class Monitoring { * <code>.context.Uuid kpi_id = 1;</code> */ public context.ContextOuterClass.Uuid.Builder getKpiIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getKpiIdFieldBuilder().getBuilder(); } @@ -7717,7 +7418,17 @@ public final class Monitoring { @java.lang.Override public KpiId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new KpiId(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -7813,83 +7524,6 @@ public final class Monitoring { return new Kpi(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Kpi(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - monitoring.Monitoring.KpiId.Builder subBuilder = null; - if (kpiId_ != null) { - subBuilder = kpiId_.toBuilder(); - } - kpiId_ = input.readMessage(monitoring.Monitoring.KpiId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(kpiId_); - kpiId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - context.ContextOuterClass.Timestamp.Builder subBuilder = null; - if (timestamp_ != null) { - subBuilder = timestamp_.toBuilder(); - } - timestamp_ = input.readMessage(context.ContextOuterClass.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(timestamp_); - timestamp_ = subBuilder.buildPartial(); - } - break; - } - case 26: - { - monitoring.Monitoring.KpiValue.Builder subBuilder = null; - if (kpiValue_ != null) { - subBuilder = kpiValue_.toBuilder(); - } - kpiValue_ = input.readMessage(monitoring.Monitoring.KpiValue.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(kpiValue_); - kpiValue_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return monitoring.Monitoring.internal_static_monitoring_Kpi_descriptor; } @@ -7926,7 +7560,7 @@ public final class Monitoring { */ @java.lang.Override public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - return getKpiId(); + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; } public static final int TIMESTAMP_FIELD_NUMBER = 2; @@ -7956,7 +7590,7 @@ public final class Monitoring { */ @java.lang.Override public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - return getTimestamp(); + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; } public static final int KPI_VALUE_FIELD_NUMBER = 3; @@ -7986,7 +7620,7 @@ public final class Monitoring { */ @java.lang.Override public monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder() { - return getKpiValue(); + return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; } private byte memoizedIsInitialized = -1; @@ -8013,7 +7647,7 @@ public final class Monitoring { if (kpiValue_ != null) { output.writeMessage(3, getKpiValue()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -8031,7 +7665,7 @@ public final class Monitoring { if (kpiValue_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getKpiValue()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -8063,7 +7697,7 @@ public final class Monitoring { if (!getKpiValue().equals(other.getKpiValue())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -8087,7 +7721,7 @@ public final class Monitoring { hash = (37 * hash) + KPI_VALUE_FIELD_NUMBER; hash = (53 * hash) + getKpiValue().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -8181,38 +7815,29 @@ public final class Monitoring { // Construct using monitoring.Monitoring.Kpi.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (kpiIdBuilder_ == null) { - kpiId_ = null; - } else { - kpiId_ = null; + bitField0_ = 0; + kpiId_ = null; + if (kpiIdBuilder_ != null) { + kpiIdBuilder_.dispose(); kpiIdBuilder_ = null; } - if (timestampBuilder_ == null) { - timestamp_ = null; - } else { - timestamp_ = null; + timestamp_ = null; + if (timestampBuilder_ != null) { + timestampBuilder_.dispose(); timestampBuilder_ = null; } - if (kpiValueBuilder_ == null) { - kpiValue_ = null; - } else { - kpiValue_ = null; + kpiValue_ = null; + if (kpiValueBuilder_ != null) { + kpiValueBuilder_.dispose(); kpiValueBuilder_ = null; } return this; @@ -8240,53 +7865,24 @@ public final class Monitoring { @java.lang.Override public monitoring.Monitoring.Kpi buildPartial() { monitoring.Monitoring.Kpi result = new monitoring.Monitoring.Kpi(this); - if (kpiIdBuilder_ == null) { - result.kpiId_ = kpiId_; - } else { - result.kpiId_ = kpiIdBuilder_.build(); - } - if (timestampBuilder_ == null) { - result.timestamp_ = timestamp_; - } else { - result.timestamp_ = timestampBuilder_.build(); - } - if (kpiValueBuilder_ == null) { - result.kpiValue_ = kpiValue_; - } else { - result.kpiValue_ = kpiValueBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(monitoring.Monitoring.Kpi result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.kpiId_ = kpiIdBuilder_ == null ? kpiId_ : kpiIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.timestamp_ = timestampBuilder_ == null ? timestamp_ : timestampBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.kpiValue_ = kpiValueBuilder_ == null ? kpiValue_ : kpiValueBuilder_.build(); + } } @java.lang.Override @@ -8311,7 +7907,7 @@ public final class Monitoring { if (other.hasKpiValue()) { mergeKpiValue(other.getKpiValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -8323,20 +7919,61 @@ public final class Monitoring { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - monitoring.Monitoring.Kpi parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getKpiIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + input.readMessage(getTimestampFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 26: + { + input.readMessage(getKpiValueFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } + // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.Kpi) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private monitoring.Monitoring.KpiId kpiId_; private com.google.protobuf.SingleFieldBuilderV3<monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> kpiIdBuilder_; @@ -8346,7 +7983,7 @@ public final class Monitoring { * @return Whether the kpiId field is set. */ public boolean hasKpiId() { - return kpiIdBuilder_ != null || kpiId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -8370,10 +8007,11 @@ public final class Monitoring { throw new NullPointerException(); } kpiId_ = value; - onChanged(); } else { kpiIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -8383,10 +8021,11 @@ public final class Monitoring { public Builder setKpiId(monitoring.Monitoring.KpiId.Builder builderForValue) { if (kpiIdBuilder_ == null) { kpiId_ = builderForValue.build(); - onChanged(); } else { kpiIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -8395,15 +8034,16 @@ public final class Monitoring { */ public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { if (kpiIdBuilder_ == null) { - if (kpiId_ != null) { - kpiId_ = monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && kpiId_ != null && kpiId_ != monitoring.Monitoring.KpiId.getDefaultInstance()) { + getKpiIdBuilder().mergeFrom(value); } else { kpiId_ = value; } - onChanged(); } else { kpiIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -8411,13 +8051,13 @@ public final class Monitoring { * <code>.monitoring.KpiId kpi_id = 1;</code> */ public Builder clearKpiId() { - if (kpiIdBuilder_ == null) { - kpiId_ = null; - onChanged(); - } else { - kpiId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + kpiId_ = null; + if (kpiIdBuilder_ != null) { + kpiIdBuilder_.dispose(); kpiIdBuilder_ = null; } + onChanged(); return this; } @@ -8425,6 +8065,7 @@ public final class Monitoring { * <code>.monitoring.KpiId kpi_id = 1;</code> */ public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getKpiIdFieldBuilder().getBuilder(); } @@ -8460,7 +8101,7 @@ public final class Monitoring { * @return Whether the timestamp field is set. */ public boolean hasTimestamp() { - return timestampBuilder_ != null || timestamp_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** @@ -8484,10 +8125,11 @@ public final class Monitoring { throw new NullPointerException(); } timestamp_ = value; - onChanged(); } else { timestampBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -8497,10 +8139,11 @@ public final class Monitoring { public Builder setTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) { if (timestampBuilder_ == null) { timestamp_ = builderForValue.build(); - onChanged(); } else { timestampBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -8509,15 +8152,16 @@ public final class Monitoring { */ public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) { if (timestampBuilder_ == null) { - if (timestamp_ != null) { - timestamp_ = context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000002) != 0) && timestamp_ != null && timestamp_ != context.ContextOuterClass.Timestamp.getDefaultInstance()) { + getTimestampBuilder().mergeFrom(value); } else { timestamp_ = value; } - onChanged(); } else { timestampBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -8525,13 +8169,13 @@ public final class Monitoring { * <code>.context.Timestamp timestamp = 2;</code> */ public Builder clearTimestamp() { - if (timestampBuilder_ == null) { - timestamp_ = null; - onChanged(); - } else { - timestamp_ = null; + bitField0_ = (bitField0_ & ~0x00000002); + timestamp_ = null; + if (timestampBuilder_ != null) { + timestampBuilder_.dispose(); timestampBuilder_ = null; } + onChanged(); return this; } @@ -8539,6 +8183,7 @@ public final class Monitoring { * <code>.context.Timestamp timestamp = 2;</code> */ public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() { + bitField0_ |= 0x00000002; onChanged(); return getTimestampFieldBuilder().getBuilder(); } @@ -8574,7 +8219,7 @@ public final class Monitoring { * @return Whether the kpiValue field is set. */ public boolean hasKpiValue() { - return kpiValueBuilder_ != null || kpiValue_ != null; + return ((bitField0_ & 0x00000004) != 0); } /** @@ -8598,10 +8243,11 @@ public final class Monitoring { throw new NullPointerException(); } kpiValue_ = value; - onChanged(); } else { kpiValueBuilder_.setMessage(value); } + bitField0_ |= 0x00000004; + onChanged(); return this; } @@ -8611,10 +8257,11 @@ public final class Monitoring { public Builder setKpiValue(monitoring.Monitoring.KpiValue.Builder builderForValue) { if (kpiValueBuilder_ == null) { kpiValue_ = builderForValue.build(); - onChanged(); } else { kpiValueBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000004; + onChanged(); return this; } @@ -8623,15 +8270,16 @@ public final class Monitoring { */ public Builder mergeKpiValue(monitoring.Monitoring.KpiValue value) { if (kpiValueBuilder_ == null) { - if (kpiValue_ != null) { - kpiValue_ = monitoring.Monitoring.KpiValue.newBuilder(kpiValue_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000004) != 0) && kpiValue_ != null && kpiValue_ != monitoring.Monitoring.KpiValue.getDefaultInstance()) { + getKpiValueBuilder().mergeFrom(value); } else { kpiValue_ = value; } - onChanged(); } else { kpiValueBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000004; + onChanged(); return this; } @@ -8639,13 +8287,13 @@ public final class Monitoring { * <code>.monitoring.KpiValue kpi_value = 3;</code> */ public Builder clearKpiValue() { - if (kpiValueBuilder_ == null) { - kpiValue_ = null; - onChanged(); - } else { - kpiValue_ = null; + bitField0_ = (bitField0_ & ~0x00000004); + kpiValue_ = null; + if (kpiValueBuilder_ != null) { + kpiValueBuilder_.dispose(); kpiValueBuilder_ = null; } + onChanged(); return this; } @@ -8653,6 +8301,7 @@ public final class Monitoring { * <code>.monitoring.KpiValue kpi_value = 3;</code> */ public monitoring.Monitoring.KpiValue.Builder getKpiValueBuilder() { + bitField0_ |= 0x00000004; onChanged(); return getKpiValueFieldBuilder().getBuilder(); } @@ -8706,7 +8355,17 @@ public final class Monitoring { @java.lang.Override public Kpi parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Kpi(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -8815,85 +8474,6 @@ public final class Monitoring { return new KpiValueRange(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private KpiValueRange(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - monitoring.Monitoring.KpiValue.Builder subBuilder = null; - if (kpiMinValue_ != null) { - subBuilder = kpiMinValue_.toBuilder(); - } - kpiMinValue_ = input.readMessage(monitoring.Monitoring.KpiValue.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(kpiMinValue_); - kpiMinValue_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - monitoring.Monitoring.KpiValue.Builder subBuilder = null; - if (kpiMaxValue_ != null) { - subBuilder = kpiMaxValue_.toBuilder(); - } - kpiMaxValue_ = input.readMessage(monitoring.Monitoring.KpiValue.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(kpiMaxValue_); - kpiMaxValue_ = subBuilder.buildPartial(); - } - break; - } - case 24: - { - inRange_ = input.readBool(); - break; - } - case 32: - { - includeMinValue_ = input.readBool(); - break; - } - case 40: - { - includeMaxValue_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return monitoring.Monitoring.internal_static_monitoring_KpiValueRange_descriptor; } @@ -8930,7 +8510,7 @@ public final class Monitoring { */ @java.lang.Override public monitoring.Monitoring.KpiValueOrBuilder getKpiMinValueOrBuilder() { - return getKpiMinValue(); + return kpiMinValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiMinValue_; } public static final int KPIMAXVALUE_FIELD_NUMBER = 2; @@ -8960,12 +8540,12 @@ public final class Monitoring { */ @java.lang.Override public monitoring.Monitoring.KpiValueOrBuilder getKpiMaxValueOrBuilder() { - return getKpiMaxValue(); + return kpiMaxValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiMaxValue_; } public static final int INRANGE_FIELD_NUMBER = 3; - private boolean inRange_; + private boolean inRange_ = false; /** * <pre> @@ -8982,7 +8562,7 @@ public final class Monitoring { public static final int INCLUDEMINVALUE_FIELD_NUMBER = 4; - private boolean includeMinValue_; + private boolean includeMinValue_ = false; /** * <pre> @@ -8999,7 +8579,7 @@ public final class Monitoring { public static final int INCLUDEMAXVALUE_FIELD_NUMBER = 5; - private boolean includeMaxValue_; + private boolean includeMaxValue_ = false; /** * <pre> @@ -9044,7 +8624,7 @@ public final class Monitoring { if (includeMaxValue_ != false) { output.writeBool(5, includeMaxValue_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -9068,7 +8648,7 @@ public final class Monitoring { if (includeMaxValue_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, includeMaxValue_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -9100,7 +8680,7 @@ public final class Monitoring { return false; if (getIncludeMaxValue() != other.getIncludeMaxValue()) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -9126,7 +8706,7 @@ public final class Monitoring { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeMinValue()); hash = (37 * hash) + INCLUDEMAXVALUE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIncludeMaxValue()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -9220,32 +8800,24 @@ public final class Monitoring { // Construct using monitoring.Monitoring.KpiValueRange.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (kpiMinValueBuilder_ == null) { - kpiMinValue_ = null; - } else { - kpiMinValue_ = null; + bitField0_ = 0; + kpiMinValue_ = null; + if (kpiMinValueBuilder_ != null) { + kpiMinValueBuilder_.dispose(); kpiMinValueBuilder_ = null; } - if (kpiMaxValueBuilder_ == null) { - kpiMaxValue_ = null; - } else { - kpiMaxValue_ = null; + kpiMaxValue_ = null; + if (kpiMaxValueBuilder_ != null) { + kpiMaxValueBuilder_.dispose(); kpiMaxValueBuilder_ = null; } inRange_ = false; @@ -9276,51 +8848,30 @@ public final class Monitoring { @java.lang.Override public monitoring.Monitoring.KpiValueRange buildPartial() { monitoring.Monitoring.KpiValueRange result = new monitoring.Monitoring.KpiValueRange(this); - if (kpiMinValueBuilder_ == null) { - result.kpiMinValue_ = kpiMinValue_; - } else { - result.kpiMinValue_ = kpiMinValueBuilder_.build(); - } - if (kpiMaxValueBuilder_ == null) { - result.kpiMaxValue_ = kpiMaxValue_; - } else { - result.kpiMaxValue_ = kpiMaxValueBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } - result.inRange_ = inRange_; - result.includeMinValue_ = includeMinValue_; - result.includeMaxValue_ = includeMaxValue_; onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(monitoring.Monitoring.KpiValueRange result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.kpiMinValue_ = kpiMinValueBuilder_ == null ? kpiMinValue_ : kpiMinValueBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.kpiMaxValue_ = kpiMaxValueBuilder_ == null ? kpiMaxValue_ : kpiMaxValueBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.inRange_ = inRange_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.includeMinValue_ = includeMinValue_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.includeMaxValue_ = includeMaxValue_; + } } @java.lang.Override @@ -9351,7 +8902,7 @@ public final class Monitoring { if (other.getIncludeMaxValue() != false) { setIncludeMaxValue(other.getIncludeMaxValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -9363,20 +8914,75 @@ public final class Monitoring { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - monitoring.Monitoring.KpiValueRange parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getKpiMinValueFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + input.readMessage(getKpiMaxValueFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 24: + { + inRange_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } + // case 24 + case 32: + { + includeMinValue_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } + // case 32 + case 40: + { + includeMaxValue_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } + // case 40 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.KpiValueRange) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private monitoring.Monitoring.KpiValue kpiMinValue_; private com.google.protobuf.SingleFieldBuilderV3<monitoring.Monitoring.KpiValue, monitoring.Monitoring.KpiValue.Builder, monitoring.Monitoring.KpiValueOrBuilder> kpiMinValueBuilder_; @@ -9386,7 +8992,7 @@ public final class Monitoring { * @return Whether the kpiMinValue field is set. */ public boolean hasKpiMinValue() { - return kpiMinValueBuilder_ != null || kpiMinValue_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -9410,10 +9016,11 @@ public final class Monitoring { throw new NullPointerException(); } kpiMinValue_ = value; - onChanged(); } else { kpiMinValueBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -9423,10 +9030,11 @@ public final class Monitoring { public Builder setKpiMinValue(monitoring.Monitoring.KpiValue.Builder builderForValue) { if (kpiMinValueBuilder_ == null) { kpiMinValue_ = builderForValue.build(); - onChanged(); } else { kpiMinValueBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -9435,15 +9043,16 @@ public final class Monitoring { */ public Builder mergeKpiMinValue(monitoring.Monitoring.KpiValue value) { if (kpiMinValueBuilder_ == null) { - if (kpiMinValue_ != null) { - kpiMinValue_ = monitoring.Monitoring.KpiValue.newBuilder(kpiMinValue_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && kpiMinValue_ != null && kpiMinValue_ != monitoring.Monitoring.KpiValue.getDefaultInstance()) { + getKpiMinValueBuilder().mergeFrom(value); } else { kpiMinValue_ = value; } - onChanged(); } else { kpiMinValueBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -9451,13 +9060,13 @@ public final class Monitoring { * <code>.monitoring.KpiValue kpiMinValue = 1;</code> */ public Builder clearKpiMinValue() { - if (kpiMinValueBuilder_ == null) { - kpiMinValue_ = null; - onChanged(); - } else { - kpiMinValue_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + kpiMinValue_ = null; + if (kpiMinValueBuilder_ != null) { + kpiMinValueBuilder_.dispose(); kpiMinValueBuilder_ = null; } + onChanged(); return this; } @@ -9465,6 +9074,7 @@ public final class Monitoring { * <code>.monitoring.KpiValue kpiMinValue = 1;</code> */ public monitoring.Monitoring.KpiValue.Builder getKpiMinValueBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getKpiMinValueFieldBuilder().getBuilder(); } @@ -9500,7 +9110,7 @@ public final class Monitoring { * @return Whether the kpiMaxValue field is set. */ public boolean hasKpiMaxValue() { - return kpiMaxValueBuilder_ != null || kpiMaxValue_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** @@ -9524,10 +9134,11 @@ public final class Monitoring { throw new NullPointerException(); } kpiMaxValue_ = value; - onChanged(); } else { kpiMaxValueBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -9537,10 +9148,11 @@ public final class Monitoring { public Builder setKpiMaxValue(monitoring.Monitoring.KpiValue.Builder builderForValue) { if (kpiMaxValueBuilder_ == null) { kpiMaxValue_ = builderForValue.build(); - onChanged(); } else { kpiMaxValueBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -9549,15 +9161,16 @@ public final class Monitoring { */ public Builder mergeKpiMaxValue(monitoring.Monitoring.KpiValue value) { if (kpiMaxValueBuilder_ == null) { - if (kpiMaxValue_ != null) { - kpiMaxValue_ = monitoring.Monitoring.KpiValue.newBuilder(kpiMaxValue_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000002) != 0) && kpiMaxValue_ != null && kpiMaxValue_ != monitoring.Monitoring.KpiValue.getDefaultInstance()) { + getKpiMaxValueBuilder().mergeFrom(value); } else { kpiMaxValue_ = value; } - onChanged(); } else { kpiMaxValueBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -9565,13 +9178,13 @@ public final class Monitoring { * <code>.monitoring.KpiValue kpiMaxValue = 2;</code> */ public Builder clearKpiMaxValue() { - if (kpiMaxValueBuilder_ == null) { - kpiMaxValue_ = null; - onChanged(); - } else { - kpiMaxValue_ = null; + bitField0_ = (bitField0_ & ~0x00000002); + kpiMaxValue_ = null; + if (kpiMaxValueBuilder_ != null) { + kpiMaxValueBuilder_.dispose(); kpiMaxValueBuilder_ = null; } + onChanged(); return this; } @@ -9579,6 +9192,7 @@ public final class Monitoring { * <code>.monitoring.KpiValue kpiMaxValue = 2;</code> */ public monitoring.Monitoring.KpiValue.Builder getKpiMaxValueBuilder() { + bitField0_ |= 0x00000002; onChanged(); return getKpiMaxValueFieldBuilder().getBuilder(); } @@ -9631,6 +9245,7 @@ public final class Monitoring { */ public Builder setInRange(boolean value) { inRange_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -9644,6 +9259,7 @@ public final class Monitoring { * @return This builder for chaining. */ public Builder clearInRange() { + bitField0_ = (bitField0_ & ~0x00000004); inRange_ = false; onChanged(); return this; @@ -9675,6 +9291,7 @@ public final class Monitoring { */ public Builder setIncludeMinValue(boolean value) { includeMinValue_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -9688,6 +9305,7 @@ public final class Monitoring { * @return This builder for chaining. */ public Builder clearIncludeMinValue() { + bitField0_ = (bitField0_ & ~0x00000008); includeMinValue_ = false; onChanged(); return this; @@ -9719,6 +9337,7 @@ public final class Monitoring { */ public Builder setIncludeMaxValue(boolean value) { includeMaxValue_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -9732,6 +9351,7 @@ public final class Monitoring { * @return This builder for chaining. */ public Builder clearIncludeMaxValue() { + bitField0_ = (bitField0_ & ~0x00000010); includeMaxValue_ = false; onChanged(); return this; @@ -9764,7 +9384,17 @@ public final class Monitoring { @java.lang.Override public KpiValueRange parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new KpiValueRange(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -9876,7 +9506,7 @@ public final class Monitoring { */ boolean getBoolVal(); - public monitoring.Monitoring.KpiValue.ValueCase getValueCase(); + monitoring.Monitoring.KpiValue.ValueCase getValueCase(); } /** @@ -9901,87 +9531,6 @@ public final class Monitoring { return new KpiValue(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private KpiValue(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 8: - { - valueCase_ = 1; - value_ = input.readInt32(); - break; - } - case 16: - { - valueCase_ = 2; - value_ = input.readUInt32(); - break; - } - case 24: - { - valueCase_ = 3; - value_ = input.readInt64(); - break; - } - case 32: - { - valueCase_ = 4; - value_ = input.readUInt64(); - break; - } - case 45: - { - valueCase_ = 5; - value_ = input.readFloat(); - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - valueCase_ = 6; - value_ = s; - break; - } - case 56: - { - valueCase_ = 7; - value_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return monitoring.Monitoring.internal_static_monitoring_KpiValue_descriptor; } @@ -9993,6 +9542,7 @@ public final class Monitoring { private int valueCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object value_; public enum ValueCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { @@ -10279,7 +9829,7 @@ public final class Monitoring { if (valueCase_ == 7) { output.writeBool(7, (boolean) ((java.lang.Boolean) value_)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -10309,7 +9859,7 @@ public final class Monitoring { if (valueCase_ == 7) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(7, (boolean) ((java.lang.Boolean) value_)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -10357,7 +9907,7 @@ public final class Monitoring { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -10401,7 +9951,7 @@ public final class Monitoring { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -10495,22 +10045,16 @@ public final class Monitoring { // Construct using monitoring.Monitoring.KpiValue.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; valueCase_ = 0; value_ = null; return this; @@ -10538,60 +10082,21 @@ public final class Monitoring { @java.lang.Override public monitoring.Monitoring.KpiValue buildPartial() { monitoring.Monitoring.KpiValue result = new monitoring.Monitoring.KpiValue(this); - if (valueCase_ == 1) { - result.value_ = value_; - } - if (valueCase_ == 2) { - result.value_ = value_; - } - if (valueCase_ == 3) { - result.value_ = value_; + if (bitField0_ != 0) { + buildPartial0(result); } - if (valueCase_ == 4) { - result.value_ = value_; - } - if (valueCase_ == 5) { - result.value_ = value_; - } - if (valueCase_ == 6) { - result.value_ = value_; - } - if (valueCase_ == 7) { - result.value_ = value_; - } - result.valueCase_ = valueCase_; + buildPartialOneofs(result); onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); + private void buildPartial0(monitoring.Monitoring.KpiValue result) { + int from_bitField0_ = bitField0_; } - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartialOneofs(monitoring.Monitoring.KpiValue result) { + result.valueCase_ = valueCase_; + result.value_ = this.value_; } @java.lang.Override @@ -10650,7 +10155,7 @@ public final class Monitoring { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -10662,17 +10167,85 @@ public final class Monitoring { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - monitoring.Monitoring.KpiValue parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 8: + { + value_ = input.readInt32(); + valueCase_ = 1; + break; + } + // case 8 + case 16: + { + value_ = input.readUInt32(); + valueCase_ = 2; + break; + } + // case 16 + case 24: + { + value_ = input.readInt64(); + valueCase_ = 3; + break; + } + // case 24 + case 32: + { + value_ = input.readUInt64(); + valueCase_ = 4; + break; + } + // case 32 + case 45: + { + value_ = input.readFloat(); + valueCase_ = 5; + break; + } + // case 45 + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + valueCase_ = 6; + value_ = s; + break; + } + // case 50 + case 56: + { + value_ = input.readBool(); + valueCase_ = 7; + break; + } + // case 56 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.KpiValue) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -10691,6 +10264,8 @@ public final class Monitoring { return this; } + private int bitField0_; + /** * <code>int32 int32Val = 1;</code> * @return Whether the int32Val field is set. @@ -11078,7 +10653,17 @@ public final class Monitoring { @java.lang.Override public KpiValue parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new KpiValue(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -11149,57 +10734,6 @@ public final class Monitoring { return new KpiList(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private KpiList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - kpi_ = new java.util.ArrayList<monitoring.Monitoring.Kpi>(); - mutable_bitField0_ |= 0x00000001; - } - kpi_.add(input.readMessage(monitoring.Monitoring.Kpi.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - kpi_ = java.util.Collections.unmodifiableList(kpi_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return monitoring.Monitoring.internal_static_monitoring_KpiList_descriptor; } @@ -11211,6 +10745,7 @@ public final class Monitoring { public static final int KPI_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List<monitoring.Monitoring.Kpi> kpi_; /** @@ -11271,7 +10806,7 @@ public final class Monitoring { for (int i = 0; i < kpi_.size(); i++) { output.writeMessage(1, kpi_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -11283,7 +10818,7 @@ public final class Monitoring { for (int i = 0; i < kpi_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, kpi_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -11299,7 +10834,7 @@ public final class Monitoring { monitoring.Monitoring.KpiList other = (monitoring.Monitoring.KpiList) obj; if (!getKpiList().equals(other.getKpiList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -11315,7 +10850,7 @@ public final class Monitoring { hash = (37 * hash) + KPI_FIELD_NUMBER; hash = (53 * hash) + getKpiList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -11409,29 +10944,23 @@ public final class Monitoring { // Construct using monitoring.Monitoring.KpiList.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getKpiFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (kpiBuilder_ == null) { kpi_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + kpi_ = null; kpiBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -11457,7 +10986,15 @@ public final class Monitoring { @java.lang.Override public monitoring.Monitoring.KpiList buildPartial() { monitoring.Monitoring.KpiList result = new monitoring.Monitoring.KpiList(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(monitoring.Monitoring.KpiList result) { if (kpiBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { kpi_ = java.util.Collections.unmodifiableList(kpi_); @@ -11467,38 +11004,10 @@ public final class Monitoring { } else { result.kpi_ = kpiBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); } - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(monitoring.Monitoring.KpiList result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -11538,7 +11047,7 @@ public final class Monitoring { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -11550,17 +11059,47 @@ public final class Monitoring { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - monitoring.Monitoring.KpiList parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + monitoring.Monitoring.Kpi m = input.readMessage(monitoring.Monitoring.Kpi.parser(), extensionRegistry); + if (kpiBuilder_ == null) { + ensureKpiIsMutable(); + kpi_.add(m); + } else { + kpiBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.KpiList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -11830,7 +11369,17 @@ public final class Monitoring { @java.lang.Override public KpiList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new KpiList(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -11901,57 +11450,6 @@ public final class Monitoring { return new KpiDescriptorList(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private KpiDescriptorList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - kpiDescriptorList_ = new java.util.ArrayList<monitoring.Monitoring.KpiDescriptor>(); - mutable_bitField0_ |= 0x00000001; - } - kpiDescriptorList_.add(input.readMessage(monitoring.Monitoring.KpiDescriptor.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - kpiDescriptorList_ = java.util.Collections.unmodifiableList(kpiDescriptorList_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return monitoring.Monitoring.internal_static_monitoring_KpiDescriptorList_descriptor; } @@ -11963,6 +11461,7 @@ public final class Monitoring { public static final int KPI_DESCRIPTOR_LIST_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List<monitoring.Monitoring.KpiDescriptor> kpiDescriptorList_; /** @@ -12023,7 +11522,7 @@ public final class Monitoring { for (int i = 0; i < kpiDescriptorList_.size(); i++) { output.writeMessage(1, kpiDescriptorList_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -12035,7 +11534,7 @@ public final class Monitoring { for (int i = 0; i < kpiDescriptorList_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, kpiDescriptorList_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -12051,7 +11550,7 @@ public final class Monitoring { monitoring.Monitoring.KpiDescriptorList other = (monitoring.Monitoring.KpiDescriptorList) obj; if (!getKpiDescriptorListList().equals(other.getKpiDescriptorListList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -12067,7 +11566,7 @@ public final class Monitoring { hash = (37 * hash) + KPI_DESCRIPTOR_LIST_FIELD_NUMBER; hash = (53 * hash) + getKpiDescriptorListList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -12161,29 +11660,23 @@ public final class Monitoring { // Construct using monitoring.Monitoring.KpiDescriptorList.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getKpiDescriptorListFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (kpiDescriptorListBuilder_ == null) { kpiDescriptorList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + kpiDescriptorList_ = null; kpiDescriptorListBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -12209,7 +11702,15 @@ public final class Monitoring { @java.lang.Override public monitoring.Monitoring.KpiDescriptorList buildPartial() { monitoring.Monitoring.KpiDescriptorList result = new monitoring.Monitoring.KpiDescriptorList(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(monitoring.Monitoring.KpiDescriptorList result) { if (kpiDescriptorListBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { kpiDescriptorList_ = java.util.Collections.unmodifiableList(kpiDescriptorList_); @@ -12219,38 +11720,10 @@ public final class Monitoring { } else { result.kpiDescriptorList_ = kpiDescriptorListBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); } - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(monitoring.Monitoring.KpiDescriptorList result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -12290,7 +11763,7 @@ public final class Monitoring { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -12302,17 +11775,47 @@ public final class Monitoring { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - monitoring.Monitoring.KpiDescriptorList parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + monitoring.Monitoring.KpiDescriptor m = input.readMessage(monitoring.Monitoring.KpiDescriptor.parser(), extensionRegistry); + if (kpiDescriptorListBuilder_ == null) { + ensureKpiDescriptorListIsMutable(); + kpiDescriptorList_.add(m); + } else { + kpiDescriptorListBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.KpiDescriptorList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -12582,7 +12085,17 @@ public final class Monitoring { @java.lang.Override public KpiDescriptorList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new KpiDescriptorList(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -12731,106 +12244,6 @@ public final class Monitoring { return new SubsDescriptor(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private SubsDescriptor(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - monitoring.Monitoring.SubscriptionID.Builder subBuilder = null; - if (subsId_ != null) { - subBuilder = subsId_.toBuilder(); - } - subsId_ = input.readMessage(monitoring.Monitoring.SubscriptionID.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(subsId_); - subsId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - monitoring.Monitoring.KpiId.Builder subBuilder = null; - if (kpiId_ != null) { - subBuilder = kpiId_.toBuilder(); - } - kpiId_ = input.readMessage(monitoring.Monitoring.KpiId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(kpiId_); - kpiId_ = subBuilder.buildPartial(); - } - break; - } - case 29: - { - samplingDurationS_ = input.readFloat(); - break; - } - case 37: - { - samplingIntervalS_ = input.readFloat(); - break; - } - case 42: - { - context.ContextOuterClass.Timestamp.Builder subBuilder = null; - if (startTimestamp_ != null) { - subBuilder = startTimestamp_.toBuilder(); - } - startTimestamp_ = input.readMessage(context.ContextOuterClass.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(startTimestamp_); - startTimestamp_ = subBuilder.buildPartial(); - } - break; - } - case 50: - { - context.ContextOuterClass.Timestamp.Builder subBuilder = null; - if (endTimestamp_ != null) { - subBuilder = endTimestamp_.toBuilder(); - } - endTimestamp_ = input.readMessage(context.ContextOuterClass.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTimestamp_); - endTimestamp_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return monitoring.Monitoring.internal_static_monitoring_SubsDescriptor_descriptor; } @@ -12867,7 +12280,7 @@ public final class Monitoring { */ @java.lang.Override public monitoring.Monitoring.SubscriptionIDOrBuilder getSubsIdOrBuilder() { - return getSubsId(); + return subsId_ == null ? monitoring.Monitoring.SubscriptionID.getDefaultInstance() : subsId_; } public static final int KPI_ID_FIELD_NUMBER = 2; @@ -12897,12 +12310,12 @@ public final class Monitoring { */ @java.lang.Override public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - return getKpiId(); + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; } public static final int SAMPLING_DURATION_S_FIELD_NUMBER = 3; - private float samplingDurationS_; + private float samplingDurationS_ = 0F; /** * <code>float sampling_duration_s = 3;</code> @@ -12915,7 +12328,7 @@ public final class Monitoring { public static final int SAMPLING_INTERVAL_S_FIELD_NUMBER = 4; - private float samplingIntervalS_; + private float samplingIntervalS_ = 0F; /** * <code>float sampling_interval_s = 4;</code> @@ -12965,7 +12378,7 @@ public final class Monitoring { */ @java.lang.Override public context.ContextOuterClass.TimestampOrBuilder getStartTimestampOrBuilder() { - return getStartTimestamp(); + return startTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : startTimestamp_; } public static final int END_TIMESTAMP_FIELD_NUMBER = 6; @@ -13007,7 +12420,7 @@ public final class Monitoring { */ @java.lang.Override public context.ContextOuterClass.TimestampOrBuilder getEndTimestampOrBuilder() { - return getEndTimestamp(); + return endTimestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : endTimestamp_; } private byte memoizedIsInitialized = -1; @@ -13031,10 +12444,10 @@ public final class Monitoring { if (kpiId_ != null) { output.writeMessage(2, getKpiId()); } - if (samplingDurationS_ != 0F) { + if (java.lang.Float.floatToRawIntBits(samplingDurationS_) != 0) { output.writeFloat(3, samplingDurationS_); } - if (samplingIntervalS_ != 0F) { + if (java.lang.Float.floatToRawIntBits(samplingIntervalS_) != 0) { output.writeFloat(4, samplingIntervalS_); } if (startTimestamp_ != null) { @@ -13043,7 +12456,7 @@ public final class Monitoring { if (endTimestamp_ != null) { output.writeMessage(6, getEndTimestamp()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -13058,10 +12471,10 @@ public final class Monitoring { if (kpiId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getKpiId()); } - if (samplingDurationS_ != 0F) { + if (java.lang.Float.floatToRawIntBits(samplingDurationS_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, samplingDurationS_); } - if (samplingIntervalS_ != 0F) { + if (java.lang.Float.floatToRawIntBits(samplingIntervalS_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, samplingIntervalS_); } if (startTimestamp_ != null) { @@ -13070,7 +12483,7 @@ public final class Monitoring { if (endTimestamp_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getEndTimestamp()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -13112,7 +12525,7 @@ public final class Monitoring { if (!getEndTimestamp().equals(other.getEndTimestamp())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -13144,7 +12557,7 @@ public final class Monitoring { hash = (37 * hash) + END_TIMESTAMP_FIELD_NUMBER; hash = (53 * hash) + getEndTimestamp().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -13238,46 +12651,36 @@ public final class Monitoring { // Construct using monitoring.Monitoring.SubsDescriptor.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (subsIdBuilder_ == null) { - subsId_ = null; - } else { - subsId_ = null; + bitField0_ = 0; + subsId_ = null; + if (subsIdBuilder_ != null) { + subsIdBuilder_.dispose(); subsIdBuilder_ = null; } - if (kpiIdBuilder_ == null) { - kpiId_ = null; - } else { - kpiId_ = null; + kpiId_ = null; + if (kpiIdBuilder_ != null) { + kpiIdBuilder_.dispose(); kpiIdBuilder_ = null; } samplingDurationS_ = 0F; samplingIntervalS_ = 0F; - if (startTimestampBuilder_ == null) { - startTimestamp_ = null; - } else { - startTimestamp_ = null; + startTimestamp_ = null; + if (startTimestampBuilder_ != null) { + startTimestampBuilder_.dispose(); startTimestampBuilder_ = null; } - if (endTimestampBuilder_ == null) { - endTimestamp_ = null; - } else { - endTimestamp_ = null; + endTimestamp_ = null; + if (endTimestampBuilder_ != null) { + endTimestampBuilder_.dispose(); endTimestampBuilder_ = null; } return this; @@ -13305,60 +12708,33 @@ public final class Monitoring { @java.lang.Override public monitoring.Monitoring.SubsDescriptor buildPartial() { monitoring.Monitoring.SubsDescriptor result = new monitoring.Monitoring.SubsDescriptor(this); - if (subsIdBuilder_ == null) { - result.subsId_ = subsId_; - } else { - result.subsId_ = subsIdBuilder_.build(); - } - if (kpiIdBuilder_ == null) { - result.kpiId_ = kpiId_; - } else { - result.kpiId_ = kpiIdBuilder_.build(); - } - result.samplingDurationS_ = samplingDurationS_; - result.samplingIntervalS_ = samplingIntervalS_; - if (startTimestampBuilder_ == null) { - result.startTimestamp_ = startTimestamp_; - } else { - result.startTimestamp_ = startTimestampBuilder_.build(); - } - if (endTimestampBuilder_ == null) { - result.endTimestamp_ = endTimestamp_; - } else { - result.endTimestamp_ = endTimestampBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(monitoring.Monitoring.SubsDescriptor result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.subsId_ = subsIdBuilder_ == null ? subsId_ : subsIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.kpiId_ = kpiIdBuilder_ == null ? kpiId_ : kpiIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.samplingDurationS_ = samplingDurationS_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.samplingIntervalS_ = samplingIntervalS_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.startTimestamp_ = startTimestampBuilder_ == null ? startTimestamp_ : startTimestampBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.endTimestamp_ = endTimestampBuilder_ == null ? endTimestamp_ : endTimestampBuilder_.build(); + } } @java.lang.Override @@ -13392,7 +12768,7 @@ public final class Monitoring { if (other.hasEndTimestamp()) { mergeEndTimestamp(other.getEndTimestamp()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -13404,20 +12780,82 @@ public final class Monitoring { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - monitoring.Monitoring.SubsDescriptor parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getSubsIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + input.readMessage(getKpiIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 29: + { + samplingDurationS_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } + // case 29 + case 37: + { + samplingIntervalS_ = input.readFloat(); + bitField0_ |= 0x00000008; + break; + } + // case 37 + case 42: + { + input.readMessage(getStartTimestampFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } + // case 42 + case 50: + { + input.readMessage(getEndTimestampFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } + // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.SubsDescriptor) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private monitoring.Monitoring.SubscriptionID subsId_; private com.google.protobuf.SingleFieldBuilderV3<monitoring.Monitoring.SubscriptionID, monitoring.Monitoring.SubscriptionID.Builder, monitoring.Monitoring.SubscriptionIDOrBuilder> subsIdBuilder_; @@ -13427,7 +12865,7 @@ public final class Monitoring { * @return Whether the subsId field is set. */ public boolean hasSubsId() { - return subsIdBuilder_ != null || subsId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -13451,10 +12889,11 @@ public final class Monitoring { throw new NullPointerException(); } subsId_ = value; - onChanged(); } else { subsIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -13464,10 +12903,11 @@ public final class Monitoring { public Builder setSubsId(monitoring.Monitoring.SubscriptionID.Builder builderForValue) { if (subsIdBuilder_ == null) { subsId_ = builderForValue.build(); - onChanged(); } else { subsIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -13476,15 +12916,16 @@ public final class Monitoring { */ public Builder mergeSubsId(monitoring.Monitoring.SubscriptionID value) { if (subsIdBuilder_ == null) { - if (subsId_ != null) { - subsId_ = monitoring.Monitoring.SubscriptionID.newBuilder(subsId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && subsId_ != null && subsId_ != monitoring.Monitoring.SubscriptionID.getDefaultInstance()) { + getSubsIdBuilder().mergeFrom(value); } else { subsId_ = value; } - onChanged(); } else { subsIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -13492,13 +12933,13 @@ public final class Monitoring { * <code>.monitoring.SubscriptionID subs_id = 1;</code> */ public Builder clearSubsId() { - if (subsIdBuilder_ == null) { - subsId_ = null; - onChanged(); - } else { - subsId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + subsId_ = null; + if (subsIdBuilder_ != null) { + subsIdBuilder_.dispose(); subsIdBuilder_ = null; } + onChanged(); return this; } @@ -13506,6 +12947,7 @@ public final class Monitoring { * <code>.monitoring.SubscriptionID subs_id = 1;</code> */ public monitoring.Monitoring.SubscriptionID.Builder getSubsIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getSubsIdFieldBuilder().getBuilder(); } @@ -13541,7 +12983,7 @@ public final class Monitoring { * @return Whether the kpiId field is set. */ public boolean hasKpiId() { - return kpiIdBuilder_ != null || kpiId_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** @@ -13565,10 +13007,11 @@ public final class Monitoring { throw new NullPointerException(); } kpiId_ = value; - onChanged(); } else { kpiIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -13578,10 +13021,11 @@ public final class Monitoring { public Builder setKpiId(monitoring.Monitoring.KpiId.Builder builderForValue) { if (kpiIdBuilder_ == null) { kpiId_ = builderForValue.build(); - onChanged(); } else { kpiIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -13590,15 +13034,16 @@ public final class Monitoring { */ public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { if (kpiIdBuilder_ == null) { - if (kpiId_ != null) { - kpiId_ = monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000002) != 0) && kpiId_ != null && kpiId_ != monitoring.Monitoring.KpiId.getDefaultInstance()) { + getKpiIdBuilder().mergeFrom(value); } else { kpiId_ = value; } - onChanged(); } else { kpiIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -13606,13 +13051,13 @@ public final class Monitoring { * <code>.monitoring.KpiId kpi_id = 2;</code> */ public Builder clearKpiId() { - if (kpiIdBuilder_ == null) { - kpiId_ = null; - onChanged(); - } else { - kpiId_ = null; + bitField0_ = (bitField0_ & ~0x00000002); + kpiId_ = null; + if (kpiIdBuilder_ != null) { + kpiIdBuilder_.dispose(); kpiIdBuilder_ = null; } + onChanged(); return this; } @@ -13620,6 +13065,7 @@ public final class Monitoring { * <code>.monitoring.KpiId kpi_id = 2;</code> */ public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { + bitField0_ |= 0x00000002; onChanged(); return getKpiIdFieldBuilder().getBuilder(); } @@ -13664,6 +13110,7 @@ public final class Monitoring { */ public Builder setSamplingDurationS(float value) { samplingDurationS_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -13673,6 +13120,7 @@ public final class Monitoring { * @return This builder for chaining. */ public Builder clearSamplingDurationS() { + bitField0_ = (bitField0_ & ~0x00000004); samplingDurationS_ = 0F; onChanged(); return this; @@ -13696,6 +13144,7 @@ public final class Monitoring { */ public Builder setSamplingIntervalS(float value) { samplingIntervalS_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -13705,6 +13154,7 @@ public final class Monitoring { * @return This builder for chaining. */ public Builder clearSamplingIntervalS() { + bitField0_ = (bitField0_ & ~0x00000008); samplingIntervalS_ = 0F; onChanged(); return this; @@ -13723,7 +13173,7 @@ public final class Monitoring { * @return Whether the startTimestamp field is set. */ public boolean hasStartTimestamp() { - return startTimestampBuilder_ != null || startTimestamp_ != null; + return ((bitField0_ & 0x00000010) != 0); } /** @@ -13755,10 +13205,11 @@ public final class Monitoring { throw new NullPointerException(); } startTimestamp_ = value; - onChanged(); } else { startTimestampBuilder_.setMessage(value); } + bitField0_ |= 0x00000010; + onChanged(); return this; } @@ -13772,10 +13223,11 @@ public final class Monitoring { public Builder setStartTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) { if (startTimestampBuilder_ == null) { startTimestamp_ = builderForValue.build(); - onChanged(); } else { startTimestampBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000010; + onChanged(); return this; } @@ -13788,15 +13240,16 @@ public final class Monitoring { */ public Builder mergeStartTimestamp(context.ContextOuterClass.Timestamp value) { if (startTimestampBuilder_ == null) { - if (startTimestamp_ != null) { - startTimestamp_ = context.ContextOuterClass.Timestamp.newBuilder(startTimestamp_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000010) != 0) && startTimestamp_ != null && startTimestamp_ != context.ContextOuterClass.Timestamp.getDefaultInstance()) { + getStartTimestampBuilder().mergeFrom(value); } else { startTimestamp_ = value; } - onChanged(); } else { startTimestampBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000010; + onChanged(); return this; } @@ -13808,13 +13261,13 @@ public final class Monitoring { * <code>.context.Timestamp start_timestamp = 5;</code> */ public Builder clearStartTimestamp() { - if (startTimestampBuilder_ == null) { - startTimestamp_ = null; - onChanged(); - } else { - startTimestamp_ = null; + bitField0_ = (bitField0_ & ~0x00000010); + startTimestamp_ = null; + if (startTimestampBuilder_ != null) { + startTimestampBuilder_.dispose(); startTimestampBuilder_ = null; } + onChanged(); return this; } @@ -13826,6 +13279,7 @@ public final class Monitoring { * <code>.context.Timestamp start_timestamp = 5;</code> */ public context.ContextOuterClass.Timestamp.Builder getStartTimestampBuilder() { + bitField0_ |= 0x00000010; onChanged(); return getStartTimestampFieldBuilder().getBuilder(); } @@ -13873,7 +13327,7 @@ public final class Monitoring { * @return Whether the endTimestamp field is set. */ public boolean hasEndTimestamp() { - return endTimestampBuilder_ != null || endTimestamp_ != null; + return ((bitField0_ & 0x00000020) != 0); } /** @@ -13905,10 +13359,11 @@ public final class Monitoring { throw new NullPointerException(); } endTimestamp_ = value; - onChanged(); } else { endTimestampBuilder_.setMessage(value); } + bitField0_ |= 0x00000020; + onChanged(); return this; } @@ -13922,10 +13377,11 @@ public final class Monitoring { public Builder setEndTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) { if (endTimestampBuilder_ == null) { endTimestamp_ = builderForValue.build(); - onChanged(); } else { endTimestampBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000020; + onChanged(); return this; } @@ -13938,15 +13394,16 @@ public final class Monitoring { */ public Builder mergeEndTimestamp(context.ContextOuterClass.Timestamp value) { if (endTimestampBuilder_ == null) { - if (endTimestamp_ != null) { - endTimestamp_ = context.ContextOuterClass.Timestamp.newBuilder(endTimestamp_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000020) != 0) && endTimestamp_ != null && endTimestamp_ != context.ContextOuterClass.Timestamp.getDefaultInstance()) { + getEndTimestampBuilder().mergeFrom(value); } else { endTimestamp_ = value; } - onChanged(); } else { endTimestampBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000020; + onChanged(); return this; } @@ -13958,13 +13415,13 @@ public final class Monitoring { * <code>.context.Timestamp end_timestamp = 6;</code> */ public Builder clearEndTimestamp() { - if (endTimestampBuilder_ == null) { - endTimestamp_ = null; - onChanged(); - } else { - endTimestamp_ = null; + bitField0_ = (bitField0_ & ~0x00000020); + endTimestamp_ = null; + if (endTimestampBuilder_ != null) { + endTimestampBuilder_.dispose(); endTimestampBuilder_ = null; } + onChanged(); return this; } @@ -13976,6 +13433,7 @@ public final class Monitoring { * <code>.context.Timestamp end_timestamp = 6;</code> */ public context.ContextOuterClass.Timestamp.Builder getEndTimestampBuilder() { + bitField0_ |= 0x00000020; onChanged(); return getEndTimestampFieldBuilder().getBuilder(); } @@ -14037,7 +13495,17 @@ public final class Monitoring { @java.lang.Override public SubsDescriptor parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SubsDescriptor(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -14099,57 +13567,6 @@ public final class Monitoring { return new SubscriptionID(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private SubscriptionID(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.Uuid.Builder subBuilder = null; - if (subsId_ != null) { - subBuilder = subsId_.toBuilder(); - } - subsId_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(subsId_); - subsId_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return monitoring.Monitoring.internal_static_monitoring_SubscriptionID_descriptor; } @@ -14186,7 +13603,7 @@ public final class Monitoring { */ @java.lang.Override public context.ContextOuterClass.UuidOrBuilder getSubsIdOrBuilder() { - return getSubsId(); + return subsId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : subsId_; } private byte memoizedIsInitialized = -1; @@ -14207,7 +13624,7 @@ public final class Monitoring { if (subsId_ != null) { output.writeMessage(1, getSubsId()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -14219,7 +13636,7 @@ public final class Monitoring { if (subsId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSubsId()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -14239,7 +13656,7 @@ public final class Monitoring { if (!getSubsId().equals(other.getSubsId())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -14255,7 +13672,7 @@ public final class Monitoring { hash = (37 * hash) + SUBS_ID_FIELD_NUMBER; hash = (53 * hash) + getSubsId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -14349,26 +13766,19 @@ public final class Monitoring { // Construct using monitoring.Monitoring.SubscriptionID.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (subsIdBuilder_ == null) { - subsId_ = null; - } else { - subsId_ = null; + bitField0_ = 0; + subsId_ = null; + if (subsIdBuilder_ != null) { + subsIdBuilder_.dispose(); subsIdBuilder_ = null; } return this; @@ -14396,43 +13806,18 @@ public final class Monitoring { @java.lang.Override public monitoring.Monitoring.SubscriptionID buildPartial() { monitoring.Monitoring.SubscriptionID result = new monitoring.Monitoring.SubscriptionID(this); - if (subsIdBuilder_ == null) { - result.subsId_ = subsId_; - } else { - result.subsId_ = subsIdBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(monitoring.Monitoring.SubscriptionID result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.subsId_ = subsIdBuilder_ == null ? subsId_ : subsIdBuilder_.build(); + } } @java.lang.Override @@ -14451,7 +13836,7 @@ public final class Monitoring { if (other.hasSubsId()) { mergeSubsId(other.getSubsId()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -14463,20 +13848,47 @@ public final class Monitoring { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - monitoring.Monitoring.SubscriptionID parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getSubsIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.SubscriptionID) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.Uuid subsId_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> subsIdBuilder_; @@ -14486,7 +13898,7 @@ public final class Monitoring { * @return Whether the subsId field is set. */ public boolean hasSubsId() { - return subsIdBuilder_ != null || subsId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -14510,10 +13922,11 @@ public final class Monitoring { throw new NullPointerException(); } subsId_ = value; - onChanged(); } else { subsIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -14523,10 +13936,11 @@ public final class Monitoring { public Builder setSubsId(context.ContextOuterClass.Uuid.Builder builderForValue) { if (subsIdBuilder_ == null) { subsId_ = builderForValue.build(); - onChanged(); } else { subsIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -14535,15 +13949,16 @@ public final class Monitoring { */ public Builder mergeSubsId(context.ContextOuterClass.Uuid value) { if (subsIdBuilder_ == null) { - if (subsId_ != null) { - subsId_ = context.ContextOuterClass.Uuid.newBuilder(subsId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && subsId_ != null && subsId_ != context.ContextOuterClass.Uuid.getDefaultInstance()) { + getSubsIdBuilder().mergeFrom(value); } else { subsId_ = value; } - onChanged(); } else { subsIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -14551,13 +13966,13 @@ public final class Monitoring { * <code>.context.Uuid subs_id = 1;</code> */ public Builder clearSubsId() { - if (subsIdBuilder_ == null) { - subsId_ = null; - onChanged(); - } else { - subsId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + subsId_ = null; + if (subsIdBuilder_ != null) { + subsIdBuilder_.dispose(); subsIdBuilder_ = null; } + onChanged(); return this; } @@ -14565,6 +13980,7 @@ public final class Monitoring { * <code>.context.Uuid subs_id = 1;</code> */ public context.ContextOuterClass.Uuid.Builder getSubsIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getSubsIdFieldBuilder().getBuilder(); } @@ -14618,7 +14034,17 @@ public final class Monitoring { @java.lang.Override public SubscriptionID parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SubscriptionID(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -14697,70 +14123,6 @@ public final class Monitoring { return new SubsResponse(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private SubsResponse(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - monitoring.Monitoring.SubscriptionID.Builder subBuilder = null; - if (subsId_ != null) { - subBuilder = subsId_.toBuilder(); - } - subsId_ = input.readMessage(monitoring.Monitoring.SubscriptionID.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(subsId_); - subsId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - monitoring.Monitoring.KpiList.Builder subBuilder = null; - if (kpiList_ != null) { - subBuilder = kpiList_.toBuilder(); - } - kpiList_ = input.readMessage(monitoring.Monitoring.KpiList.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(kpiList_); - kpiList_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return monitoring.Monitoring.internal_static_monitoring_SubsResponse_descriptor; } @@ -14797,7 +14159,7 @@ public final class Monitoring { */ @java.lang.Override public monitoring.Monitoring.SubscriptionIDOrBuilder getSubsIdOrBuilder() { - return getSubsId(); + return subsId_ == null ? monitoring.Monitoring.SubscriptionID.getDefaultInstance() : subsId_; } public static final int KPI_LIST_FIELD_NUMBER = 2; @@ -14827,7 +14189,7 @@ public final class Monitoring { */ @java.lang.Override public monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder() { - return getKpiList(); + return kpiList_ == null ? monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; } private byte memoizedIsInitialized = -1; @@ -14851,7 +14213,7 @@ public final class Monitoring { if (kpiList_ != null) { output.writeMessage(2, getKpiList()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -14866,7 +14228,7 @@ public final class Monitoring { if (kpiList_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getKpiList()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -14892,7 +14254,7 @@ public final class Monitoring { if (!getKpiList().equals(other.getKpiList())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -14912,7 +14274,7 @@ public final class Monitoring { hash = (37 * hash) + KPI_LIST_FIELD_NUMBER; hash = (53 * hash) + getKpiList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -15006,32 +14368,24 @@ public final class Monitoring { // Construct using monitoring.Monitoring.SubsResponse.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (subsIdBuilder_ == null) { - subsId_ = null; - } else { - subsId_ = null; + bitField0_ = 0; + subsId_ = null; + if (subsIdBuilder_ != null) { + subsIdBuilder_.dispose(); subsIdBuilder_ = null; } - if (kpiListBuilder_ == null) { - kpiList_ = null; - } else { - kpiList_ = null; + kpiList_ = null; + if (kpiListBuilder_ != null) { + kpiListBuilder_.dispose(); kpiListBuilder_ = null; } return this; @@ -15059,48 +14413,21 @@ public final class Monitoring { @java.lang.Override public monitoring.Monitoring.SubsResponse buildPartial() { monitoring.Monitoring.SubsResponse result = new monitoring.Monitoring.SubsResponse(this); - if (subsIdBuilder_ == null) { - result.subsId_ = subsId_; - } else { - result.subsId_ = subsIdBuilder_.build(); - } - if (kpiListBuilder_ == null) { - result.kpiList_ = kpiList_; - } else { - result.kpiList_ = kpiListBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(monitoring.Monitoring.SubsResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.subsId_ = subsIdBuilder_ == null ? subsId_ : subsIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.kpiList_ = kpiListBuilder_ == null ? kpiList_ : kpiListBuilder_.build(); + } } @java.lang.Override @@ -15122,7 +14449,7 @@ public final class Monitoring { if (other.hasKpiList()) { mergeKpiList(other.getKpiList()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -15134,20 +14461,54 @@ public final class Monitoring { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - monitoring.Monitoring.SubsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getSubsIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + input.readMessage(getKpiListFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } + // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.SubsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private monitoring.Monitoring.SubscriptionID subsId_; private com.google.protobuf.SingleFieldBuilderV3<monitoring.Monitoring.SubscriptionID, monitoring.Monitoring.SubscriptionID.Builder, monitoring.Monitoring.SubscriptionIDOrBuilder> subsIdBuilder_; @@ -15157,7 +14518,7 @@ public final class Monitoring { * @return Whether the subsId field is set. */ public boolean hasSubsId() { - return subsIdBuilder_ != null || subsId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -15181,10 +14542,11 @@ public final class Monitoring { throw new NullPointerException(); } subsId_ = value; - onChanged(); } else { subsIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -15194,10 +14556,11 @@ public final class Monitoring { public Builder setSubsId(monitoring.Monitoring.SubscriptionID.Builder builderForValue) { if (subsIdBuilder_ == null) { subsId_ = builderForValue.build(); - onChanged(); } else { subsIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -15206,15 +14569,16 @@ public final class Monitoring { */ public Builder mergeSubsId(monitoring.Monitoring.SubscriptionID value) { if (subsIdBuilder_ == null) { - if (subsId_ != null) { - subsId_ = monitoring.Monitoring.SubscriptionID.newBuilder(subsId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && subsId_ != null && subsId_ != monitoring.Monitoring.SubscriptionID.getDefaultInstance()) { + getSubsIdBuilder().mergeFrom(value); } else { subsId_ = value; } - onChanged(); } else { subsIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -15222,13 +14586,13 @@ public final class Monitoring { * <code>.monitoring.SubscriptionID subs_id = 1;</code> */ public Builder clearSubsId() { - if (subsIdBuilder_ == null) { - subsId_ = null; - onChanged(); - } else { - subsId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + subsId_ = null; + if (subsIdBuilder_ != null) { + subsIdBuilder_.dispose(); subsIdBuilder_ = null; } + onChanged(); return this; } @@ -15236,6 +14600,7 @@ public final class Monitoring { * <code>.monitoring.SubscriptionID subs_id = 1;</code> */ public monitoring.Monitoring.SubscriptionID.Builder getSubsIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getSubsIdFieldBuilder().getBuilder(); } @@ -15271,7 +14636,7 @@ public final class Monitoring { * @return Whether the kpiList field is set. */ public boolean hasKpiList() { - return kpiListBuilder_ != null || kpiList_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** @@ -15295,10 +14660,11 @@ public final class Monitoring { throw new NullPointerException(); } kpiList_ = value; - onChanged(); } else { kpiListBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -15308,10 +14674,11 @@ public final class Monitoring { public Builder setKpiList(monitoring.Monitoring.KpiList.Builder builderForValue) { if (kpiListBuilder_ == null) { kpiList_ = builderForValue.build(); - onChanged(); } else { kpiListBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -15320,15 +14687,16 @@ public final class Monitoring { */ public Builder mergeKpiList(monitoring.Monitoring.KpiList value) { if (kpiListBuilder_ == null) { - if (kpiList_ != null) { - kpiList_ = monitoring.Monitoring.KpiList.newBuilder(kpiList_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000002) != 0) && kpiList_ != null && kpiList_ != monitoring.Monitoring.KpiList.getDefaultInstance()) { + getKpiListBuilder().mergeFrom(value); } else { kpiList_ = value; } - onChanged(); } else { kpiListBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -15336,13 +14704,13 @@ public final class Monitoring { * <code>.monitoring.KpiList kpi_list = 2;</code> */ public Builder clearKpiList() { - if (kpiListBuilder_ == null) { - kpiList_ = null; - onChanged(); - } else { - kpiList_ = null; + bitField0_ = (bitField0_ & ~0x00000002); + kpiList_ = null; + if (kpiListBuilder_ != null) { + kpiListBuilder_.dispose(); kpiListBuilder_ = null; } + onChanged(); return this; } @@ -15350,6 +14718,7 @@ public final class Monitoring { * <code>.monitoring.KpiList kpi_list = 2;</code> */ public monitoring.Monitoring.KpiList.Builder getKpiListBuilder() { + bitField0_ |= 0x00000002; onChanged(); return getKpiListFieldBuilder().getBuilder(); } @@ -15403,7 +14772,17 @@ public final class Monitoring { @java.lang.Override public SubsResponse parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SubsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -15460,69 +14839,18 @@ public final class Monitoring { private static final long serialVersionUID = 0L; // Use SubsList.newBuilder() to construct. - private SubsList(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { - super(builder); - } - - private SubsList() { - subsDescriptor_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({ "unused" }) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new SubsList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private SubsList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - subsDescriptor_ = new java.util.ArrayList<monitoring.Monitoring.SubsDescriptor>(); - mutable_bitField0_ |= 0x00000001; - } - subsDescriptor_.add(input.readMessage(monitoring.Monitoring.SubsDescriptor.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - subsDescriptor_ = java.util.Collections.unmodifiableList(subsDescriptor_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } + private SubsList(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + + private SubsList() { + subsDescriptor_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({ "unused" }) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SubsList(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -15536,6 +14864,7 @@ public final class Monitoring { public static final int SUBS_DESCRIPTOR_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List<monitoring.Monitoring.SubsDescriptor> subsDescriptor_; /** @@ -15596,7 +14925,7 @@ public final class Monitoring { for (int i = 0; i < subsDescriptor_.size(); i++) { output.writeMessage(1, subsDescriptor_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -15608,7 +14937,7 @@ public final class Monitoring { for (int i = 0; i < subsDescriptor_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, subsDescriptor_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -15624,7 +14953,7 @@ public final class Monitoring { monitoring.Monitoring.SubsList other = (monitoring.Monitoring.SubsList) obj; if (!getSubsDescriptorList().equals(other.getSubsDescriptorList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -15640,7 +14969,7 @@ public final class Monitoring { hash = (37 * hash) + SUBS_DESCRIPTOR_FIELD_NUMBER; hash = (53 * hash) + getSubsDescriptorList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -15734,29 +15063,23 @@ public final class Monitoring { // Construct using monitoring.Monitoring.SubsList.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getSubsDescriptorFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (subsDescriptorBuilder_ == null) { subsDescriptor_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + subsDescriptor_ = null; subsDescriptorBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -15782,7 +15105,15 @@ public final class Monitoring { @java.lang.Override public monitoring.Monitoring.SubsList buildPartial() { monitoring.Monitoring.SubsList result = new monitoring.Monitoring.SubsList(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(monitoring.Monitoring.SubsList result) { if (subsDescriptorBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { subsDescriptor_ = java.util.Collections.unmodifiableList(subsDescriptor_); @@ -15792,38 +15123,10 @@ public final class Monitoring { } else { result.subsDescriptor_ = subsDescriptorBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); } - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(monitoring.Monitoring.SubsList result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -15863,7 +15166,7 @@ public final class Monitoring { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -15875,17 +15178,47 @@ public final class Monitoring { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - monitoring.Monitoring.SubsList parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + monitoring.Monitoring.SubsDescriptor m = input.readMessage(monitoring.Monitoring.SubsDescriptor.parser(), extensionRegistry); + if (subsDescriptorBuilder_ == null) { + ensureSubsDescriptorIsMutable(); + subsDescriptor_.add(m); + } else { + subsDescriptorBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.SubsList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -16155,7 +15488,17 @@ public final class Monitoring { @java.lang.Override public SubsList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SubsList(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -16294,108 +15637,6 @@ public final class Monitoring { return new AlarmDescriptor(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private AlarmDescriptor(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - monitoring.Monitoring.AlarmID.Builder subBuilder = null; - if (alarmId_ != null) { - subBuilder = alarmId_.toBuilder(); - } - alarmId_ = input.readMessage(monitoring.Monitoring.AlarmID.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(alarmId_); - alarmId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - alarmDescription_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - name_ = s; - break; - } - case 34: - { - monitoring.Monitoring.KpiId.Builder subBuilder = null; - if (kpiId_ != null) { - subBuilder = kpiId_.toBuilder(); - } - kpiId_ = input.readMessage(monitoring.Monitoring.KpiId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(kpiId_); - kpiId_ = subBuilder.buildPartial(); - } - break; - } - case 42: - { - monitoring.Monitoring.KpiValueRange.Builder subBuilder = null; - if (kpiValueRange_ != null) { - subBuilder = kpiValueRange_.toBuilder(); - } - kpiValueRange_ = input.readMessage(monitoring.Monitoring.KpiValueRange.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(kpiValueRange_); - kpiValueRange_ = subBuilder.buildPartial(); - } - break; - } - case 50: - { - context.ContextOuterClass.Timestamp.Builder subBuilder = null; - if (timestamp_ != null) { - subBuilder = timestamp_.toBuilder(); - } - timestamp_ = input.readMessage(context.ContextOuterClass.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(timestamp_); - timestamp_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return monitoring.Monitoring.internal_static_monitoring_AlarmDescriptor_descriptor; } @@ -16432,12 +15673,13 @@ public final class Monitoring { */ @java.lang.Override public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder() { - return getAlarmId(); + return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; } public static final int ALARM_DESCRIPTION_FIELD_NUMBER = 2; - private volatile java.lang.Object alarmDescription_; + @SuppressWarnings("serial") + private volatile java.lang.Object alarmDescription_ = ""; /** * <code>string alarm_description = 2;</code> @@ -16474,7 +15716,8 @@ public final class Monitoring { public static final int NAME_FIELD_NUMBER = 3; - private volatile java.lang.Object name_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** * <code>string name = 3;</code> @@ -16536,7 +15779,7 @@ public final class Monitoring { */ @java.lang.Override public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - return getKpiId(); + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; } public static final int KPI_VALUE_RANGE_FIELD_NUMBER = 5; @@ -16566,7 +15809,7 @@ public final class Monitoring { */ @java.lang.Override public monitoring.Monitoring.KpiValueRangeOrBuilder getKpiValueRangeOrBuilder() { - return getKpiValueRange(); + return kpiValueRange_ == null ? monitoring.Monitoring.KpiValueRange.getDefaultInstance() : kpiValueRange_; } public static final int TIMESTAMP_FIELD_NUMBER = 6; @@ -16596,7 +15839,7 @@ public final class Monitoring { */ @java.lang.Override public context.ContextOuterClass.TimestampOrBuilder getTimestampOrBuilder() { - return getTimestamp(); + return timestamp_ == null ? context.ContextOuterClass.Timestamp.getDefaultInstance() : timestamp_; } private byte memoizedIsInitialized = -1; @@ -16617,10 +15860,10 @@ public final class Monitoring { if (alarmId_ != null) { output.writeMessage(1, getAlarmId()); } - if (!getAlarmDescriptionBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(alarmDescription_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, alarmDescription_); } - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); } if (kpiId_ != null) { @@ -16632,7 +15875,7 @@ public final class Monitoring { if (timestamp_ != null) { output.writeMessage(6, getTimestamp()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -16644,10 +15887,10 @@ public final class Monitoring { if (alarmId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAlarmId()); } - if (!getAlarmDescriptionBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(alarmDescription_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, alarmDescription_); } - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_); } if (kpiId_ != null) { @@ -16659,7 +15902,7 @@ public final class Monitoring { if (timestamp_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getTimestamp()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -16701,7 +15944,7 @@ public final class Monitoring { if (!getTimestamp().equals(other.getTimestamp())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -16733,7 +15976,7 @@ public final class Monitoring { hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; hash = (53 * hash) + getTimestamp().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -16827,46 +16070,36 @@ public final class Monitoring { // Construct using monitoring.Monitoring.AlarmDescriptor.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (alarmIdBuilder_ == null) { - alarmId_ = null; - } else { - alarmId_ = null; + bitField0_ = 0; + alarmId_ = null; + if (alarmIdBuilder_ != null) { + alarmIdBuilder_.dispose(); alarmIdBuilder_ = null; } alarmDescription_ = ""; name_ = ""; - if (kpiIdBuilder_ == null) { - kpiId_ = null; - } else { - kpiId_ = null; + kpiId_ = null; + if (kpiIdBuilder_ != null) { + kpiIdBuilder_.dispose(); kpiIdBuilder_ = null; } - if (kpiValueRangeBuilder_ == null) { - kpiValueRange_ = null; - } else { - kpiValueRange_ = null; + kpiValueRange_ = null; + if (kpiValueRangeBuilder_ != null) { + kpiValueRangeBuilder_.dispose(); kpiValueRangeBuilder_ = null; } - if (timestampBuilder_ == null) { - timestamp_ = null; - } else { - timestamp_ = null; + timestamp_ = null; + if (timestampBuilder_ != null) { + timestampBuilder_.dispose(); timestampBuilder_ = null; } return this; @@ -16894,60 +16127,33 @@ public final class Monitoring { @java.lang.Override public monitoring.Monitoring.AlarmDescriptor buildPartial() { monitoring.Monitoring.AlarmDescriptor result = new monitoring.Monitoring.AlarmDescriptor(this); - if (alarmIdBuilder_ == null) { - result.alarmId_ = alarmId_; - } else { - result.alarmId_ = alarmIdBuilder_.build(); - } - result.alarmDescription_ = alarmDescription_; - result.name_ = name_; - if (kpiIdBuilder_ == null) { - result.kpiId_ = kpiId_; - } else { - result.kpiId_ = kpiIdBuilder_.build(); - } - if (kpiValueRangeBuilder_ == null) { - result.kpiValueRange_ = kpiValueRange_; - } else { - result.kpiValueRange_ = kpiValueRangeBuilder_.build(); - } - if (timestampBuilder_ == null) { - result.timestamp_ = timestamp_; - } else { - result.timestamp_ = timestampBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(monitoring.Monitoring.AlarmDescriptor result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.alarmId_ = alarmIdBuilder_ == null ? alarmId_ : alarmIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.alarmDescription_ = alarmDescription_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.kpiId_ = kpiIdBuilder_ == null ? kpiId_ : kpiIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.kpiValueRange_ = kpiValueRangeBuilder_ == null ? kpiValueRange_ : kpiValueRangeBuilder_.build(); + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.timestamp_ = timestampBuilder_ == null ? timestamp_ : timestampBuilder_.build(); + } } @java.lang.Override @@ -16968,10 +16174,12 @@ public final class Monitoring { } if (!other.getAlarmDescription().isEmpty()) { alarmDescription_ = other.alarmDescription_; + bitField0_ |= 0x00000002; onChanged(); } if (!other.getName().isEmpty()) { name_ = other.name_; + bitField0_ |= 0x00000004; onChanged(); } if (other.hasKpiId()) { @@ -16983,7 +16191,7 @@ public final class Monitoring { if (other.hasTimestamp()) { mergeTimestamp(other.getTimestamp()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -16995,20 +16203,82 @@ public final class Monitoring { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - monitoring.Monitoring.AlarmDescriptor parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getAlarmIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + alarmDescription_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 26: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } + // case 26 + case 34: + { + input.readMessage(getKpiIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } + // case 34 + case 42: + { + input.readMessage(getKpiValueRangeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } + // case 42 + case 50: + { + input.readMessage(getTimestampFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } + // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.AlarmDescriptor) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private monitoring.Monitoring.AlarmID alarmId_; private com.google.protobuf.SingleFieldBuilderV3<monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder> alarmIdBuilder_; @@ -17018,7 +16288,7 @@ public final class Monitoring { * @return Whether the alarmId field is set. */ public boolean hasAlarmId() { - return alarmIdBuilder_ != null || alarmId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -17042,10 +16312,11 @@ public final class Monitoring { throw new NullPointerException(); } alarmId_ = value; - onChanged(); } else { alarmIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -17055,10 +16326,11 @@ public final class Monitoring { public Builder setAlarmId(monitoring.Monitoring.AlarmID.Builder builderForValue) { if (alarmIdBuilder_ == null) { alarmId_ = builderForValue.build(); - onChanged(); } else { alarmIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -17067,15 +16339,16 @@ public final class Monitoring { */ public Builder mergeAlarmId(monitoring.Monitoring.AlarmID value) { if (alarmIdBuilder_ == null) { - if (alarmId_ != null) { - alarmId_ = monitoring.Monitoring.AlarmID.newBuilder(alarmId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && alarmId_ != null && alarmId_ != monitoring.Monitoring.AlarmID.getDefaultInstance()) { + getAlarmIdBuilder().mergeFrom(value); } else { alarmId_ = value; } - onChanged(); } else { alarmIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -17083,13 +16356,13 @@ public final class Monitoring { * <code>.monitoring.AlarmID alarm_id = 1;</code> */ public Builder clearAlarmId() { - if (alarmIdBuilder_ == null) { - alarmId_ = null; - onChanged(); - } else { - alarmId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + alarmId_ = null; + if (alarmIdBuilder_ != null) { + alarmIdBuilder_.dispose(); alarmIdBuilder_ = null; } + onChanged(); return this; } @@ -17097,6 +16370,7 @@ public final class Monitoring { * <code>.monitoring.AlarmID alarm_id = 1;</code> */ public monitoring.Monitoring.AlarmID.Builder getAlarmIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getAlarmIdFieldBuilder().getBuilder(); } @@ -17166,6 +16440,7 @@ public final class Monitoring { throw new NullPointerException(); } alarmDescription_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -17176,6 +16451,7 @@ public final class Monitoring { */ public Builder clearAlarmDescription() { alarmDescription_ = getDefaultInstance().getAlarmDescription(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -17191,6 +16467,7 @@ public final class Monitoring { } checkByteStringIsUtf8(value); alarmDescription_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -17238,6 +16515,7 @@ public final class Monitoring { throw new NullPointerException(); } name_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -17248,6 +16526,7 @@ public final class Monitoring { */ public Builder clearName() { name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } @@ -17263,6 +16542,7 @@ public final class Monitoring { } checkByteStringIsUtf8(value); name_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -17276,7 +16556,7 @@ public final class Monitoring { * @return Whether the kpiId field is set. */ public boolean hasKpiId() { - return kpiIdBuilder_ != null || kpiId_ != null; + return ((bitField0_ & 0x00000008) != 0); } /** @@ -17300,10 +16580,11 @@ public final class Monitoring { throw new NullPointerException(); } kpiId_ = value; - onChanged(); } else { kpiIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000008; + onChanged(); return this; } @@ -17313,10 +16594,11 @@ public final class Monitoring { public Builder setKpiId(monitoring.Monitoring.KpiId.Builder builderForValue) { if (kpiIdBuilder_ == null) { kpiId_ = builderForValue.build(); - onChanged(); } else { kpiIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000008; + onChanged(); return this; } @@ -17325,15 +16607,16 @@ public final class Monitoring { */ public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { if (kpiIdBuilder_ == null) { - if (kpiId_ != null) { - kpiId_ = monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000008) != 0) && kpiId_ != null && kpiId_ != monitoring.Monitoring.KpiId.getDefaultInstance()) { + getKpiIdBuilder().mergeFrom(value); } else { kpiId_ = value; } - onChanged(); } else { kpiIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000008; + onChanged(); return this; } @@ -17341,13 +16624,13 @@ public final class Monitoring { * <code>.monitoring.KpiId kpi_id = 4;</code> */ public Builder clearKpiId() { - if (kpiIdBuilder_ == null) { - kpiId_ = null; - onChanged(); - } else { - kpiId_ = null; + bitField0_ = (bitField0_ & ~0x00000008); + kpiId_ = null; + if (kpiIdBuilder_ != null) { + kpiIdBuilder_.dispose(); kpiIdBuilder_ = null; } + onChanged(); return this; } @@ -17355,6 +16638,7 @@ public final class Monitoring { * <code>.monitoring.KpiId kpi_id = 4;</code> */ public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { + bitField0_ |= 0x00000008; onChanged(); return getKpiIdFieldBuilder().getBuilder(); } @@ -17390,7 +16674,7 @@ public final class Monitoring { * @return Whether the kpiValueRange field is set. */ public boolean hasKpiValueRange() { - return kpiValueRangeBuilder_ != null || kpiValueRange_ != null; + return ((bitField0_ & 0x00000010) != 0); } /** @@ -17414,10 +16698,11 @@ public final class Monitoring { throw new NullPointerException(); } kpiValueRange_ = value; - onChanged(); } else { kpiValueRangeBuilder_.setMessage(value); } + bitField0_ |= 0x00000010; + onChanged(); return this; } @@ -17427,10 +16712,11 @@ public final class Monitoring { public Builder setKpiValueRange(monitoring.Monitoring.KpiValueRange.Builder builderForValue) { if (kpiValueRangeBuilder_ == null) { kpiValueRange_ = builderForValue.build(); - onChanged(); } else { kpiValueRangeBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000010; + onChanged(); return this; } @@ -17439,15 +16725,16 @@ public final class Monitoring { */ public Builder mergeKpiValueRange(monitoring.Monitoring.KpiValueRange value) { if (kpiValueRangeBuilder_ == null) { - if (kpiValueRange_ != null) { - kpiValueRange_ = monitoring.Monitoring.KpiValueRange.newBuilder(kpiValueRange_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000010) != 0) && kpiValueRange_ != null && kpiValueRange_ != monitoring.Monitoring.KpiValueRange.getDefaultInstance()) { + getKpiValueRangeBuilder().mergeFrom(value); } else { kpiValueRange_ = value; } - onChanged(); } else { kpiValueRangeBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000010; + onChanged(); return this; } @@ -17455,13 +16742,13 @@ public final class Monitoring { * <code>.monitoring.KpiValueRange kpi_value_range = 5;</code> */ public Builder clearKpiValueRange() { - if (kpiValueRangeBuilder_ == null) { - kpiValueRange_ = null; - onChanged(); - } else { - kpiValueRange_ = null; + bitField0_ = (bitField0_ & ~0x00000010); + kpiValueRange_ = null; + if (kpiValueRangeBuilder_ != null) { + kpiValueRangeBuilder_.dispose(); kpiValueRangeBuilder_ = null; } + onChanged(); return this; } @@ -17469,6 +16756,7 @@ public final class Monitoring { * <code>.monitoring.KpiValueRange kpi_value_range = 5;</code> */ public monitoring.Monitoring.KpiValueRange.Builder getKpiValueRangeBuilder() { + bitField0_ |= 0x00000010; onChanged(); return getKpiValueRangeFieldBuilder().getBuilder(); } @@ -17504,7 +16792,7 @@ public final class Monitoring { * @return Whether the timestamp field is set. */ public boolean hasTimestamp() { - return timestampBuilder_ != null || timestamp_ != null; + return ((bitField0_ & 0x00000020) != 0); } /** @@ -17528,10 +16816,11 @@ public final class Monitoring { throw new NullPointerException(); } timestamp_ = value; - onChanged(); } else { timestampBuilder_.setMessage(value); } + bitField0_ |= 0x00000020; + onChanged(); return this; } @@ -17541,10 +16830,11 @@ public final class Monitoring { public Builder setTimestamp(context.ContextOuterClass.Timestamp.Builder builderForValue) { if (timestampBuilder_ == null) { timestamp_ = builderForValue.build(); - onChanged(); } else { timestampBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000020; + onChanged(); return this; } @@ -17553,15 +16843,16 @@ public final class Monitoring { */ public Builder mergeTimestamp(context.ContextOuterClass.Timestamp value) { if (timestampBuilder_ == null) { - if (timestamp_ != null) { - timestamp_ = context.ContextOuterClass.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000020) != 0) && timestamp_ != null && timestamp_ != context.ContextOuterClass.Timestamp.getDefaultInstance()) { + getTimestampBuilder().mergeFrom(value); } else { timestamp_ = value; } - onChanged(); } else { timestampBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000020; + onChanged(); return this; } @@ -17569,13 +16860,13 @@ public final class Monitoring { * <code>.context.Timestamp timestamp = 6;</code> */ public Builder clearTimestamp() { - if (timestampBuilder_ == null) { - timestamp_ = null; - onChanged(); - } else { - timestamp_ = null; + bitField0_ = (bitField0_ & ~0x00000020); + timestamp_ = null; + if (timestampBuilder_ != null) { + timestampBuilder_.dispose(); timestampBuilder_ = null; } + onChanged(); return this; } @@ -17583,6 +16874,7 @@ public final class Monitoring { * <code>.context.Timestamp timestamp = 6;</code> */ public context.ContextOuterClass.Timestamp.Builder getTimestampBuilder() { + bitField0_ |= 0x00000020; onChanged(); return getTimestampFieldBuilder().getBuilder(); } @@ -17636,7 +16928,17 @@ public final class Monitoring { @java.lang.Override public AlarmDescriptor parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AlarmDescriptor(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -17698,57 +17000,6 @@ public final class Monitoring { return new AlarmID(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private AlarmID(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.Uuid.Builder subBuilder = null; - if (alarmId_ != null) { - subBuilder = alarmId_.toBuilder(); - } - alarmId_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(alarmId_); - alarmId_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return monitoring.Monitoring.internal_static_monitoring_AlarmID_descriptor; } @@ -17785,7 +17036,7 @@ public final class Monitoring { */ @java.lang.Override public context.ContextOuterClass.UuidOrBuilder getAlarmIdOrBuilder() { - return getAlarmId(); + return alarmId_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : alarmId_; } private byte memoizedIsInitialized = -1; @@ -17806,7 +17057,7 @@ public final class Monitoring { if (alarmId_ != null) { output.writeMessage(1, getAlarmId()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -17818,7 +17069,7 @@ public final class Monitoring { if (alarmId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAlarmId()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -17838,7 +17089,7 @@ public final class Monitoring { if (!getAlarmId().equals(other.getAlarmId())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -17854,7 +17105,7 @@ public final class Monitoring { hash = (37 * hash) + ALARM_ID_FIELD_NUMBER; hash = (53 * hash) + getAlarmId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -17948,26 +17199,19 @@ public final class Monitoring { // Construct using monitoring.Monitoring.AlarmID.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (alarmIdBuilder_ == null) { - alarmId_ = null; - } else { - alarmId_ = null; + bitField0_ = 0; + alarmId_ = null; + if (alarmIdBuilder_ != null) { + alarmIdBuilder_.dispose(); alarmIdBuilder_ = null; } return this; @@ -17995,43 +17239,18 @@ public final class Monitoring { @java.lang.Override public monitoring.Monitoring.AlarmID buildPartial() { monitoring.Monitoring.AlarmID result = new monitoring.Monitoring.AlarmID(this); - if (alarmIdBuilder_ == null) { - result.alarmId_ = alarmId_; - } else { - result.alarmId_ = alarmIdBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(monitoring.Monitoring.AlarmID result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.alarmId_ = alarmIdBuilder_ == null ? alarmId_ : alarmIdBuilder_.build(); + } } @java.lang.Override @@ -18050,7 +17269,7 @@ public final class Monitoring { if (other.hasAlarmId()) { mergeAlarmId(other.getAlarmId()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -18062,20 +17281,47 @@ public final class Monitoring { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - monitoring.Monitoring.AlarmID parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getAlarmIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.AlarmID) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.Uuid alarmId_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> alarmIdBuilder_; @@ -18085,7 +17331,7 @@ public final class Monitoring { * @return Whether the alarmId field is set. */ public boolean hasAlarmId() { - return alarmIdBuilder_ != null || alarmId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -18109,10 +17355,11 @@ public final class Monitoring { throw new NullPointerException(); } alarmId_ = value; - onChanged(); } else { alarmIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -18122,10 +17369,11 @@ public final class Monitoring { public Builder setAlarmId(context.ContextOuterClass.Uuid.Builder builderForValue) { if (alarmIdBuilder_ == null) { alarmId_ = builderForValue.build(); - onChanged(); } else { alarmIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -18134,15 +17382,16 @@ public final class Monitoring { */ public Builder mergeAlarmId(context.ContextOuterClass.Uuid value) { if (alarmIdBuilder_ == null) { - if (alarmId_ != null) { - alarmId_ = context.ContextOuterClass.Uuid.newBuilder(alarmId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && alarmId_ != null && alarmId_ != context.ContextOuterClass.Uuid.getDefaultInstance()) { + getAlarmIdBuilder().mergeFrom(value); } else { alarmId_ = value; } - onChanged(); } else { alarmIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -18150,13 +17399,13 @@ public final class Monitoring { * <code>.context.Uuid alarm_id = 1;</code> */ public Builder clearAlarmId() { - if (alarmIdBuilder_ == null) { - alarmId_ = null; - onChanged(); - } else { - alarmId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + alarmId_ = null; + if (alarmIdBuilder_ != null) { + alarmIdBuilder_.dispose(); alarmIdBuilder_ = null; } + onChanged(); return this; } @@ -18164,6 +17413,7 @@ public final class Monitoring { * <code>.context.Uuid alarm_id = 1;</code> */ public context.ContextOuterClass.Uuid.Builder getAlarmIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getAlarmIdFieldBuilder().getBuilder(); } @@ -18217,7 +17467,17 @@ public final class Monitoring { @java.lang.Override public AlarmID parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AlarmID(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -18291,67 +17551,6 @@ public final class Monitoring { return new AlarmSubscription(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private AlarmSubscription(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - monitoring.Monitoring.AlarmID.Builder subBuilder = null; - if (alarmId_ != null) { - subBuilder = alarmId_.toBuilder(); - } - alarmId_ = input.readMessage(monitoring.Monitoring.AlarmID.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(alarmId_); - alarmId_ = subBuilder.buildPartial(); - } - break; - } - case 21: - { - subscriptionTimeoutS_ = input.readFloat(); - break; - } - case 29: - { - subscriptionFrequencyMs_ = input.readFloat(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return monitoring.Monitoring.internal_static_monitoring_AlarmSubscription_descriptor; } @@ -18388,12 +17587,12 @@ public final class Monitoring { */ @java.lang.Override public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder() { - return getAlarmId(); + return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; } public static final int SUBSCRIPTION_TIMEOUT_S_FIELD_NUMBER = 2; - private float subscriptionTimeoutS_; + private float subscriptionTimeoutS_ = 0F; /** * <code>float subscription_timeout_s = 2;</code> @@ -18406,7 +17605,7 @@ public final class Monitoring { public static final int SUBSCRIPTION_FREQUENCY_MS_FIELD_NUMBER = 3; - private float subscriptionFrequencyMs_; + private float subscriptionFrequencyMs_ = 0F; /** * <code>float subscription_frequency_ms = 3;</code> @@ -18435,13 +17634,13 @@ public final class Monitoring { if (alarmId_ != null) { output.writeMessage(1, getAlarmId()); } - if (subscriptionTimeoutS_ != 0F) { + if (java.lang.Float.floatToRawIntBits(subscriptionTimeoutS_) != 0) { output.writeFloat(2, subscriptionTimeoutS_); } - if (subscriptionFrequencyMs_ != 0F) { + if (java.lang.Float.floatToRawIntBits(subscriptionFrequencyMs_) != 0) { output.writeFloat(3, subscriptionFrequencyMs_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -18453,13 +17652,13 @@ public final class Monitoring { if (alarmId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAlarmId()); } - if (subscriptionTimeoutS_ != 0F) { + if (java.lang.Float.floatToRawIntBits(subscriptionTimeoutS_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, subscriptionTimeoutS_); } - if (subscriptionFrequencyMs_ != 0F) { + if (java.lang.Float.floatToRawIntBits(subscriptionFrequencyMs_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, subscriptionFrequencyMs_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -18483,7 +17682,7 @@ public final class Monitoring { return false; if (java.lang.Float.floatToIntBits(getSubscriptionFrequencyMs()) != java.lang.Float.floatToIntBits(other.getSubscriptionFrequencyMs())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -18503,7 +17702,7 @@ public final class Monitoring { hash = (53 * hash) + java.lang.Float.floatToIntBits(getSubscriptionTimeoutS()); hash = (37 * hash) + SUBSCRIPTION_FREQUENCY_MS_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits(getSubscriptionFrequencyMs()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -18597,26 +17796,19 @@ public final class Monitoring { // Construct using monitoring.Monitoring.AlarmSubscription.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (alarmIdBuilder_ == null) { - alarmId_ = null; - } else { - alarmId_ = null; + bitField0_ = 0; + alarmId_ = null; + if (alarmIdBuilder_ != null) { + alarmIdBuilder_.dispose(); alarmIdBuilder_ = null; } subscriptionTimeoutS_ = 0F; @@ -18646,45 +17838,24 @@ public final class Monitoring { @java.lang.Override public monitoring.Monitoring.AlarmSubscription buildPartial() { monitoring.Monitoring.AlarmSubscription result = new monitoring.Monitoring.AlarmSubscription(this); - if (alarmIdBuilder_ == null) { - result.alarmId_ = alarmId_; - } else { - result.alarmId_ = alarmIdBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } - result.subscriptionTimeoutS_ = subscriptionTimeoutS_; - result.subscriptionFrequencyMs_ = subscriptionFrequencyMs_; onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(monitoring.Monitoring.AlarmSubscription result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.alarmId_ = alarmIdBuilder_ == null ? alarmId_ : alarmIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.subscriptionTimeoutS_ = subscriptionTimeoutS_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.subscriptionFrequencyMs_ = subscriptionFrequencyMs_; + } } @java.lang.Override @@ -18709,7 +17880,7 @@ public final class Monitoring { if (other.getSubscriptionFrequencyMs() != 0F) { setSubscriptionFrequencyMs(other.getSubscriptionFrequencyMs()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -18721,20 +17892,61 @@ public final class Monitoring { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - monitoring.Monitoring.AlarmSubscription parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getAlarmIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 21: + { + subscriptionTimeoutS_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } + // case 21 + case 29: + { + subscriptionFrequencyMs_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } + // case 29 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.AlarmSubscription) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private monitoring.Monitoring.AlarmID alarmId_; private com.google.protobuf.SingleFieldBuilderV3<monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder> alarmIdBuilder_; @@ -18744,7 +17956,7 @@ public final class Monitoring { * @return Whether the alarmId field is set. */ public boolean hasAlarmId() { - return alarmIdBuilder_ != null || alarmId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -18768,10 +17980,11 @@ public final class Monitoring { throw new NullPointerException(); } alarmId_ = value; - onChanged(); } else { alarmIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -18781,10 +17994,11 @@ public final class Monitoring { public Builder setAlarmId(monitoring.Monitoring.AlarmID.Builder builderForValue) { if (alarmIdBuilder_ == null) { alarmId_ = builderForValue.build(); - onChanged(); } else { alarmIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -18793,15 +18007,16 @@ public final class Monitoring { */ public Builder mergeAlarmId(monitoring.Monitoring.AlarmID value) { if (alarmIdBuilder_ == null) { - if (alarmId_ != null) { - alarmId_ = monitoring.Monitoring.AlarmID.newBuilder(alarmId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && alarmId_ != null && alarmId_ != monitoring.Monitoring.AlarmID.getDefaultInstance()) { + getAlarmIdBuilder().mergeFrom(value); } else { alarmId_ = value; } - onChanged(); } else { alarmIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -18809,13 +18024,13 @@ public final class Monitoring { * <code>.monitoring.AlarmID alarm_id = 1;</code> */ public Builder clearAlarmId() { - if (alarmIdBuilder_ == null) { - alarmId_ = null; - onChanged(); - } else { - alarmId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + alarmId_ = null; + if (alarmIdBuilder_ != null) { + alarmIdBuilder_.dispose(); alarmIdBuilder_ = null; } + onChanged(); return this; } @@ -18823,6 +18038,7 @@ public final class Monitoring { * <code>.monitoring.AlarmID alarm_id = 1;</code> */ public monitoring.Monitoring.AlarmID.Builder getAlarmIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getAlarmIdFieldBuilder().getBuilder(); } @@ -18867,6 +18083,7 @@ public final class Monitoring { */ public Builder setSubscriptionTimeoutS(float value) { subscriptionTimeoutS_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -18876,6 +18093,7 @@ public final class Monitoring { * @return This builder for chaining. */ public Builder clearSubscriptionTimeoutS() { + bitField0_ = (bitField0_ & ~0x00000002); subscriptionTimeoutS_ = 0F; onChanged(); return this; @@ -18899,6 +18117,7 @@ public final class Monitoring { */ public Builder setSubscriptionFrequencyMs(float value) { subscriptionFrequencyMs_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -18908,6 +18127,7 @@ public final class Monitoring { * @return This builder for chaining. */ public Builder clearSubscriptionFrequencyMs() { + bitField0_ = (bitField0_ & ~0x00000004); subscriptionFrequencyMs_ = 0F; onChanged(); return this; @@ -18940,7 +18160,17 @@ public final class Monitoring { @java.lang.Override public AlarmSubscription parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AlarmSubscription(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -19032,76 +18262,6 @@ public final class Monitoring { return new AlarmResponse(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private AlarmResponse(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - monitoring.Monitoring.AlarmID.Builder subBuilder = null; - if (alarmId_ != null) { - subBuilder = alarmId_.toBuilder(); - } - alarmId_ = input.readMessage(monitoring.Monitoring.AlarmID.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(alarmId_); - alarmId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - text_ = s; - break; - } - case 26: - { - monitoring.Monitoring.KpiList.Builder subBuilder = null; - if (kpiList_ != null) { - subBuilder = kpiList_.toBuilder(); - } - kpiList_ = input.readMessage(monitoring.Monitoring.KpiList.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(kpiList_); - kpiList_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return monitoring.Monitoring.internal_static_monitoring_AlarmResponse_descriptor; } @@ -19138,12 +18298,13 @@ public final class Monitoring { */ @java.lang.Override public monitoring.Monitoring.AlarmIDOrBuilder getAlarmIdOrBuilder() { - return getAlarmId(); + return alarmId_ == null ? monitoring.Monitoring.AlarmID.getDefaultInstance() : alarmId_; } public static final int TEXT_FIELD_NUMBER = 2; - private volatile java.lang.Object text_; + @SuppressWarnings("serial") + private volatile java.lang.Object text_ = ""; /** * <code>string text = 2;</code> @@ -19205,7 +18366,7 @@ public final class Monitoring { */ @java.lang.Override public monitoring.Monitoring.KpiListOrBuilder getKpiListOrBuilder() { - return getKpiList(); + return kpiList_ == null ? monitoring.Monitoring.KpiList.getDefaultInstance() : kpiList_; } private byte memoizedIsInitialized = -1; @@ -19226,13 +18387,13 @@ public final class Monitoring { if (alarmId_ != null) { output.writeMessage(1, getAlarmId()); } - if (!getTextBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, text_); } if (kpiList_ != null) { output.writeMessage(3, getKpiList()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -19244,13 +18405,13 @@ public final class Monitoring { if (alarmId_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAlarmId()); } - if (!getTextBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, text_); } if (kpiList_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getKpiList()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -19278,7 +18439,7 @@ public final class Monitoring { if (!getKpiList().equals(other.getKpiList())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -19300,7 +18461,7 @@ public final class Monitoring { hash = (37 * hash) + KPI_LIST_FIELD_NUMBER; hash = (53 * hash) + getKpiList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -19394,33 +18555,25 @@ public final class Monitoring { // Construct using monitoring.Monitoring.AlarmResponse.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (alarmIdBuilder_ == null) { - alarmId_ = null; - } else { - alarmId_ = null; + bitField0_ = 0; + alarmId_ = null; + if (alarmIdBuilder_ != null) { + alarmIdBuilder_.dispose(); alarmIdBuilder_ = null; } text_ = ""; - if (kpiListBuilder_ == null) { - kpiList_ = null; - } else { - kpiList_ = null; + kpiList_ = null; + if (kpiListBuilder_ != null) { + kpiListBuilder_.dispose(); kpiListBuilder_ = null; } return this; @@ -19448,49 +18601,24 @@ public final class Monitoring { @java.lang.Override public monitoring.Monitoring.AlarmResponse buildPartial() { monitoring.Monitoring.AlarmResponse result = new monitoring.Monitoring.AlarmResponse(this); - if (alarmIdBuilder_ == null) { - result.alarmId_ = alarmId_; - } else { - result.alarmId_ = alarmIdBuilder_.build(); - } - result.text_ = text_; - if (kpiListBuilder_ == null) { - result.kpiList_ = kpiList_; - } else { - result.kpiList_ = kpiListBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(monitoring.Monitoring.AlarmResponse result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.alarmId_ = alarmIdBuilder_ == null ? alarmId_ : alarmIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.text_ = text_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.kpiList_ = kpiListBuilder_ == null ? kpiList_ : kpiListBuilder_.build(); + } } @java.lang.Override @@ -19511,12 +18639,13 @@ public final class Monitoring { } if (!other.getText().isEmpty()) { text_ = other.text_; + bitField0_ |= 0x00000002; onChanged(); } if (other.hasKpiList()) { mergeKpiList(other.getKpiList()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -19528,20 +18657,61 @@ public final class Monitoring { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - monitoring.Monitoring.AlarmResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getAlarmIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + text_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 26: + { + input.readMessage(getKpiListFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } + // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.AlarmResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private monitoring.Monitoring.AlarmID alarmId_; private com.google.protobuf.SingleFieldBuilderV3<monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmID.Builder, monitoring.Monitoring.AlarmIDOrBuilder> alarmIdBuilder_; @@ -19551,7 +18721,7 @@ public final class Monitoring { * @return Whether the alarmId field is set. */ public boolean hasAlarmId() { - return alarmIdBuilder_ != null || alarmId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -19575,10 +18745,11 @@ public final class Monitoring { throw new NullPointerException(); } alarmId_ = value; - onChanged(); } else { alarmIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -19588,10 +18759,11 @@ public final class Monitoring { public Builder setAlarmId(monitoring.Monitoring.AlarmID.Builder builderForValue) { if (alarmIdBuilder_ == null) { alarmId_ = builderForValue.build(); - onChanged(); } else { alarmIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -19600,15 +18772,16 @@ public final class Monitoring { */ public Builder mergeAlarmId(monitoring.Monitoring.AlarmID value) { if (alarmIdBuilder_ == null) { - if (alarmId_ != null) { - alarmId_ = monitoring.Monitoring.AlarmID.newBuilder(alarmId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && alarmId_ != null && alarmId_ != monitoring.Monitoring.AlarmID.getDefaultInstance()) { + getAlarmIdBuilder().mergeFrom(value); } else { alarmId_ = value; } - onChanged(); } else { alarmIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -19616,13 +18789,13 @@ public final class Monitoring { * <code>.monitoring.AlarmID alarm_id = 1;</code> */ public Builder clearAlarmId() { - if (alarmIdBuilder_ == null) { - alarmId_ = null; - onChanged(); - } else { - alarmId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + alarmId_ = null; + if (alarmIdBuilder_ != null) { + alarmIdBuilder_.dispose(); alarmIdBuilder_ = null; } + onChanged(); return this; } @@ -19630,6 +18803,7 @@ public final class Monitoring { * <code>.monitoring.AlarmID alarm_id = 1;</code> */ public monitoring.Monitoring.AlarmID.Builder getAlarmIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getAlarmIdFieldBuilder().getBuilder(); } @@ -19699,6 +18873,7 @@ public final class Monitoring { throw new NullPointerException(); } text_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -19709,6 +18884,7 @@ public final class Monitoring { */ public Builder clearText() { text_ = getDefaultInstance().getText(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -19724,6 +18900,7 @@ public final class Monitoring { } checkByteStringIsUtf8(value); text_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -19737,7 +18914,7 @@ public final class Monitoring { * @return Whether the kpiList field is set. */ public boolean hasKpiList() { - return kpiListBuilder_ != null || kpiList_ != null; + return ((bitField0_ & 0x00000004) != 0); } /** @@ -19761,10 +18938,11 @@ public final class Monitoring { throw new NullPointerException(); } kpiList_ = value; - onChanged(); } else { kpiListBuilder_.setMessage(value); } + bitField0_ |= 0x00000004; + onChanged(); return this; } @@ -19774,10 +18952,11 @@ public final class Monitoring { public Builder setKpiList(monitoring.Monitoring.KpiList.Builder builderForValue) { if (kpiListBuilder_ == null) { kpiList_ = builderForValue.build(); - onChanged(); } else { kpiListBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000004; + onChanged(); return this; } @@ -19786,15 +18965,16 @@ public final class Monitoring { */ public Builder mergeKpiList(monitoring.Monitoring.KpiList value) { if (kpiListBuilder_ == null) { - if (kpiList_ != null) { - kpiList_ = monitoring.Monitoring.KpiList.newBuilder(kpiList_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000004) != 0) && kpiList_ != null && kpiList_ != monitoring.Monitoring.KpiList.getDefaultInstance()) { + getKpiListBuilder().mergeFrom(value); } else { kpiList_ = value; } - onChanged(); } else { kpiListBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000004; + onChanged(); return this; } @@ -19802,13 +18982,13 @@ public final class Monitoring { * <code>.monitoring.KpiList kpi_list = 3;</code> */ public Builder clearKpiList() { - if (kpiListBuilder_ == null) { - kpiList_ = null; - onChanged(); - } else { - kpiList_ = null; + bitField0_ = (bitField0_ & ~0x00000004); + kpiList_ = null; + if (kpiListBuilder_ != null) { + kpiListBuilder_.dispose(); kpiListBuilder_ = null; } + onChanged(); return this; } @@ -19816,6 +18996,7 @@ public final class Monitoring { * <code>.monitoring.KpiList kpi_list = 3;</code> */ public monitoring.Monitoring.KpiList.Builder getKpiListBuilder() { + bitField0_ |= 0x00000004; onChanged(); return getKpiListFieldBuilder().getBuilder(); } @@ -19869,7 +19050,17 @@ public final class Monitoring { @java.lang.Override public AlarmResponse parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AlarmResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -19940,57 +19131,6 @@ public final class Monitoring { return new AlarmList(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private AlarmList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - alarmDescriptor_ = new java.util.ArrayList<monitoring.Monitoring.AlarmDescriptor>(); - mutable_bitField0_ |= 0x00000001; - } - alarmDescriptor_.add(input.readMessage(monitoring.Monitoring.AlarmDescriptor.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - alarmDescriptor_ = java.util.Collections.unmodifiableList(alarmDescriptor_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return monitoring.Monitoring.internal_static_monitoring_AlarmList_descriptor; } @@ -20002,6 +19142,7 @@ public final class Monitoring { public static final int ALARM_DESCRIPTOR_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List<monitoring.Monitoring.AlarmDescriptor> alarmDescriptor_; /** @@ -20062,7 +19203,7 @@ public final class Monitoring { for (int i = 0; i < alarmDescriptor_.size(); i++) { output.writeMessage(1, alarmDescriptor_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -20074,7 +19215,7 @@ public final class Monitoring { for (int i = 0; i < alarmDescriptor_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, alarmDescriptor_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -20090,7 +19231,7 @@ public final class Monitoring { monitoring.Monitoring.AlarmList other = (monitoring.Monitoring.AlarmList) obj; if (!getAlarmDescriptorList().equals(other.getAlarmDescriptorList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -20106,7 +19247,7 @@ public final class Monitoring { hash = (37 * hash) + ALARM_DESCRIPTOR_FIELD_NUMBER; hash = (53 * hash) + getAlarmDescriptorList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -20200,29 +19341,23 @@ public final class Monitoring { // Construct using monitoring.Monitoring.AlarmList.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getAlarmDescriptorFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (alarmDescriptorBuilder_ == null) { alarmDescriptor_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + alarmDescriptor_ = null; alarmDescriptorBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -20248,7 +19383,15 @@ public final class Monitoring { @java.lang.Override public monitoring.Monitoring.AlarmList buildPartial() { monitoring.Monitoring.AlarmList result = new monitoring.Monitoring.AlarmList(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(monitoring.Monitoring.AlarmList result) { if (alarmDescriptorBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { alarmDescriptor_ = java.util.Collections.unmodifiableList(alarmDescriptor_); @@ -20258,38 +19401,10 @@ public final class Monitoring { } else { result.alarmDescriptor_ = alarmDescriptorBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); } - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(monitoring.Monitoring.AlarmList result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -20329,7 +19444,7 @@ public final class Monitoring { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -20341,17 +19456,47 @@ public final class Monitoring { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - monitoring.Monitoring.AlarmList parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + monitoring.Monitoring.AlarmDescriptor m = input.readMessage(monitoring.Monitoring.AlarmDescriptor.parser(), extensionRegistry); + if (alarmDescriptorBuilder_ == null) { + ensureAlarmDescriptorIsMutable(); + alarmDescriptor_.add(m); + } else { + alarmDescriptorBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (monitoring.Monitoring.AlarmList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -20621,7 +19766,17 @@ public final class Monitoring { @java.lang.Override public AlarmList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AlarmList(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/src/policy/target/generated-sources/grpc/monitoring/MonitoringServiceGrpc.java b/src/policy/target/generated-sources/grpc/monitoring/MonitoringServiceGrpc.java index 83dffd6257d5685ee7d49c45258bbf1d68d3a817..7a275e5777320134c04591f4d9c29e23035148bf 100644 --- a/src/policy/target/generated-sources/grpc/monitoring/MonitoringServiceGrpc.java +++ b/src/policy/target/generated-sources/grpc/monitoring/MonitoringServiceGrpc.java @@ -4,7 +4,8 @@ import static io.grpc.MethodDescriptor.generateFullMethodName; /** */ -@io.quarkus.grpc.common.Generated(value = "by gRPC proto compiler (version 1.38.1)", comments = "Source: monitoring.proto") +@io.quarkus.grpc.common.Generated(value = "by gRPC proto compiler (version 1.55.1)", comments = "Source: monitoring.proto") +@io.grpc.stub.annotations.GrpcGenerated public final class MonitoringServiceGrpc { private MonitoringServiceGrpc() { @@ -327,123 +328,130 @@ public final class MonitoringServiceGrpc { /** */ - public static abstract class MonitoringServiceImplBase implements io.grpc.BindableService { + public interface AsyncService { /** */ - public void setKpi(monitoring.Monitoring.KpiDescriptor request, io.grpc.stub.StreamObserver<monitoring.Monitoring.KpiId> responseObserver) { + default void setKpi(monitoring.Monitoring.KpiDescriptor request, io.grpc.stub.StreamObserver<monitoring.Monitoring.KpiId> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetKpiMethod(), responseObserver); } /** */ - public void deleteKpi(monitoring.Monitoring.KpiId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { + default void deleteKpi(monitoring.Monitoring.KpiId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteKpiMethod(), responseObserver); } /** */ - public void getKpiDescriptor(monitoring.Monitoring.KpiId request, io.grpc.stub.StreamObserver<monitoring.Monitoring.KpiDescriptor> responseObserver) { + default void getKpiDescriptor(monitoring.Monitoring.KpiId request, io.grpc.stub.StreamObserver<monitoring.Monitoring.KpiDescriptor> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetKpiDescriptorMethod(), responseObserver); } /** */ - public void getKpiDescriptorList(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<monitoring.Monitoring.KpiDescriptorList> responseObserver) { + default void getKpiDescriptorList(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<monitoring.Monitoring.KpiDescriptorList> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetKpiDescriptorListMethod(), responseObserver); } /** */ - public void includeKpi(monitoring.Monitoring.Kpi request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { + default void includeKpi(monitoring.Monitoring.Kpi request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getIncludeKpiMethod(), responseObserver); } /** */ - public void monitorKpi(monitoring.Monitoring.MonitorKpiRequest request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { + default void monitorKpi(monitoring.Monitoring.MonitorKpiRequest request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getMonitorKpiMethod(), responseObserver); } /** */ - public void queryKpiData(monitoring.Monitoring.KpiQuery request, io.grpc.stub.StreamObserver<monitoring.Monitoring.RawKpiTable> responseObserver) { + default void queryKpiData(monitoring.Monitoring.KpiQuery request, io.grpc.stub.StreamObserver<monitoring.Monitoring.RawKpiTable> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getQueryKpiDataMethod(), responseObserver); } /** */ - public void setKpiSubscription(monitoring.Monitoring.SubsDescriptor request, io.grpc.stub.StreamObserver<monitoring.Monitoring.SubsResponse> responseObserver) { + default void setKpiSubscription(monitoring.Monitoring.SubsDescriptor request, io.grpc.stub.StreamObserver<monitoring.Monitoring.SubsResponse> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetKpiSubscriptionMethod(), responseObserver); } /** */ - public void getSubsDescriptor(monitoring.Monitoring.SubscriptionID request, io.grpc.stub.StreamObserver<monitoring.Monitoring.SubsDescriptor> responseObserver) { + default void getSubsDescriptor(monitoring.Monitoring.SubscriptionID request, io.grpc.stub.StreamObserver<monitoring.Monitoring.SubsDescriptor> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSubsDescriptorMethod(), responseObserver); } /** */ - public void getSubscriptions(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<monitoring.Monitoring.SubsList> responseObserver) { + default void getSubscriptions(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<monitoring.Monitoring.SubsList> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSubscriptionsMethod(), responseObserver); } /** */ - public void deleteSubscription(monitoring.Monitoring.SubscriptionID request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { + default void deleteSubscription(monitoring.Monitoring.SubscriptionID request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteSubscriptionMethod(), responseObserver); } /** */ - public void setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request, io.grpc.stub.StreamObserver<monitoring.Monitoring.AlarmID> responseObserver) { + default void setKpiAlarm(monitoring.Monitoring.AlarmDescriptor request, io.grpc.stub.StreamObserver<monitoring.Monitoring.AlarmID> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetKpiAlarmMethod(), responseObserver); } /** */ - public void getAlarms(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<monitoring.Monitoring.AlarmList> responseObserver) { + default void getAlarms(context.ContextOuterClass.Empty request, io.grpc.stub.StreamObserver<monitoring.Monitoring.AlarmList> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAlarmsMethod(), responseObserver); } /** */ - public void getAlarmDescriptor(monitoring.Monitoring.AlarmID request, io.grpc.stub.StreamObserver<monitoring.Monitoring.AlarmDescriptor> responseObserver) { + default void getAlarmDescriptor(monitoring.Monitoring.AlarmID request, io.grpc.stub.StreamObserver<monitoring.Monitoring.AlarmDescriptor> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAlarmDescriptorMethod(), responseObserver); } /** */ - public void getAlarmResponseStream(monitoring.Monitoring.AlarmSubscription request, io.grpc.stub.StreamObserver<monitoring.Monitoring.AlarmResponse> responseObserver) { + default void getAlarmResponseStream(monitoring.Monitoring.AlarmSubscription request, io.grpc.stub.StreamObserver<monitoring.Monitoring.AlarmResponse> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAlarmResponseStreamMethod(), responseObserver); } /** */ - public void deleteAlarm(monitoring.Monitoring.AlarmID request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { + default void deleteAlarm(monitoring.Monitoring.AlarmID request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteAlarmMethod(), responseObserver); } /** */ - public void getStreamKpi(monitoring.Monitoring.KpiId request, io.grpc.stub.StreamObserver<monitoring.Monitoring.Kpi> responseObserver) { + default void getStreamKpi(monitoring.Monitoring.KpiId request, io.grpc.stub.StreamObserver<monitoring.Monitoring.Kpi> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetStreamKpiMethod(), responseObserver); } /** */ - public void getInstantKpi(monitoring.Monitoring.KpiId request, io.grpc.stub.StreamObserver<monitoring.Monitoring.Kpi> responseObserver) { + default void getInstantKpi(monitoring.Monitoring.KpiId request, io.grpc.stub.StreamObserver<monitoring.Monitoring.Kpi> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetInstantKpiMethod(), responseObserver); } + } + + /** + * Base class for the server implementation of the service MonitoringService. + */ + public static abstract class MonitoringServiceImplBase implements io.grpc.BindableService, AsyncService { @java.lang.Override public io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(getSetKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<monitoring.Monitoring.KpiDescriptor, monitoring.Monitoring.KpiId>(this, METHODID_SET_KPI))).addMethod(getDeleteKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<monitoring.Monitoring.KpiId, context.ContextOuterClass.Empty>(this, METHODID_DELETE_KPI))).addMethod(getGetKpiDescriptorMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiDescriptor>(this, METHODID_GET_KPI_DESCRIPTOR))).addMethod(getGetKpiDescriptorListMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Empty, monitoring.Monitoring.KpiDescriptorList>(this, METHODID_GET_KPI_DESCRIPTOR_LIST))).addMethod(getIncludeKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<monitoring.Monitoring.Kpi, context.ContextOuterClass.Empty>(this, METHODID_INCLUDE_KPI))).addMethod(getMonitorKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<monitoring.Monitoring.MonitorKpiRequest, context.ContextOuterClass.Empty>(this, METHODID_MONITOR_KPI))).addMethod(getQueryKpiDataMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<monitoring.Monitoring.KpiQuery, monitoring.Monitoring.RawKpiTable>(this, METHODID_QUERY_KPI_DATA))).addMethod(getSetKpiSubscriptionMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers<monitoring.Monitoring.SubsDescriptor, monitoring.Monitoring.SubsResponse>(this, METHODID_SET_KPI_SUBSCRIPTION))).addMethod(getGetSubsDescriptorMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<monitoring.Monitoring.SubscriptionID, monitoring.Monitoring.SubsDescriptor>(this, METHODID_GET_SUBS_DESCRIPTOR))).addMethod(getGetSubscriptionsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Empty, monitoring.Monitoring.SubsList>(this, METHODID_GET_SUBSCRIPTIONS))).addMethod(getDeleteSubscriptionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<monitoring.Monitoring.SubscriptionID, context.ContextOuterClass.Empty>(this, METHODID_DELETE_SUBSCRIPTION))).addMethod(getSetKpiAlarmMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<monitoring.Monitoring.AlarmDescriptor, monitoring.Monitoring.AlarmID>(this, METHODID_SET_KPI_ALARM))).addMethod(getGetAlarmsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Empty, monitoring.Monitoring.AlarmList>(this, METHODID_GET_ALARMS))).addMethod(getGetAlarmDescriptorMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmDescriptor>(this, METHODID_GET_ALARM_DESCRIPTOR))).addMethod(getGetAlarmResponseStreamMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers<monitoring.Monitoring.AlarmSubscription, monitoring.Monitoring.AlarmResponse>(this, METHODID_GET_ALARM_RESPONSE_STREAM))).addMethod(getDeleteAlarmMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<monitoring.Monitoring.AlarmID, context.ContextOuterClass.Empty>(this, METHODID_DELETE_ALARM))).addMethod(getGetStreamKpiMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers<monitoring.Monitoring.KpiId, monitoring.Monitoring.Kpi>(this, METHODID_GET_STREAM_KPI))).addMethod(getGetInstantKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<monitoring.Monitoring.KpiId, monitoring.Monitoring.Kpi>(this, METHODID_GET_INSTANT_KPI))).build(); + return MonitoringServiceGrpc.bindService(this); } } /** + * A stub to allow clients to do asynchronous rpc calls to service MonitoringService. */ public static class MonitoringServiceStub extends io.grpc.stub.AbstractAsyncStub<MonitoringServiceStub> { @@ -566,6 +574,7 @@ public final class MonitoringServiceGrpc { } /** + * A stub to allow clients to do synchronous rpc calls to service MonitoringService. */ public static class MonitoringServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub<MonitoringServiceBlockingStub> { @@ -688,6 +697,7 @@ public final class MonitoringServiceGrpc { } /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service MonitoringService. */ public static class MonitoringServiceFutureStub extends io.grpc.stub.AbstractFutureStub<MonitoringServiceFutureStub> { @@ -829,11 +839,11 @@ public final class MonitoringServiceGrpc { private static final class MethodHandlers<Req, Resp> implements io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>, io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>, io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>, io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> { - private final MonitoringServiceImplBase serviceImpl; + private final AsyncService serviceImpl; private final int methodId; - MethodHandlers(MonitoringServiceImplBase serviceImpl, int methodId) { + MethodHandlers(AsyncService serviceImpl, int methodId) { this.serviceImpl = serviceImpl; this.methodId = methodId; } @@ -911,6 +921,10 @@ public final class MonitoringServiceGrpc { } } + public static io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(getSetKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<monitoring.Monitoring.KpiDescriptor, monitoring.Monitoring.KpiId>(service, METHODID_SET_KPI))).addMethod(getDeleteKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<monitoring.Monitoring.KpiId, context.ContextOuterClass.Empty>(service, METHODID_DELETE_KPI))).addMethod(getGetKpiDescriptorMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiDescriptor>(service, METHODID_GET_KPI_DESCRIPTOR))).addMethod(getGetKpiDescriptorListMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Empty, monitoring.Monitoring.KpiDescriptorList>(service, METHODID_GET_KPI_DESCRIPTOR_LIST))).addMethod(getIncludeKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<monitoring.Monitoring.Kpi, context.ContextOuterClass.Empty>(service, METHODID_INCLUDE_KPI))).addMethod(getMonitorKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<monitoring.Monitoring.MonitorKpiRequest, context.ContextOuterClass.Empty>(service, METHODID_MONITOR_KPI))).addMethod(getQueryKpiDataMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<monitoring.Monitoring.KpiQuery, monitoring.Monitoring.RawKpiTable>(service, METHODID_QUERY_KPI_DATA))).addMethod(getSetKpiSubscriptionMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers<monitoring.Monitoring.SubsDescriptor, monitoring.Monitoring.SubsResponse>(service, METHODID_SET_KPI_SUBSCRIPTION))).addMethod(getGetSubsDescriptorMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<monitoring.Monitoring.SubscriptionID, monitoring.Monitoring.SubsDescriptor>(service, METHODID_GET_SUBS_DESCRIPTOR))).addMethod(getGetSubscriptionsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Empty, monitoring.Monitoring.SubsList>(service, METHODID_GET_SUBSCRIPTIONS))).addMethod(getDeleteSubscriptionMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<monitoring.Monitoring.SubscriptionID, context.ContextOuterClass.Empty>(service, METHODID_DELETE_SUBSCRIPTION))).addMethod(getSetKpiAlarmMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<monitoring.Monitoring.AlarmDescriptor, monitoring.Monitoring.AlarmID>(service, METHODID_SET_KPI_ALARM))).addMethod(getGetAlarmsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Empty, monitoring.Monitoring.AlarmList>(service, METHODID_GET_ALARMS))).addMethod(getGetAlarmDescriptorMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<monitoring.Monitoring.AlarmID, monitoring.Monitoring.AlarmDescriptor>(service, METHODID_GET_ALARM_DESCRIPTOR))).addMethod(getGetAlarmResponseStreamMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers<monitoring.Monitoring.AlarmSubscription, monitoring.Monitoring.AlarmResponse>(service, METHODID_GET_ALARM_RESPONSE_STREAM))).addMethod(getDeleteAlarmMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<monitoring.Monitoring.AlarmID, context.ContextOuterClass.Empty>(service, METHODID_DELETE_ALARM))).addMethod(getGetStreamKpiMethod(), io.grpc.stub.ServerCalls.asyncServerStreamingCall(new MethodHandlers<monitoring.Monitoring.KpiId, monitoring.Monitoring.Kpi>(service, METHODID_GET_STREAM_KPI))).addMethod(getGetInstantKpiMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<monitoring.Monitoring.KpiId, monitoring.Monitoring.Kpi>(service, METHODID_GET_INSTANT_KPI))).build(); + } + private static abstract class MonitoringServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { MonitoringServiceBaseDescriptorSupplier() { diff --git a/src/policy/target/generated-sources/grpc/policy/Policy.java b/src/policy/target/generated-sources/grpc/policy/Policy.java index b57d9ae7577153c1623a34e2aea9c38e81e02a08..30aa624d4c5f5f8be2ac57994afff26d53644fdf 100644 --- a/src/policy/target/generated-sources/grpc/policy/Policy.java +++ b/src/policy/target/generated-sources/grpc/policy/Policy.java @@ -346,57 +346,6 @@ public final class Policy { return new PolicyRuleId(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private PolicyRuleId(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - context.ContextOuterClass.Uuid.Builder subBuilder = null; - if (uuid_ != null) { - subBuilder = uuid_.toBuilder(); - } - uuid_ = input.readMessage(context.ContextOuterClass.Uuid.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(uuid_); - uuid_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return policy.Policy.internal_static_policy_PolicyRuleId_descriptor; } @@ -433,7 +382,7 @@ public final class Policy { */ @java.lang.Override public context.ContextOuterClass.UuidOrBuilder getUuidOrBuilder() { - return getUuid(); + return uuid_ == null ? context.ContextOuterClass.Uuid.getDefaultInstance() : uuid_; } private byte memoizedIsInitialized = -1; @@ -454,7 +403,7 @@ public final class Policy { if (uuid_ != null) { output.writeMessage(1, getUuid()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -466,7 +415,7 @@ public final class Policy { if (uuid_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUuid()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -486,7 +435,7 @@ public final class Policy { if (!getUuid().equals(other.getUuid())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -502,7 +451,7 @@ public final class Policy { hash = (37 * hash) + UUID_FIELD_NUMBER; hash = (53 * hash) + getUuid().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -596,26 +545,19 @@ public final class Policy { // Construct using policy.Policy.PolicyRuleId.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (uuidBuilder_ == null) { - uuid_ = null; - } else { - uuid_ = null; + bitField0_ = 0; + uuid_ = null; + if (uuidBuilder_ != null) { + uuidBuilder_.dispose(); uuidBuilder_ = null; } return this; @@ -643,43 +585,18 @@ public final class Policy { @java.lang.Override public policy.Policy.PolicyRuleId buildPartial() { policy.Policy.PolicyRuleId result = new policy.Policy.PolicyRuleId(this); - if (uuidBuilder_ == null) { - result.uuid_ = uuid_; - } else { - result.uuid_ = uuidBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(policy.Policy.PolicyRuleId result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.uuid_ = uuidBuilder_ == null ? uuid_ : uuidBuilder_.build(); + } } @java.lang.Override @@ -698,7 +615,7 @@ public final class Policy { if (other.hasUuid()) { mergeUuid(other.getUuid()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -710,20 +627,47 @@ public final class Policy { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - policy.Policy.PolicyRuleId parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getUuidFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (policy.Policy.PolicyRuleId) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private context.ContextOuterClass.Uuid uuid_; private com.google.protobuf.SingleFieldBuilderV3<context.ContextOuterClass.Uuid, context.ContextOuterClass.Uuid.Builder, context.ContextOuterClass.UuidOrBuilder> uuidBuilder_; @@ -733,7 +677,7 @@ public final class Policy { * @return Whether the uuid field is set. */ public boolean hasUuid() { - return uuidBuilder_ != null || uuid_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -757,10 +701,11 @@ public final class Policy { throw new NullPointerException(); } uuid_ = value; - onChanged(); } else { uuidBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -770,10 +715,11 @@ public final class Policy { public Builder setUuid(context.ContextOuterClass.Uuid.Builder builderForValue) { if (uuidBuilder_ == null) { uuid_ = builderForValue.build(); - onChanged(); } else { uuidBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -782,15 +728,16 @@ public final class Policy { */ public Builder mergeUuid(context.ContextOuterClass.Uuid value) { if (uuidBuilder_ == null) { - if (uuid_ != null) { - uuid_ = context.ContextOuterClass.Uuid.newBuilder(uuid_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && uuid_ != null && uuid_ != context.ContextOuterClass.Uuid.getDefaultInstance()) { + getUuidBuilder().mergeFrom(value); } else { uuid_ = value; } - onChanged(); } else { uuidBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -798,13 +745,13 @@ public final class Policy { * <code>.context.Uuid uuid = 1;</code> */ public Builder clearUuid() { - if (uuidBuilder_ == null) { - uuid_ = null; - onChanged(); - } else { - uuid_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + uuid_ = null; + if (uuidBuilder_ != null) { + uuidBuilder_.dispose(); uuidBuilder_ = null; } + onChanged(); return this; } @@ -812,6 +759,7 @@ public final class Policy { * <code>.context.Uuid uuid = 1;</code> */ public context.ContextOuterClass.Uuid.Builder getUuidBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getUuidFieldBuilder().getBuilder(); } @@ -865,7 +813,17 @@ public final class Policy { @java.lang.Override public PolicyRuleId parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PolicyRuleId(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -936,56 +894,6 @@ public final class Policy { return new PolicyRuleState(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private PolicyRuleState(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 8: - { - int rawValue = input.readEnum(); - policyRuleState_ = rawValue; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - policyRuleStateMessage_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return policy.Policy.internal_static_policy_PolicyRuleState_descriptor; } @@ -997,7 +905,7 @@ public final class Policy { public static final int POLICYRULESTATE_FIELD_NUMBER = 1; - private int policyRuleState_; + private int policyRuleState_ = 0; /** * <code>.policy.PolicyRuleStateEnum policyRuleState = 1;</code> @@ -1014,14 +922,14 @@ public final class Policy { */ @java.lang.Override public policy.Policy.PolicyRuleStateEnum getPolicyRuleState() { - @SuppressWarnings("deprecation") - policy.Policy.PolicyRuleStateEnum result = policy.Policy.PolicyRuleStateEnum.valueOf(policyRuleState_); + policy.Policy.PolicyRuleStateEnum result = policy.Policy.PolicyRuleStateEnum.forNumber(policyRuleState_); return result == null ? policy.Policy.PolicyRuleStateEnum.UNRECOGNIZED : result; } public static final int POLICYRULESTATEMESSAGE_FIELD_NUMBER = 2; - private volatile java.lang.Object policyRuleStateMessage_; + @SuppressWarnings("serial") + private volatile java.lang.Object policyRuleStateMessage_ = ""; /** * <code>string policyRuleStateMessage = 2;</code> @@ -1074,10 +982,10 @@ public final class Policy { if (policyRuleState_ != policy.Policy.PolicyRuleStateEnum.POLICY_UNDEFINED.getNumber()) { output.writeEnum(1, policyRuleState_); } - if (!getPolicyRuleStateMessageBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(policyRuleStateMessage_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, policyRuleStateMessage_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1089,10 +997,10 @@ public final class Policy { if (policyRuleState_ != policy.Policy.PolicyRuleStateEnum.POLICY_UNDEFINED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, policyRuleState_); } - if (!getPolicyRuleStateMessageBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(policyRuleStateMessage_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, policyRuleStateMessage_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1110,7 +1018,7 @@ public final class Policy { return false; if (!getPolicyRuleStateMessage().equals(other.getPolicyRuleStateMessage())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1126,7 +1034,7 @@ public final class Policy { hash = (53 * hash) + policyRuleState_; hash = (37 * hash) + POLICYRULESTATEMESSAGE_FIELD_NUMBER; hash = (53 * hash) + getPolicyRuleStateMessage().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1220,22 +1128,16 @@ public final class Policy { // Construct using policy.Policy.PolicyRuleState.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; policyRuleState_ = 0; policyRuleStateMessage_ = ""; return this; @@ -1263,40 +1165,21 @@ public final class Policy { @java.lang.Override public policy.Policy.PolicyRuleState buildPartial() { policy.Policy.PolicyRuleState result = new policy.Policy.PolicyRuleState(this); - result.policyRuleState_ = policyRuleState_; - result.policyRuleStateMessage_ = policyRuleStateMessage_; + if (bitField0_ != 0) { + buildPartial0(result); + } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(policy.Policy.PolicyRuleState result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.policyRuleState_ = policyRuleState_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.policyRuleStateMessage_ = policyRuleStateMessage_; + } } @java.lang.Override @@ -1317,9 +1200,10 @@ public final class Policy { } if (!other.getPolicyRuleStateMessage().isEmpty()) { policyRuleStateMessage_ = other.policyRuleStateMessage_; + bitField0_ |= 0x00000002; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1331,20 +1215,54 @@ public final class Policy { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - policy.Policy.PolicyRuleState parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 8: + { + policyRuleState_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } + // case 8 + case 18: + { + policyRuleStateMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (policy.Policy.PolicyRuleState) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private int policyRuleState_ = 0; /** @@ -1363,6 +1281,7 @@ public final class Policy { */ public Builder setPolicyRuleStateValue(int value) { policyRuleState_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -1373,8 +1292,7 @@ public final class Policy { */ @java.lang.Override public policy.Policy.PolicyRuleStateEnum getPolicyRuleState() { - @SuppressWarnings("deprecation") - policy.Policy.PolicyRuleStateEnum result = policy.Policy.PolicyRuleStateEnum.valueOf(policyRuleState_); + policy.Policy.PolicyRuleStateEnum result = policy.Policy.PolicyRuleStateEnum.forNumber(policyRuleState_); return result == null ? policy.Policy.PolicyRuleStateEnum.UNRECOGNIZED : result; } @@ -1387,6 +1305,7 @@ public final class Policy { if (value == null) { throw new NullPointerException(); } + bitField0_ |= 0x00000001; policyRuleState_ = value.getNumber(); onChanged(); return this; @@ -1397,6 +1316,7 @@ public final class Policy { * @return This builder for chaining. */ public Builder clearPolicyRuleState() { + bitField0_ = (bitField0_ & ~0x00000001); policyRuleState_ = 0; onChanged(); return this; @@ -1445,6 +1365,7 @@ public final class Policy { throw new NullPointerException(); } policyRuleStateMessage_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -1455,6 +1376,7 @@ public final class Policy { */ public Builder clearPolicyRuleStateMessage() { policyRuleStateMessage_ = getDefaultInstance().getPolicyRuleStateMessage(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -1470,6 +1392,7 @@ public final class Policy { } checkByteStringIsUtf8(value); policyRuleStateMessage_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -1501,7 +1424,17 @@ public final class Policy { @java.lang.Override public PolicyRuleState parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PolicyRuleState(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1715,106 +1648,6 @@ public final class Policy { return new PolicyRuleBasic(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private PolicyRuleBasic(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - policy.Policy.PolicyRuleId.Builder subBuilder = null; - if (policyRuleId_ != null) { - subBuilder = policyRuleId_.toBuilder(); - } - policyRuleId_ = input.readMessage(policy.Policy.PolicyRuleId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(policyRuleId_); - policyRuleId_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - policy.Policy.PolicyRuleState.Builder subBuilder = null; - if (policyRuleState_ != null) { - subBuilder = policyRuleState_.toBuilder(); - } - policyRuleState_ = input.readMessage(policy.Policy.PolicyRuleState.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(policyRuleState_); - policyRuleState_ = subBuilder.buildPartial(); - } - break; - } - case 24: - { - priority_ = input.readUInt32(); - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - conditionList_ = new java.util.ArrayList<policy.PolicyCondition.PolicyRuleCondition>(); - mutable_bitField0_ |= 0x00000001; - } - conditionList_.add(input.readMessage(policy.PolicyCondition.PolicyRuleCondition.parser(), extensionRegistry)); - break; - } - case 40: - { - int rawValue = input.readEnum(); - booleanOperator_ = rawValue; - break; - } - case 50: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - actionList_ = new java.util.ArrayList<policy.PolicyAction.PolicyRuleAction>(); - mutable_bitField0_ |= 0x00000002; - } - actionList_.add(input.readMessage(policy.PolicyAction.PolicyRuleAction.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - conditionList_ = java.util.Collections.unmodifiableList(conditionList_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - actionList_ = java.util.Collections.unmodifiableList(actionList_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return policy.Policy.internal_static_policy_PolicyRuleBasic_descriptor; } @@ -1851,7 +1684,7 @@ public final class Policy { */ @java.lang.Override public policy.Policy.PolicyRuleIdOrBuilder getPolicyRuleIdOrBuilder() { - return getPolicyRuleId(); + return policyRuleId_ == null ? policy.Policy.PolicyRuleId.getDefaultInstance() : policyRuleId_; } public static final int POLICYRULESTATE_FIELD_NUMBER = 2; @@ -1893,12 +1726,12 @@ public final class Policy { */ @java.lang.Override public policy.Policy.PolicyRuleStateOrBuilder getPolicyRuleStateOrBuilder() { - return getPolicyRuleState(); + return policyRuleState_ == null ? policy.Policy.PolicyRuleState.getDefaultInstance() : policyRuleState_; } public static final int PRIORITY_FIELD_NUMBER = 3; - private int priority_; + private int priority_ = 0; /** * <code>uint32 priority = 3;</code> @@ -1911,6 +1744,7 @@ public final class Policy { public static final int CONDITIONLIST_FIELD_NUMBER = 4; + @SuppressWarnings("serial") private java.util.List<policy.PolicyCondition.PolicyRuleCondition> conditionList_; /** @@ -1975,7 +1809,7 @@ public final class Policy { public static final int BOOLEANOPERATOR_FIELD_NUMBER = 5; - private int booleanOperator_; + private int booleanOperator_ = 0; /** * <pre> @@ -2000,13 +1834,13 @@ public final class Policy { */ @java.lang.Override public policy.PolicyCondition.BooleanOperator getBooleanOperator() { - @SuppressWarnings("deprecation") - policy.PolicyCondition.BooleanOperator result = policy.PolicyCondition.BooleanOperator.valueOf(booleanOperator_); + policy.PolicyCondition.BooleanOperator result = policy.PolicyCondition.BooleanOperator.forNumber(booleanOperator_); return result == null ? policy.PolicyCondition.BooleanOperator.UNRECOGNIZED : result; } public static final int ACTIONLIST_FIELD_NUMBER = 6; + @SuppressWarnings("serial") private java.util.List<policy.PolicyAction.PolicyRuleAction> actionList_; /** @@ -2102,7 +1936,7 @@ public final class Policy { for (int i = 0; i < actionList_.size(); i++) { output.writeMessage(6, actionList_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2129,7 +1963,7 @@ public final class Policy { for (int i = 0; i < actionList_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, actionList_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2163,7 +1997,7 @@ public final class Policy { return false; if (!getActionListList().equals(other.getActionListList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2195,7 +2029,7 @@ public final class Policy { hash = (37 * hash) + ACTIONLIST_FIELD_NUMBER; hash = (53 * hash) + getActionListList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2293,50 +2127,42 @@ public final class Policy { // Construct using policy.Policy.PolicyRuleBasic.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getConditionListFieldBuilder(); - getActionListFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); - if (policyRuleIdBuilder_ == null) { - policyRuleId_ = null; - } else { - policyRuleId_ = null; + bitField0_ = 0; + policyRuleId_ = null; + if (policyRuleIdBuilder_ != null) { + policyRuleIdBuilder_.dispose(); policyRuleIdBuilder_ = null; } - if (policyRuleStateBuilder_ == null) { - policyRuleState_ = null; - } else { - policyRuleState_ = null; + policyRuleState_ = null; + if (policyRuleStateBuilder_ != null) { + policyRuleStateBuilder_.dispose(); policyRuleStateBuilder_ = null; } priority_ = 0; if (conditionListBuilder_ == null) { conditionList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + conditionList_ = null; conditionListBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000008); booleanOperator_ = 0; if (actionListBuilder_ == null) { actionList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + actionList_ = null; actionListBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000020); return this; } @@ -2362,69 +2188,49 @@ public final class Policy { @java.lang.Override public policy.Policy.PolicyRuleBasic buildPartial() { policy.Policy.PolicyRuleBasic result = new policy.Policy.PolicyRuleBasic(this); - int from_bitField0_ = bitField0_; - if (policyRuleIdBuilder_ == null) { - result.policyRuleId_ = policyRuleId_; - } else { - result.policyRuleId_ = policyRuleIdBuilder_.build(); - } - if (policyRuleStateBuilder_ == null) { - result.policyRuleState_ = policyRuleState_; - } else { - result.policyRuleState_ = policyRuleStateBuilder_.build(); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); } - result.priority_ = priority_; + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(policy.Policy.PolicyRuleBasic result) { if (conditionListBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000008) != 0)) { conditionList_ = java.util.Collections.unmodifiableList(conditionList_); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000008); } result.conditionList_ = conditionList_; } else { result.conditionList_ = conditionListBuilder_.build(); } - result.booleanOperator_ = booleanOperator_; if (actionListBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000020) != 0)) { actionList_ = java.util.Collections.unmodifiableList(actionList_); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000020); } result.actionList_ = actionList_; } else { result.actionList_ = actionListBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); } - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(policy.Policy.PolicyRuleBasic result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.policyRuleId_ = policyRuleIdBuilder_ == null ? policyRuleId_ : policyRuleIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.policyRuleState_ = policyRuleStateBuilder_ == null ? policyRuleState_ : policyRuleStateBuilder_.build(); + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.priority_ = priority_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.booleanOperator_ = booleanOperator_; + } } @java.lang.Override @@ -2453,7 +2259,7 @@ public final class Policy { if (!other.conditionList_.isEmpty()) { if (conditionList_.isEmpty()) { conditionList_ = other.conditionList_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000008); } else { ensureConditionListIsMutable(); conditionList_.addAll(other.conditionList_); @@ -2466,7 +2272,7 @@ public final class Policy { conditionListBuilder_.dispose(); conditionListBuilder_ = null; conditionList_ = other.conditionList_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000008); conditionListBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getConditionListFieldBuilder() : null; } else { conditionListBuilder_.addAllMessages(other.conditionList_); @@ -2480,7 +2286,7 @@ public final class Policy { if (!other.actionList_.isEmpty()) { if (actionList_.isEmpty()) { actionList_ = other.actionList_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000020); } else { ensureActionListIsMutable(); actionList_.addAll(other.actionList_); @@ -2493,14 +2299,14 @@ public final class Policy { actionListBuilder_.dispose(); actionListBuilder_ = null; actionList_ = other.actionList_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000020); actionListBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getActionListFieldBuilder() : null; } else { actionListBuilder_.addAllMessages(other.actionList_); } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2512,17 +2318,87 @@ public final class Policy { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - policy.Policy.PolicyRuleBasic parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getPolicyRuleIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + input.readMessage(getPolicyRuleStateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 24: + { + priority_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } + // case 24 + case 34: + { + policy.PolicyCondition.PolicyRuleCondition m = input.readMessage(policy.PolicyCondition.PolicyRuleCondition.parser(), extensionRegistry); + if (conditionListBuilder_ == null) { + ensureConditionListIsMutable(); + conditionList_.add(m); + } else { + conditionListBuilder_.addMessage(m); + } + break; + } + // case 34 + case 40: + { + booleanOperator_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } + // case 40 + case 50: + { + policy.PolicyAction.PolicyRuleAction m = input.readMessage(policy.PolicyAction.PolicyRuleAction.parser(), extensionRegistry); + if (actionListBuilder_ == null) { + ensureActionListIsMutable(); + actionList_.add(m); + } else { + actionListBuilder_.addMessage(m); + } + break; + } + // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (policy.Policy.PolicyRuleBasic) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -2537,7 +2413,7 @@ public final class Policy { * @return Whether the policyRuleId field is set. */ public boolean hasPolicyRuleId() { - return policyRuleIdBuilder_ != null || policyRuleId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -2561,10 +2437,11 @@ public final class Policy { throw new NullPointerException(); } policyRuleId_ = value; - onChanged(); } else { policyRuleIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -2574,10 +2451,11 @@ public final class Policy { public Builder setPolicyRuleId(policy.Policy.PolicyRuleId.Builder builderForValue) { if (policyRuleIdBuilder_ == null) { policyRuleId_ = builderForValue.build(); - onChanged(); } else { policyRuleIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -2586,15 +2464,16 @@ public final class Policy { */ public Builder mergePolicyRuleId(policy.Policy.PolicyRuleId value) { if (policyRuleIdBuilder_ == null) { - if (policyRuleId_ != null) { - policyRuleId_ = policy.Policy.PolicyRuleId.newBuilder(policyRuleId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && policyRuleId_ != null && policyRuleId_ != policy.Policy.PolicyRuleId.getDefaultInstance()) { + getPolicyRuleIdBuilder().mergeFrom(value); } else { policyRuleId_ = value; } - onChanged(); } else { policyRuleIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -2602,13 +2481,13 @@ public final class Policy { * <code>.policy.PolicyRuleId policyRuleId = 1;</code> */ public Builder clearPolicyRuleId() { - if (policyRuleIdBuilder_ == null) { - policyRuleId_ = null; - onChanged(); - } else { - policyRuleId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + policyRuleId_ = null; + if (policyRuleIdBuilder_ != null) { + policyRuleIdBuilder_.dispose(); policyRuleIdBuilder_ = null; } + onChanged(); return this; } @@ -2616,6 +2495,7 @@ public final class Policy { * <code>.policy.PolicyRuleId policyRuleId = 1;</code> */ public policy.Policy.PolicyRuleId.Builder getPolicyRuleIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getPolicyRuleIdFieldBuilder().getBuilder(); } @@ -2655,7 +2535,7 @@ public final class Policy { * @return Whether the policyRuleState field is set. */ public boolean hasPolicyRuleState() { - return policyRuleStateBuilder_ != null || policyRuleState_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** @@ -2687,10 +2567,11 @@ public final class Policy { throw new NullPointerException(); } policyRuleState_ = value; - onChanged(); } else { policyRuleStateBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -2704,10 +2585,11 @@ public final class Policy { public Builder setPolicyRuleState(policy.Policy.PolicyRuleState.Builder builderForValue) { if (policyRuleStateBuilder_ == null) { policyRuleState_ = builderForValue.build(); - onChanged(); } else { policyRuleStateBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -2720,15 +2602,16 @@ public final class Policy { */ public Builder mergePolicyRuleState(policy.Policy.PolicyRuleState value) { if (policyRuleStateBuilder_ == null) { - if (policyRuleState_ != null) { - policyRuleState_ = policy.Policy.PolicyRuleState.newBuilder(policyRuleState_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000002) != 0) && policyRuleState_ != null && policyRuleState_ != policy.Policy.PolicyRuleState.getDefaultInstance()) { + getPolicyRuleStateBuilder().mergeFrom(value); } else { policyRuleState_ = value; } - onChanged(); } else { policyRuleStateBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -2740,13 +2623,13 @@ public final class Policy { * <code>.policy.PolicyRuleState policyRuleState = 2;</code> */ public Builder clearPolicyRuleState() { - if (policyRuleStateBuilder_ == null) { - policyRuleState_ = null; - onChanged(); - } else { - policyRuleState_ = null; + bitField0_ = (bitField0_ & ~0x00000002); + policyRuleState_ = null; + if (policyRuleStateBuilder_ != null) { + policyRuleStateBuilder_.dispose(); policyRuleStateBuilder_ = null; } + onChanged(); return this; } @@ -2758,6 +2641,7 @@ public final class Policy { * <code>.policy.PolicyRuleState policyRuleState = 2;</code> */ public policy.Policy.PolicyRuleState.Builder getPolicyRuleStateBuilder() { + bitField0_ |= 0x00000002; onChanged(); return getPolicyRuleStateFieldBuilder().getBuilder(); } @@ -2810,6 +2694,7 @@ public final class Policy { */ public Builder setPriority(int value) { priority_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -2819,6 +2704,7 @@ public final class Policy { * @return This builder for chaining. */ public Builder clearPriority() { + bitField0_ = (bitField0_ & ~0x00000004); priority_ = 0; onChanged(); return this; @@ -2827,9 +2713,9 @@ public final class Policy { private java.util.List<policy.PolicyCondition.PolicyRuleCondition> conditionList_ = java.util.Collections.emptyList(); private void ensureConditionListIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!((bitField0_ & 0x00000008) != 0)) { conditionList_ = new java.util.ArrayList<policy.PolicyCondition.PolicyRuleCondition>(conditionList_); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000008; } } @@ -3025,7 +2911,7 @@ public final class Policy { public Builder clearConditionList() { if (conditionListBuilder_ == null) { conditionList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { conditionListBuilder_.clear(); @@ -3127,7 +3013,7 @@ public final class Policy { private com.google.protobuf.RepeatedFieldBuilderV3<policy.PolicyCondition.PolicyRuleCondition, policy.PolicyCondition.PolicyRuleCondition.Builder, policy.PolicyCondition.PolicyRuleConditionOrBuilder> getConditionListFieldBuilder() { if (conditionListBuilder_ == null) { - conditionListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<policy.PolicyCondition.PolicyRuleCondition, policy.PolicyCondition.PolicyRuleCondition.Builder, policy.PolicyCondition.PolicyRuleConditionOrBuilder>(conditionList_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + conditionListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<policy.PolicyCondition.PolicyRuleCondition, policy.PolicyCondition.PolicyRuleCondition.Builder, policy.PolicyCondition.PolicyRuleConditionOrBuilder>(conditionList_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); conditionList_ = null; } return conditionListBuilder_; @@ -3159,6 +3045,7 @@ public final class Policy { */ public Builder setBooleanOperatorValue(int value) { booleanOperator_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -3173,8 +3060,7 @@ public final class Policy { */ @java.lang.Override public policy.PolicyCondition.BooleanOperator getBooleanOperator() { - @SuppressWarnings("deprecation") - policy.PolicyCondition.BooleanOperator result = policy.PolicyCondition.BooleanOperator.valueOf(booleanOperator_); + policy.PolicyCondition.BooleanOperator result = policy.PolicyCondition.BooleanOperator.forNumber(booleanOperator_); return result == null ? policy.PolicyCondition.BooleanOperator.UNRECOGNIZED : result; } @@ -3191,6 +3077,7 @@ public final class Policy { if (value == null) { throw new NullPointerException(); } + bitField0_ |= 0x00000010; booleanOperator_ = value.getNumber(); onChanged(); return this; @@ -3205,6 +3092,7 @@ public final class Policy { * @return This builder for chaining. */ public Builder clearBooleanOperator() { + bitField0_ = (bitField0_ & ~0x00000010); booleanOperator_ = 0; onChanged(); return this; @@ -3213,9 +3101,9 @@ public final class Policy { private java.util.List<policy.PolicyAction.PolicyRuleAction> actionList_ = java.util.Collections.emptyList(); private void ensureActionListIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { + if (!((bitField0_ & 0x00000020) != 0)) { actionList_ = new java.util.ArrayList<policy.PolicyAction.PolicyRuleAction>(actionList_); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000020; } } @@ -3411,7 +3299,7 @@ public final class Policy { public Builder clearActionList() { if (actionListBuilder_ == null) { actionList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000020); onChanged(); } else { actionListBuilder_.clear(); @@ -3513,7 +3401,7 @@ public final class Policy { private com.google.protobuf.RepeatedFieldBuilderV3<policy.PolicyAction.PolicyRuleAction, policy.PolicyAction.PolicyRuleAction.Builder, policy.PolicyAction.PolicyRuleActionOrBuilder> getActionListFieldBuilder() { if (actionListBuilder_ == null) { - actionListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<policy.PolicyAction.PolicyRuleAction, policy.PolicyAction.PolicyRuleAction.Builder, policy.PolicyAction.PolicyRuleActionOrBuilder>(actionList_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + actionListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<policy.PolicyAction.PolicyRuleAction, policy.PolicyAction.PolicyRuleAction.Builder, policy.PolicyAction.PolicyRuleActionOrBuilder>(actionList_, ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); actionList_ = null; } return actionListBuilder_; @@ -3546,8 +3434,18 @@ public final class Policy { @java.lang.Override public PolicyRuleBasic parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PolicyRuleBasic(input, extensionRegistry); - } + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } }; public static com.google.protobuf.Parser<PolicyRuleBasic> parser() { @@ -3699,83 +3597,6 @@ public final class Policy { return new PolicyRuleService(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private PolicyRuleService(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - policy.Policy.PolicyRuleBasic.Builder subBuilder = null; - if (policyRuleBasic_ != null) { - subBuilder = policyRuleBasic_.toBuilder(); - } - policyRuleBasic_ = input.readMessage(policy.Policy.PolicyRuleBasic.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(policyRuleBasic_); - policyRuleBasic_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - context.ContextOuterClass.ServiceId.Builder subBuilder = null; - if (serviceId_ != null) { - subBuilder = serviceId_.toBuilder(); - } - serviceId_ = input.readMessage(context.ContextOuterClass.ServiceId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(serviceId_); - serviceId_ = subBuilder.buildPartial(); - } - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - deviceList_ = new java.util.ArrayList<context.ContextOuterClass.DeviceId>(); - mutable_bitField0_ |= 0x00000001; - } - deviceList_.add(input.readMessage(context.ContextOuterClass.DeviceId.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - deviceList_ = java.util.Collections.unmodifiableList(deviceList_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return policy.Policy.internal_static_policy_PolicyRuleService_descriptor; } @@ -3824,7 +3645,7 @@ public final class Policy { */ @java.lang.Override public policy.Policy.PolicyRuleBasicOrBuilder getPolicyRuleBasicOrBuilder() { - return getPolicyRuleBasic(); + return policyRuleBasic_ == null ? policy.Policy.PolicyRuleBasic.getDefaultInstance() : policyRuleBasic_; } public static final int SERVICEID_FIELD_NUMBER = 2; @@ -3866,11 +3687,12 @@ public final class Policy { */ @java.lang.Override public context.ContextOuterClass.ServiceIdOrBuilder getServiceIdOrBuilder() { - return getServiceId(); + return serviceId_ == null ? context.ContextOuterClass.ServiceId.getDefaultInstance() : serviceId_; } public static final int DEVICELIST_FIELD_NUMBER = 3; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.DeviceId> deviceList_; /** @@ -3957,7 +3779,7 @@ public final class Policy { for (int i = 0; i < deviceList_.size(); i++) { output.writeMessage(3, deviceList_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3975,7 +3797,7 @@ public final class Policy { for (int i = 0; i < deviceList_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, deviceList_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -4003,7 +3825,7 @@ public final class Policy { } if (!getDeviceListList().equals(other.getDeviceListList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4027,7 +3849,7 @@ public final class Policy { hash = (37 * hash) + DEVICELIST_FIELD_NUMBER; hash = (53 * hash) + getDeviceListList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -4125,41 +3947,33 @@ public final class Policy { // Construct using policy.Policy.PolicyRuleService.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getDeviceListFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); - if (policyRuleBasicBuilder_ == null) { - policyRuleBasic_ = null; - } else { - policyRuleBasic_ = null; + bitField0_ = 0; + policyRuleBasic_ = null; + if (policyRuleBasicBuilder_ != null) { + policyRuleBasicBuilder_.dispose(); policyRuleBasicBuilder_ = null; } - if (serviceIdBuilder_ == null) { - serviceId_ = null; - } else { - serviceId_ = null; + serviceId_ = null; + if (serviceIdBuilder_ != null) { + serviceIdBuilder_.dispose(); serviceIdBuilder_ = null; } if (deviceListBuilder_ == null) { deviceList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + deviceList_ = null; deviceListBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -4185,58 +3999,34 @@ public final class Policy { @java.lang.Override public policy.Policy.PolicyRuleService buildPartial() { policy.Policy.PolicyRuleService result = new policy.Policy.PolicyRuleService(this); - int from_bitField0_ = bitField0_; - if (policyRuleBasicBuilder_ == null) { - result.policyRuleBasic_ = policyRuleBasic_; - } else { - result.policyRuleBasic_ = policyRuleBasicBuilder_.build(); - } - if (serviceIdBuilder_ == null) { - result.serviceId_ = serviceId_; - } else { - result.serviceId_ = serviceIdBuilder_.build(); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(policy.Policy.PolicyRuleService result) { if (deviceListBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { deviceList_ = java.util.Collections.unmodifiableList(deviceList_); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); } result.deviceList_ = deviceList_; } else { result.deviceList_ = deviceListBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); } - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(policy.Policy.PolicyRuleService result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.policyRuleBasic_ = policyRuleBasicBuilder_ == null ? policyRuleBasic_ : policyRuleBasicBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.serviceId_ = serviceIdBuilder_ == null ? serviceId_ : serviceIdBuilder_.build(); + } } @java.lang.Override @@ -4262,7 +4052,7 @@ public final class Policy { if (!other.deviceList_.isEmpty()) { if (deviceList_.isEmpty()) { deviceList_ = other.deviceList_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); } else { ensureDeviceListIsMutable(); deviceList_.addAll(other.deviceList_); @@ -4275,14 +4065,14 @@ public final class Policy { deviceListBuilder_.dispose(); deviceListBuilder_ = null; deviceList_ = other.deviceList_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); deviceListBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getDeviceListFieldBuilder() : null; } else { deviceListBuilder_.addAllMessages(other.deviceList_); } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4294,17 +4084,61 @@ public final class Policy { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - policy.Policy.PolicyRuleService parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getPolicyRuleBasicFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + input.readMessage(getServiceIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } + // case 18 + case 26: + { + context.ContextOuterClass.DeviceId m = input.readMessage(context.ContextOuterClass.DeviceId.parser(), extensionRegistry); + if (deviceListBuilder_ == null) { + ensureDeviceListIsMutable(); + deviceList_.add(m); + } else { + deviceListBuilder_.addMessage(m); + } + break; + } + // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (policy.Policy.PolicyRuleService) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -4323,7 +4157,7 @@ public final class Policy { * @return Whether the policyRuleBasic field is set. */ public boolean hasPolicyRuleBasic() { - return policyRuleBasicBuilder_ != null || policyRuleBasic_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -4355,10 +4189,11 @@ public final class Policy { throw new NullPointerException(); } policyRuleBasic_ = value; - onChanged(); } else { policyRuleBasicBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -4372,10 +4207,11 @@ public final class Policy { public Builder setPolicyRuleBasic(policy.Policy.PolicyRuleBasic.Builder builderForValue) { if (policyRuleBasicBuilder_ == null) { policyRuleBasic_ = builderForValue.build(); - onChanged(); } else { policyRuleBasicBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -4388,15 +4224,16 @@ public final class Policy { */ public Builder mergePolicyRuleBasic(policy.Policy.PolicyRuleBasic value) { if (policyRuleBasicBuilder_ == null) { - if (policyRuleBasic_ != null) { - policyRuleBasic_ = policy.Policy.PolicyRuleBasic.newBuilder(policyRuleBasic_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && policyRuleBasic_ != null && policyRuleBasic_ != policy.Policy.PolicyRuleBasic.getDefaultInstance()) { + getPolicyRuleBasicBuilder().mergeFrom(value); } else { policyRuleBasic_ = value; } - onChanged(); } else { policyRuleBasicBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -4408,13 +4245,13 @@ public final class Policy { * <code>.policy.PolicyRuleBasic policyRuleBasic = 1;</code> */ public Builder clearPolicyRuleBasic() { - if (policyRuleBasicBuilder_ == null) { - policyRuleBasic_ = null; - onChanged(); - } else { - policyRuleBasic_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + policyRuleBasic_ = null; + if (policyRuleBasicBuilder_ != null) { + policyRuleBasicBuilder_.dispose(); policyRuleBasicBuilder_ = null; } + onChanged(); return this; } @@ -4426,6 +4263,7 @@ public final class Policy { * <code>.policy.PolicyRuleBasic policyRuleBasic = 1;</code> */ public policy.Policy.PolicyRuleBasic.Builder getPolicyRuleBasicBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getPolicyRuleBasicFieldBuilder().getBuilder(); } @@ -4473,7 +4311,7 @@ public final class Policy { * @return Whether the serviceId field is set. */ public boolean hasServiceId() { - return serviceIdBuilder_ != null || serviceId_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** @@ -4505,10 +4343,11 @@ public final class Policy { throw new NullPointerException(); } serviceId_ = value; - onChanged(); } else { serviceIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -4522,10 +4361,11 @@ public final class Policy { public Builder setServiceId(context.ContextOuterClass.ServiceId.Builder builderForValue) { if (serviceIdBuilder_ == null) { serviceId_ = builderForValue.build(); - onChanged(); } else { serviceIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -4538,15 +4378,16 @@ public final class Policy { */ public Builder mergeServiceId(context.ContextOuterClass.ServiceId value) { if (serviceIdBuilder_ == null) { - if (serviceId_ != null) { - serviceId_ = context.ContextOuterClass.ServiceId.newBuilder(serviceId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000002) != 0) && serviceId_ != null && serviceId_ != context.ContextOuterClass.ServiceId.getDefaultInstance()) { + getServiceIdBuilder().mergeFrom(value); } else { serviceId_ = value; } - onChanged(); } else { serviceIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000002; + onChanged(); return this; } @@ -4558,13 +4399,13 @@ public final class Policy { * <code>.context.ServiceId serviceId = 2;</code> */ public Builder clearServiceId() { - if (serviceIdBuilder_ == null) { - serviceId_ = null; - onChanged(); - } else { - serviceId_ = null; + bitField0_ = (bitField0_ & ~0x00000002); + serviceId_ = null; + if (serviceIdBuilder_ != null) { + serviceIdBuilder_.dispose(); serviceIdBuilder_ = null; } + onChanged(); return this; } @@ -4576,6 +4417,7 @@ public final class Policy { * <code>.context.ServiceId serviceId = 2;</code> */ public context.ContextOuterClass.ServiceId.Builder getServiceIdBuilder() { + bitField0_ |= 0x00000002; onChanged(); return getServiceIdFieldBuilder().getBuilder(); } @@ -4613,9 +4455,9 @@ public final class Policy { private java.util.List<context.ContextOuterClass.DeviceId> deviceList_ = java.util.Collections.emptyList(); private void ensureDeviceListIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!((bitField0_ & 0x00000004) != 0)) { deviceList_ = new java.util.ArrayList<context.ContextOuterClass.DeviceId>(deviceList_); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000004; } } @@ -4811,7 +4653,7 @@ public final class Policy { public Builder clearDeviceList() { if (deviceListBuilder_ == null) { deviceList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { deviceListBuilder_.clear(); @@ -4913,7 +4755,7 @@ public final class Policy { private com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> getDeviceListFieldBuilder() { if (deviceListBuilder_ == null) { - deviceListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder>(deviceList_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + deviceListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder>(deviceList_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); deviceList_ = null; } return deviceListBuilder_; @@ -4946,7 +4788,17 @@ public final class Policy { @java.lang.Override public PolicyRuleService parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PolicyRuleService(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -5070,70 +4922,6 @@ public final class Policy { return new PolicyRuleDevice(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private PolicyRuleDevice(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - policy.Policy.PolicyRuleBasic.Builder subBuilder = null; - if (policyRuleBasic_ != null) { - subBuilder = policyRuleBasic_.toBuilder(); - } - policyRuleBasic_ = input.readMessage(policy.Policy.PolicyRuleBasic.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(policyRuleBasic_); - policyRuleBasic_ = subBuilder.buildPartial(); - } - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - deviceList_ = new java.util.ArrayList<context.ContextOuterClass.DeviceId>(); - mutable_bitField0_ |= 0x00000001; - } - deviceList_.add(input.readMessage(context.ContextOuterClass.DeviceId.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - deviceList_ = java.util.Collections.unmodifiableList(deviceList_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return policy.Policy.internal_static_policy_PolicyRuleDevice_descriptor; } @@ -5182,11 +4970,12 @@ public final class Policy { */ @java.lang.Override public policy.Policy.PolicyRuleBasicOrBuilder getPolicyRuleBasicOrBuilder() { - return getPolicyRuleBasic(); + return policyRuleBasic_ == null ? policy.Policy.PolicyRuleBasic.getDefaultInstance() : policyRuleBasic_; } public static final int DEVICELIST_FIELD_NUMBER = 2; + @SuppressWarnings("serial") private java.util.List<context.ContextOuterClass.DeviceId> deviceList_; /** @@ -5270,7 +5059,7 @@ public final class Policy { for (int i = 0; i < deviceList_.size(); i++) { output.writeMessage(2, deviceList_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -5285,7 +5074,7 @@ public final class Policy { for (int i = 0; i < deviceList_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, deviceList_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -5307,7 +5096,7 @@ public final class Policy { } if (!getDeviceListList().equals(other.getDeviceListList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -5327,7 +5116,7 @@ public final class Policy { hash = (37 * hash) + DEVICELIST_FIELD_NUMBER; hash = (53 * hash) + getDeviceListList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -5425,35 +5214,28 @@ public final class Policy { // Construct using policy.Policy.PolicyRuleDevice.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getDeviceListFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); - if (policyRuleBasicBuilder_ == null) { - policyRuleBasic_ = null; - } else { - policyRuleBasic_ = null; + bitField0_ = 0; + policyRuleBasic_ = null; + if (policyRuleBasicBuilder_ != null) { + policyRuleBasicBuilder_.dispose(); policyRuleBasicBuilder_ = null; } if (deviceListBuilder_ == null) { deviceList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + deviceList_ = null; deviceListBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -5479,53 +5261,31 @@ public final class Policy { @java.lang.Override public policy.Policy.PolicyRuleDevice buildPartial() { policy.Policy.PolicyRuleDevice result = new policy.Policy.PolicyRuleDevice(this); - int from_bitField0_ = bitField0_; - if (policyRuleBasicBuilder_ == null) { - result.policyRuleBasic_ = policyRuleBasic_; - } else { - result.policyRuleBasic_ = policyRuleBasicBuilder_.build(); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(policy.Policy.PolicyRuleDevice result) { if (deviceListBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000002) != 0)) { deviceList_ = java.util.Collections.unmodifiableList(deviceList_); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); } result.deviceList_ = deviceList_; } else { result.deviceList_ = deviceListBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); } - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(policy.Policy.PolicyRuleDevice result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.policyRuleBasic_ = policyRuleBasicBuilder_ == null ? policyRuleBasic_ : policyRuleBasicBuilder_.build(); + } } @java.lang.Override @@ -5548,7 +5308,7 @@ public final class Policy { if (!other.deviceList_.isEmpty()) { if (deviceList_.isEmpty()) { deviceList_ = other.deviceList_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); } else { ensureDeviceListIsMutable(); deviceList_.addAll(other.deviceList_); @@ -5561,14 +5321,14 @@ public final class Policy { deviceListBuilder_.dispose(); deviceListBuilder_ = null; deviceList_ = other.deviceList_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); deviceListBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getDeviceListFieldBuilder() : null; } else { deviceListBuilder_.addAllMessages(other.deviceList_); } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -5580,17 +5340,54 @@ public final class Policy { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - policy.Policy.PolicyRuleDevice parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getPolicyRuleBasicFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + context.ContextOuterClass.DeviceId m = input.readMessage(context.ContextOuterClass.DeviceId.parser(), extensionRegistry); + if (deviceListBuilder_ == null) { + ensureDeviceListIsMutable(); + deviceList_.add(m); + } else { + deviceListBuilder_.addMessage(m); + } + break; + } + // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (policy.Policy.PolicyRuleDevice) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -5609,7 +5406,7 @@ public final class Policy { * @return Whether the policyRuleBasic field is set. */ public boolean hasPolicyRuleBasic() { - return policyRuleBasicBuilder_ != null || policyRuleBasic_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** @@ -5641,10 +5438,11 @@ public final class Policy { throw new NullPointerException(); } policyRuleBasic_ = value; - onChanged(); } else { policyRuleBasicBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -5658,10 +5456,11 @@ public final class Policy { public Builder setPolicyRuleBasic(policy.Policy.PolicyRuleBasic.Builder builderForValue) { if (policyRuleBasicBuilder_ == null) { policyRuleBasic_ = builderForValue.build(); - onChanged(); } else { policyRuleBasicBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -5674,15 +5473,16 @@ public final class Policy { */ public Builder mergePolicyRuleBasic(policy.Policy.PolicyRuleBasic value) { if (policyRuleBasicBuilder_ == null) { - if (policyRuleBasic_ != null) { - policyRuleBasic_ = policy.Policy.PolicyRuleBasic.newBuilder(policyRuleBasic_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && policyRuleBasic_ != null && policyRuleBasic_ != policy.Policy.PolicyRuleBasic.getDefaultInstance()) { + getPolicyRuleBasicBuilder().mergeFrom(value); } else { policyRuleBasic_ = value; } - onChanged(); } else { policyRuleBasicBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } @@ -5694,13 +5494,13 @@ public final class Policy { * <code>.policy.PolicyRuleBasic policyRuleBasic = 1;</code> */ public Builder clearPolicyRuleBasic() { - if (policyRuleBasicBuilder_ == null) { - policyRuleBasic_ = null; - onChanged(); - } else { - policyRuleBasic_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + policyRuleBasic_ = null; + if (policyRuleBasicBuilder_ != null) { + policyRuleBasicBuilder_.dispose(); policyRuleBasicBuilder_ = null; } + onChanged(); return this; } @@ -5712,6 +5512,7 @@ public final class Policy { * <code>.policy.PolicyRuleBasic policyRuleBasic = 1;</code> */ public policy.Policy.PolicyRuleBasic.Builder getPolicyRuleBasicBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getPolicyRuleBasicFieldBuilder().getBuilder(); } @@ -5749,9 +5550,9 @@ public final class Policy { private java.util.List<context.ContextOuterClass.DeviceId> deviceList_ = java.util.Collections.emptyList(); private void ensureDeviceListIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!((bitField0_ & 0x00000002) != 0)) { deviceList_ = new java.util.ArrayList<context.ContextOuterClass.DeviceId>(deviceList_); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000002; } } @@ -5947,7 +5748,7 @@ public final class Policy { public Builder clearDeviceList() { if (deviceListBuilder_ == null) { deviceList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { deviceListBuilder_.clear(); @@ -6049,7 +5850,7 @@ public final class Policy { private com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder> getDeviceListFieldBuilder() { if (deviceListBuilder_ == null) { - deviceListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder>(deviceList_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + deviceListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<context.ContextOuterClass.DeviceId, context.ContextOuterClass.DeviceId.Builder, context.ContextOuterClass.DeviceIdOrBuilder>(deviceList_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); deviceList_ = null; } return deviceListBuilder_; @@ -6082,7 +5883,17 @@ public final class Policy { @java.lang.Override public PolicyRuleDevice parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PolicyRuleDevice(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -6138,7 +5949,7 @@ public final class Policy { */ policy.Policy.PolicyRuleDeviceOrBuilder getDeviceOrBuilder(); - public policy.Policy.PolicyRule.PolicyRuleCase getPolicyRuleCase(); + policy.Policy.PolicyRule.PolicyRuleCase getPolicyRuleCase(); } /** @@ -6167,72 +5978,6 @@ public final class Policy { return new PolicyRule(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private PolicyRule(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - policy.Policy.PolicyRuleService.Builder subBuilder = null; - if (policyRuleCase_ == 1) { - subBuilder = ((policy.Policy.PolicyRuleService) policyRule_).toBuilder(); - } - policyRule_ = input.readMessage(policy.Policy.PolicyRuleService.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((policy.Policy.PolicyRuleService) policyRule_); - policyRule_ = subBuilder.buildPartial(); - } - policyRuleCase_ = 1; - break; - } - case 18: - { - policy.Policy.PolicyRuleDevice.Builder subBuilder = null; - if (policyRuleCase_ == 2) { - subBuilder = ((policy.Policy.PolicyRuleDevice) policyRule_).toBuilder(); - } - policyRule_ = input.readMessage(policy.Policy.PolicyRuleDevice.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((policy.Policy.PolicyRuleDevice) policyRule_); - policyRule_ = subBuilder.buildPartial(); - } - policyRuleCase_ = 2; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return policy.Policy.internal_static_policy_PolicyRule_descriptor; } @@ -6244,6 +5989,7 @@ public final class Policy { private int policyRuleCase_ = 0; + @SuppressWarnings("serial") private java.lang.Object policyRule_; public enum PolicyRuleCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { @@ -6377,7 +6123,7 @@ public final class Policy { if (policyRuleCase_ == 2) { output.writeMessage(2, (policy.Policy.PolicyRuleDevice) policyRule_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -6392,7 +6138,7 @@ public final class Policy { if (policyRuleCase_ == 2) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, (policy.Policy.PolicyRuleDevice) policyRule_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -6420,7 +6166,7 @@ public final class Policy { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -6444,7 +6190,7 @@ public final class Policy { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -6542,22 +6288,22 @@ public final class Policy { // Construct using policy.Policy.PolicyRule.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; + if (serviceBuilder_ != null) { + serviceBuilder_.clear(); + } + if (deviceBuilder_ != null) { + deviceBuilder_.clear(); + } policyRuleCase_ = 0; policyRule_ = null; return this; @@ -6577,61 +6323,35 @@ public final class Policy { public policy.Policy.PolicyRule build() { policy.Policy.PolicyRule result = buildPartial(); if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public policy.Policy.PolicyRule buildPartial() { - policy.Policy.PolicyRule result = new policy.Policy.PolicyRule(this); - if (policyRuleCase_ == 1) { - if (serviceBuilder_ == null) { - result.policyRule_ = policyRule_; - } else { - result.policyRule_ = serviceBuilder_.build(); - } - } - if (policyRuleCase_ == 2) { - if (deviceBuilder_ == null) { - result.policyRule_ = policyRule_; - } else { - result.policyRule_ = deviceBuilder_.build(); - } - } - result.policyRuleCase_ = policyRuleCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); + throw newUninitializedMessageException(result); + } + return result; } @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); + public policy.Policy.PolicyRule buildPartial() { + policy.Policy.PolicyRule result = new policy.Policy.PolicyRule(this); + if (bitField0_ != 0) { + buildPartial0(result); + } + buildPartialOneofs(result); + onBuilt(); + return result; } - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); + private void buildPartial0(policy.Policy.PolicyRule result) { + int from_bitField0_ = bitField0_; } - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartialOneofs(policy.Policy.PolicyRule result) { + result.policyRuleCase_ = policyRuleCase_; + result.policyRule_ = this.policyRule_; + if (policyRuleCase_ == 1 && serviceBuilder_ != null) { + result.policyRule_ = serviceBuilder_.build(); + } + if (policyRuleCase_ == 2 && deviceBuilder_ != null) { + result.policyRule_ = deviceBuilder_.build(); + } } @java.lang.Override @@ -6663,7 +6383,7 @@ public final class Policy { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -6675,17 +6395,49 @@ public final class Policy { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - policy.Policy.PolicyRule parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getServiceFieldBuilder().getBuilder(), extensionRegistry); + policyRuleCase_ = 1; + break; + } + // case 10 + case 18: + { + input.readMessage(getDeviceFieldBuilder().getBuilder(), extensionRegistry); + policyRuleCase_ = 2; + break; + } + // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (policy.Policy.PolicyRule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -6704,6 +6456,8 @@ public final class Policy { return this; } + private int bitField0_; + private com.google.protobuf.SingleFieldBuilderV3<policy.Policy.PolicyRuleService, policy.Policy.PolicyRuleService.Builder, policy.Policy.PolicyRuleServiceOrBuilder> serviceBuilder_; /** @@ -6779,8 +6533,9 @@ public final class Policy { } else { if (policyRuleCase_ == 1) { serviceBuilder_.mergeFrom(value); + } else { + serviceBuilder_.setMessage(value); } - serviceBuilder_.setMessage(value); } policyRuleCase_ = 1; return this; @@ -6841,7 +6596,6 @@ public final class Policy { } policyRuleCase_ = 1; onChanged(); - ; return serviceBuilder_; } @@ -6920,8 +6674,9 @@ public final class Policy { } else { if (policyRuleCase_ == 2) { deviceBuilder_.mergeFrom(value); + } else { + deviceBuilder_.setMessage(value); } - deviceBuilder_.setMessage(value); } policyRuleCase_ = 2; return this; @@ -6982,7 +6737,6 @@ public final class Policy { } policyRuleCase_ = 2; onChanged(); - ; return deviceBuilder_; } @@ -7013,7 +6767,17 @@ public final class Policy { @java.lang.Override public PolicyRule parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PolicyRule(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -7088,57 +6852,6 @@ public final class Policy { return new PolicyRuleIdList(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private PolicyRuleIdList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - policyRuleIdList_ = new java.util.ArrayList<policy.Policy.PolicyRuleId>(); - mutable_bitField0_ |= 0x00000001; - } - policyRuleIdList_.add(input.readMessage(policy.Policy.PolicyRuleId.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - policyRuleIdList_ = java.util.Collections.unmodifiableList(policyRuleIdList_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return policy.Policy.internal_static_policy_PolicyRuleIdList_descriptor; } @@ -7150,6 +6863,7 @@ public final class Policy { public static final int POLICYRULEIDLIST_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List<policy.Policy.PolicyRuleId> policyRuleIdList_; /** @@ -7210,7 +6924,7 @@ public final class Policy { for (int i = 0; i < policyRuleIdList_.size(); i++) { output.writeMessage(1, policyRuleIdList_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -7222,7 +6936,7 @@ public final class Policy { for (int i = 0; i < policyRuleIdList_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, policyRuleIdList_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -7238,7 +6952,7 @@ public final class Policy { policy.Policy.PolicyRuleIdList other = (policy.Policy.PolicyRuleIdList) obj; if (!getPolicyRuleIdListList().equals(other.getPolicyRuleIdListList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -7254,7 +6968,7 @@ public final class Policy { hash = (37 * hash) + POLICYRULEIDLIST_FIELD_NUMBER; hash = (53 * hash) + getPolicyRuleIdListList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -7352,29 +7066,23 @@ public final class Policy { // Construct using policy.Policy.PolicyRuleIdList.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getPolicyRuleIdListFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (policyRuleIdListBuilder_ == null) { policyRuleIdList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + policyRuleIdList_ = null; policyRuleIdListBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -7400,7 +7108,15 @@ public final class Policy { @java.lang.Override public policy.Policy.PolicyRuleIdList buildPartial() { policy.Policy.PolicyRuleIdList result = new policy.Policy.PolicyRuleIdList(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(policy.Policy.PolicyRuleIdList result) { if (policyRuleIdListBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { policyRuleIdList_ = java.util.Collections.unmodifiableList(policyRuleIdList_); @@ -7410,38 +7126,10 @@ public final class Policy { } else { result.policyRuleIdList_ = policyRuleIdListBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); } - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(policy.Policy.PolicyRuleIdList result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -7481,7 +7169,7 @@ public final class Policy { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -7493,17 +7181,47 @@ public final class Policy { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - policy.Policy.PolicyRuleIdList parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + policy.Policy.PolicyRuleId m = input.readMessage(policy.Policy.PolicyRuleId.parser(), extensionRegistry); + if (policyRuleIdListBuilder_ == null) { + ensurePolicyRuleIdListIsMutable(); + policyRuleIdList_.add(m); + } else { + policyRuleIdListBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (policy.Policy.PolicyRuleIdList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -7773,7 +7491,17 @@ public final class Policy { @java.lang.Override public PolicyRuleIdList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PolicyRuleIdList(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -7848,57 +7576,6 @@ public final class Policy { return new PolicyRuleServiceList(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private PolicyRuleServiceList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - policyRuleServiceList_ = new java.util.ArrayList<policy.Policy.PolicyRuleService>(); - mutable_bitField0_ |= 0x00000001; - } - policyRuleServiceList_.add(input.readMessage(policy.Policy.PolicyRuleService.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - policyRuleServiceList_ = java.util.Collections.unmodifiableList(policyRuleServiceList_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return policy.Policy.internal_static_policy_PolicyRuleServiceList_descriptor; } @@ -7910,6 +7587,7 @@ public final class Policy { public static final int POLICYRULESERVICELIST_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List<policy.Policy.PolicyRuleService> policyRuleServiceList_; /** @@ -7970,7 +7648,7 @@ public final class Policy { for (int i = 0; i < policyRuleServiceList_.size(); i++) { output.writeMessage(1, policyRuleServiceList_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -7982,7 +7660,7 @@ public final class Policy { for (int i = 0; i < policyRuleServiceList_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, policyRuleServiceList_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -7998,7 +7676,7 @@ public final class Policy { policy.Policy.PolicyRuleServiceList other = (policy.Policy.PolicyRuleServiceList) obj; if (!getPolicyRuleServiceListList().equals(other.getPolicyRuleServiceListList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -8014,7 +7692,7 @@ public final class Policy { hash = (37 * hash) + POLICYRULESERVICELIST_FIELD_NUMBER; hash = (53 * hash) + getPolicyRuleServiceListList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -8112,29 +7790,23 @@ public final class Policy { // Construct using policy.Policy.PolicyRuleServiceList.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getPolicyRuleServiceListFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (policyRuleServiceListBuilder_ == null) { policyRuleServiceList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + policyRuleServiceList_ = null; policyRuleServiceListBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -8160,7 +7832,15 @@ public final class Policy { @java.lang.Override public policy.Policy.PolicyRuleServiceList buildPartial() { policy.Policy.PolicyRuleServiceList result = new policy.Policy.PolicyRuleServiceList(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(policy.Policy.PolicyRuleServiceList result) { if (policyRuleServiceListBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { policyRuleServiceList_ = java.util.Collections.unmodifiableList(policyRuleServiceList_); @@ -8170,38 +7850,10 @@ public final class Policy { } else { result.policyRuleServiceList_ = policyRuleServiceListBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); } - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(policy.Policy.PolicyRuleServiceList result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -8241,7 +7893,7 @@ public final class Policy { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -8253,17 +7905,47 @@ public final class Policy { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - policy.Policy.PolicyRuleServiceList parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + policy.Policy.PolicyRuleService m = input.readMessage(policy.Policy.PolicyRuleService.parser(), extensionRegistry); + if (policyRuleServiceListBuilder_ == null) { + ensurePolicyRuleServiceListIsMutable(); + policyRuleServiceList_.add(m); + } else { + policyRuleServiceListBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (policy.Policy.PolicyRuleServiceList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -8533,7 +8215,17 @@ public final class Policy { @java.lang.Override public PolicyRuleServiceList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PolicyRuleServiceList(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -8608,57 +8300,6 @@ public final class Policy { return new PolicyRuleDeviceList(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private PolicyRuleDeviceList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - policyRuleDeviceList_ = new java.util.ArrayList<policy.Policy.PolicyRuleDevice>(); - mutable_bitField0_ |= 0x00000001; - } - policyRuleDeviceList_.add(input.readMessage(policy.Policy.PolicyRuleDevice.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - policyRuleDeviceList_ = java.util.Collections.unmodifiableList(policyRuleDeviceList_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return policy.Policy.internal_static_policy_PolicyRuleDeviceList_descriptor; } @@ -8670,6 +8311,7 @@ public final class Policy { public static final int POLICYRULEDEVICELIST_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List<policy.Policy.PolicyRuleDevice> policyRuleDeviceList_; /** @@ -8730,7 +8372,7 @@ public final class Policy { for (int i = 0; i < policyRuleDeviceList_.size(); i++) { output.writeMessage(1, policyRuleDeviceList_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -8742,7 +8384,7 @@ public final class Policy { for (int i = 0; i < policyRuleDeviceList_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, policyRuleDeviceList_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -8758,7 +8400,7 @@ public final class Policy { policy.Policy.PolicyRuleDeviceList other = (policy.Policy.PolicyRuleDeviceList) obj; if (!getPolicyRuleDeviceListList().equals(other.getPolicyRuleDeviceListList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -8774,7 +8416,7 @@ public final class Policy { hash = (37 * hash) + POLICYRULEDEVICELIST_FIELD_NUMBER; hash = (53 * hash) + getPolicyRuleDeviceListList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -8872,29 +8514,23 @@ public final class Policy { // Construct using policy.Policy.PolicyRuleDeviceList.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getPolicyRuleDeviceListFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (policyRuleDeviceListBuilder_ == null) { policyRuleDeviceList_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + policyRuleDeviceList_ = null; policyRuleDeviceListBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -8920,7 +8556,15 @@ public final class Policy { @java.lang.Override public policy.Policy.PolicyRuleDeviceList buildPartial() { policy.Policy.PolicyRuleDeviceList result = new policy.Policy.PolicyRuleDeviceList(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(policy.Policy.PolicyRuleDeviceList result) { if (policyRuleDeviceListBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { policyRuleDeviceList_ = java.util.Collections.unmodifiableList(policyRuleDeviceList_); @@ -8930,38 +8574,10 @@ public final class Policy { } else { result.policyRuleDeviceList_ = policyRuleDeviceListBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); } - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(policy.Policy.PolicyRuleDeviceList result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -9001,7 +8617,7 @@ public final class Policy { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -9013,17 +8629,47 @@ public final class Policy { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - policy.Policy.PolicyRuleDeviceList parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + policy.Policy.PolicyRuleDevice m = input.readMessage(policy.Policy.PolicyRuleDevice.parser(), extensionRegistry); + if (policyRuleDeviceListBuilder_ == null) { + ensurePolicyRuleDeviceListIsMutable(); + policyRuleDeviceList_.add(m); + } else { + policyRuleDeviceListBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (policy.Policy.PolicyRuleDeviceList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -9293,7 +8939,17 @@ public final class Policy { @java.lang.Override public PolicyRuleDeviceList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PolicyRuleDeviceList(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -9368,57 +9024,6 @@ public final class Policy { return new PolicyRuleList(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private PolicyRuleList(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - policyRules_ = new java.util.ArrayList<policy.Policy.PolicyRule>(); - mutable_bitField0_ |= 0x00000001; - } - policyRules_.add(input.readMessage(policy.Policy.PolicyRule.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - policyRules_ = java.util.Collections.unmodifiableList(policyRules_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return policy.Policy.internal_static_policy_PolicyRuleList_descriptor; } @@ -9430,6 +9035,7 @@ public final class Policy { public static final int POLICYRULES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List<policy.Policy.PolicyRule> policyRules_; /** @@ -9490,7 +9096,7 @@ public final class Policy { for (int i = 0; i < policyRules_.size(); i++) { output.writeMessage(1, policyRules_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -9502,7 +9108,7 @@ public final class Policy { for (int i = 0; i < policyRules_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, policyRules_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -9518,7 +9124,7 @@ public final class Policy { policy.Policy.PolicyRuleList other = (policy.Policy.PolicyRuleList) obj; if (!getPolicyRulesList().equals(other.getPolicyRulesList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -9534,7 +9140,7 @@ public final class Policy { hash = (37 * hash) + POLICYRULES_FIELD_NUMBER; hash = (53 * hash) + getPolicyRulesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -9632,29 +9238,23 @@ public final class Policy { // Construct using policy.Policy.PolicyRuleList.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getPolicyRulesFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (policyRulesBuilder_ == null) { policyRules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + policyRules_ = null; policyRulesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -9680,7 +9280,15 @@ public final class Policy { @java.lang.Override public policy.Policy.PolicyRuleList buildPartial() { policy.Policy.PolicyRuleList result = new policy.Policy.PolicyRuleList(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(policy.Policy.PolicyRuleList result) { if (policyRulesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { policyRules_ = java.util.Collections.unmodifiableList(policyRules_); @@ -9690,38 +9298,10 @@ public final class Policy { } else { result.policyRules_ = policyRulesBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); } - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(policy.Policy.PolicyRuleList result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -9761,7 +9341,7 @@ public final class Policy { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -9773,17 +9353,47 @@ public final class Policy { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - policy.Policy.PolicyRuleList parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + policy.Policy.PolicyRule m = input.readMessage(policy.Policy.PolicyRule.parser(), extensionRegistry); + if (policyRulesBuilder_ == null) { + ensurePolicyRulesIsMutable(); + policyRules_.add(m); + } else { + policyRulesBuilder_.addMessage(m); + } + break; + } + // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (policy.Policy.PolicyRuleList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -10053,7 +9663,17 @@ public final class Policy { @java.lang.Override public PolicyRuleList parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PolicyRuleList(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/src/policy/target/generated-sources/grpc/policy/PolicyAction.java b/src/policy/target/generated-sources/grpc/policy/PolicyAction.java index 8e84a0a847d93bd2dd863244ef7acf3888f6e6c5..097097d6f7f65512938dd8898e3f1f9b3191d2f1 100644 --- a/src/policy/target/generated-sources/grpc/policy/PolicyAction.java +++ b/src/policy/target/generated-sources/grpc/policy/PolicyAction.java @@ -229,63 +229,6 @@ public final class PolicyAction { return new PolicyRuleAction(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private PolicyRuleAction(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 8: - { - int rawValue = input.readEnum(); - action_ = rawValue; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - actionConfig_ = new java.util.ArrayList<policy.PolicyAction.PolicyRuleActionConfig>(); - mutable_bitField0_ |= 0x00000001; - } - actionConfig_.add(input.readMessage(policy.PolicyAction.PolicyRuleActionConfig.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - actionConfig_ = java.util.Collections.unmodifiableList(actionConfig_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return policy.PolicyAction.internal_static_policy_PolicyRuleAction_descriptor; } @@ -297,7 +240,7 @@ public final class PolicyAction { public static final int ACTION_FIELD_NUMBER = 1; - private int action_; + private int action_ = 0; /** * <code>.policy.PolicyRuleActionEnum action = 1;</code> @@ -314,13 +257,13 @@ public final class PolicyAction { */ @java.lang.Override public policy.PolicyAction.PolicyRuleActionEnum getAction() { - @SuppressWarnings("deprecation") - policy.PolicyAction.PolicyRuleActionEnum result = policy.PolicyAction.PolicyRuleActionEnum.valueOf(action_); + policy.PolicyAction.PolicyRuleActionEnum result = policy.PolicyAction.PolicyRuleActionEnum.forNumber(action_); return result == null ? policy.PolicyAction.PolicyRuleActionEnum.UNRECOGNIZED : result; } public static final int ACTION_CONFIG_FIELD_NUMBER = 2; + @SuppressWarnings("serial") private java.util.List<policy.PolicyAction.PolicyRuleActionConfig> actionConfig_; /** @@ -384,7 +327,7 @@ public final class PolicyAction { for (int i = 0; i < actionConfig_.size(); i++) { output.writeMessage(2, actionConfig_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -399,7 +342,7 @@ public final class PolicyAction { for (int i = 0; i < actionConfig_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, actionConfig_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -417,7 +360,7 @@ public final class PolicyAction { return false; if (!getActionConfigList().equals(other.getActionConfigList())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -435,7 +378,7 @@ public final class PolicyAction { hash = (37 * hash) + ACTION_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getActionConfigList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -533,30 +476,24 @@ public final class PolicyAction { // Construct using policy.PolicyAction.PolicyRuleAction.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getActionConfigFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; action_ = 0; if (actionConfigBuilder_ == null) { actionConfig_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + actionConfig_ = null; actionConfigBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -582,49 +519,31 @@ public final class PolicyAction { @java.lang.Override public policy.PolicyAction.PolicyRuleAction buildPartial() { policy.PolicyAction.PolicyRuleAction result = new policy.PolicyAction.PolicyRuleAction(this); - int from_bitField0_ = bitField0_; - result.action_ = action_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { + buildPartial0(result); + } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(policy.PolicyAction.PolicyRuleAction result) { if (actionConfigBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000002) != 0)) { actionConfig_ = java.util.Collections.unmodifiableList(actionConfig_); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); } result.actionConfig_ = actionConfig_; } else { result.actionConfig_ = actionConfigBuilder_.build(); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); } - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(policy.PolicyAction.PolicyRuleAction result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.action_ = action_; + } } @java.lang.Override @@ -647,7 +566,7 @@ public final class PolicyAction { if (!other.actionConfig_.isEmpty()) { if (actionConfig_.isEmpty()) { actionConfig_ = other.actionConfig_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); } else { ensureActionConfigIsMutable(); actionConfig_.addAll(other.actionConfig_); @@ -660,14 +579,14 @@ public final class PolicyAction { actionConfigBuilder_.dispose(); actionConfigBuilder_ = null; actionConfig_ = other.actionConfig_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); actionConfigBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getActionConfigFieldBuilder() : null; } else { actionConfigBuilder_.addAllMessages(other.actionConfig_); } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -679,17 +598,54 @@ public final class PolicyAction { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - policy.PolicyAction.PolicyRuleAction parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 8: + { + action_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } + // case 8 + case 18: + { + policy.PolicyAction.PolicyRuleActionConfig m = input.readMessage(policy.PolicyAction.PolicyRuleActionConfig.parser(), extensionRegistry); + if (actionConfigBuilder_ == null) { + ensureActionConfigIsMutable(); + actionConfig_.add(m); + } else { + actionConfigBuilder_.addMessage(m); + } + break; + } + // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (policy.PolicyAction.PolicyRuleAction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } @@ -713,6 +669,7 @@ public final class PolicyAction { */ public Builder setActionValue(int value) { action_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -723,8 +680,7 @@ public final class PolicyAction { */ @java.lang.Override public policy.PolicyAction.PolicyRuleActionEnum getAction() { - @SuppressWarnings("deprecation") - policy.PolicyAction.PolicyRuleActionEnum result = policy.PolicyAction.PolicyRuleActionEnum.valueOf(action_); + policy.PolicyAction.PolicyRuleActionEnum result = policy.PolicyAction.PolicyRuleActionEnum.forNumber(action_); return result == null ? policy.PolicyAction.PolicyRuleActionEnum.UNRECOGNIZED : result; } @@ -737,6 +693,7 @@ public final class PolicyAction { if (value == null) { throw new NullPointerException(); } + bitField0_ |= 0x00000001; action_ = value.getNumber(); onChanged(); return this; @@ -747,6 +704,7 @@ public final class PolicyAction { * @return This builder for chaining. */ public Builder clearAction() { + bitField0_ = (bitField0_ & ~0x00000001); action_ = 0; onChanged(); return this; @@ -755,9 +713,9 @@ public final class PolicyAction { private java.util.List<policy.PolicyAction.PolicyRuleActionConfig> actionConfig_ = java.util.Collections.emptyList(); private void ensureActionConfigIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!((bitField0_ & 0x00000002) != 0)) { actionConfig_ = new java.util.ArrayList<policy.PolicyAction.PolicyRuleActionConfig>(actionConfig_); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000002; } } @@ -909,7 +867,7 @@ public final class PolicyAction { public Builder clearActionConfig() { if (actionConfigBuilder_ == null) { actionConfig_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { actionConfigBuilder_.clear(); @@ -983,7 +941,7 @@ public final class PolicyAction { private com.google.protobuf.RepeatedFieldBuilderV3<policy.PolicyAction.PolicyRuleActionConfig, policy.PolicyAction.PolicyRuleActionConfig.Builder, policy.PolicyAction.PolicyRuleActionConfigOrBuilder> getActionConfigFieldBuilder() { if (actionConfigBuilder_ == null) { - actionConfigBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<policy.PolicyAction.PolicyRuleActionConfig, policy.PolicyAction.PolicyRuleActionConfig.Builder, policy.PolicyAction.PolicyRuleActionConfigOrBuilder>(actionConfig_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + actionConfigBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<policy.PolicyAction.PolicyRuleActionConfig, policy.PolicyAction.PolicyRuleActionConfig.Builder, policy.PolicyAction.PolicyRuleActionConfigOrBuilder>(actionConfig_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); actionConfig_ = null; } return actionConfigBuilder_; @@ -1016,7 +974,17 @@ public final class PolicyAction { @java.lang.Override public PolicyRuleAction parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PolicyRuleAction(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1091,56 +1059,6 @@ public final class PolicyAction { return new PolicyRuleActionConfig(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private PolicyRuleActionConfig(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - actionKey_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - actionValue_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return policy.PolicyAction.internal_static_policy_PolicyRuleActionConfig_descriptor; } @@ -1152,7 +1070,8 @@ public final class PolicyAction { public static final int ACTION_KEY_FIELD_NUMBER = 1; - private volatile java.lang.Object actionKey_; + @SuppressWarnings("serial") + private volatile java.lang.Object actionKey_ = ""; /** * <code>string action_key = 1;</code> @@ -1189,7 +1108,8 @@ public final class PolicyAction { public static final int ACTION_VALUE_FIELD_NUMBER = 2; - private volatile java.lang.Object actionValue_; + @SuppressWarnings("serial") + private volatile java.lang.Object actionValue_ = ""; /** * <code>string action_value = 2;</code> @@ -1239,13 +1159,13 @@ public final class PolicyAction { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getActionKeyBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(actionKey_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, actionKey_); } - if (!getActionValueBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(actionValue_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, actionValue_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1254,13 +1174,13 @@ public final class PolicyAction { if (size != -1) return size; size = 0; - if (!getActionKeyBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(actionKey_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, actionKey_); } - if (!getActionValueBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(actionValue_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, actionValue_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1278,7 +1198,7 @@ public final class PolicyAction { return false; if (!getActionValue().equals(other.getActionValue())) return false; - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1294,7 +1214,7 @@ public final class PolicyAction { hash = (53 * hash) + getActionKey().hashCode(); hash = (37 * hash) + ACTION_VALUE_FIELD_NUMBER; hash = (53 * hash) + getActionValue().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1392,22 +1312,16 @@ public final class PolicyAction { // Construct using policy.PolicyAction.PolicyRuleActionConfig.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; actionKey_ = ""; actionValue_ = ""; return this; @@ -1435,40 +1349,21 @@ public final class PolicyAction { @java.lang.Override public policy.PolicyAction.PolicyRuleActionConfig buildPartial() { policy.PolicyAction.PolicyRuleActionConfig result = new policy.PolicyAction.PolicyRuleActionConfig(this); - result.actionKey_ = actionKey_; - result.actionValue_ = actionValue_; + if (bitField0_ != 0) { + buildPartial0(result); + } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(policy.PolicyAction.PolicyRuleActionConfig result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.actionKey_ = actionKey_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.actionValue_ = actionValue_; + } } @java.lang.Override @@ -1486,13 +1381,15 @@ public final class PolicyAction { return this; if (!other.getActionKey().isEmpty()) { actionKey_ = other.actionKey_; + bitField0_ |= 0x00000001; onChanged(); } if (!other.getActionValue().isEmpty()) { actionValue_ = other.actionValue_; + bitField0_ |= 0x00000002; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1504,20 +1401,54 @@ public final class PolicyAction { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - policy.PolicyAction.PolicyRuleActionConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + actionKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 18: + { + actionValue_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } + // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (policy.PolicyAction.PolicyRuleActionConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private java.lang.Object actionKey_ = ""; /** @@ -1561,6 +1492,7 @@ public final class PolicyAction { throw new NullPointerException(); } actionKey_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -1571,6 +1503,7 @@ public final class PolicyAction { */ public Builder clearActionKey() { actionKey_ = getDefaultInstance().getActionKey(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -1586,6 +1519,7 @@ public final class PolicyAction { } checkByteStringIsUtf8(value); actionKey_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -1633,6 +1567,7 @@ public final class PolicyAction { throw new NullPointerException(); } actionValue_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -1643,6 +1578,7 @@ public final class PolicyAction { */ public Builder clearActionValue() { actionValue_ = getDefaultInstance().getActionValue(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -1658,6 +1594,7 @@ public final class PolicyAction { } checkByteStringIsUtf8(value); actionValue_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -1689,7 +1626,17 @@ public final class PolicyAction { @java.lang.Override public PolicyRuleActionConfig parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PolicyRuleActionConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/src/policy/target/generated-sources/grpc/policy/PolicyCondition.java b/src/policy/target/generated-sources/grpc/policy/PolicyCondition.java index 269c8b4380fd8f764ab61c6b77c289268a72d7bb..f5b5fd96737cf062443282e6bcd50053a5fc7097 100644 --- a/src/policy/target/generated-sources/grpc/policy/PolicyCondition.java +++ b/src/policy/target/generated-sources/grpc/policy/PolicyCondition.java @@ -376,18 +376,30 @@ public final class PolicyCondition { com.google.protobuf.MessageOrBuilder { /** + * <pre> + * to be migrated to: "kpi_manager.KpiId" + * </pre> + * * <code>.monitoring.KpiId kpiId = 1;</code> * @return Whether the kpiId field is set. */ boolean hasKpiId(); /** + * <pre> + * to be migrated to: "kpi_manager.KpiId" + * </pre> + * * <code>.monitoring.KpiId kpiId = 1;</code> * @return The kpiId. */ monitoring.Monitoring.KpiId getKpiId(); /** + * <pre> + * to be migrated to: "kpi_manager.KpiId" + * </pre> + * * <code>.monitoring.KpiId kpiId = 1;</code> */ monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder(); @@ -449,76 +461,6 @@ public final class PolicyCondition { return new PolicyRuleCondition(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private PolicyRuleCondition(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch(tag) { - case 0: - done = true; - break; - case 10: - { - monitoring.Monitoring.KpiId.Builder subBuilder = null; - if (kpiId_ != null) { - subBuilder = kpiId_.toBuilder(); - } - kpiId_ = input.readMessage(monitoring.Monitoring.KpiId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(kpiId_); - kpiId_ = subBuilder.buildPartial(); - } - break; - } - case 16: - { - int rawValue = input.readEnum(); - numericalOperator_ = rawValue; - break; - } - case 26: - { - monitoring.Monitoring.KpiValue.Builder subBuilder = null; - if (kpiValue_ != null) { - subBuilder = kpiValue_.toBuilder(); - } - kpiValue_ = input.readMessage(monitoring.Monitoring.KpiValue.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(kpiValue_); - kpiValue_ = subBuilder.buildPartial(); - } - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return policy.PolicyCondition.internal_static_policy_PolicyRuleCondition_descriptor; } @@ -533,6 +475,10 @@ public final class PolicyCondition { private monitoring.Monitoring.KpiId kpiId_; /** + * <pre> + * to be migrated to: "kpi_manager.KpiId" + * </pre> + * * <code>.monitoring.KpiId kpiId = 1;</code> * @return Whether the kpiId field is set. */ @@ -542,6 +488,10 @@ public final class PolicyCondition { } /** + * <pre> + * to be migrated to: "kpi_manager.KpiId" + * </pre> + * * <code>.monitoring.KpiId kpiId = 1;</code> * @return The kpiId. */ @@ -551,16 +501,20 @@ public final class PolicyCondition { } /** + * <pre> + * to be migrated to: "kpi_manager.KpiId" + * </pre> + * * <code>.monitoring.KpiId kpiId = 1;</code> */ @java.lang.Override public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { - return getKpiId(); + return kpiId_ == null ? monitoring.Monitoring.KpiId.getDefaultInstance() : kpiId_; } public static final int NUMERICALOPERATOR_FIELD_NUMBER = 2; - private int numericalOperator_; + private int numericalOperator_ = 0; /** * <code>.policy.NumericalOperator numericalOperator = 2;</code> @@ -577,8 +531,7 @@ public final class PolicyCondition { */ @java.lang.Override public policy.PolicyCondition.NumericalOperator getNumericalOperator() { - @SuppressWarnings("deprecation") - policy.PolicyCondition.NumericalOperator result = policy.PolicyCondition.NumericalOperator.valueOf(numericalOperator_); + policy.PolicyCondition.NumericalOperator result = policy.PolicyCondition.NumericalOperator.forNumber(numericalOperator_); return result == null ? policy.PolicyCondition.NumericalOperator.UNRECOGNIZED : result; } @@ -609,7 +562,7 @@ public final class PolicyCondition { */ @java.lang.Override public monitoring.Monitoring.KpiValueOrBuilder getKpiValueOrBuilder() { - return getKpiValue(); + return kpiValue_ == null ? monitoring.Monitoring.KpiValue.getDefaultInstance() : kpiValue_; } private byte memoizedIsInitialized = -1; @@ -636,7 +589,7 @@ public final class PolicyCondition { if (kpiValue_ != null) { output.writeMessage(3, getKpiValue()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -654,7 +607,7 @@ public final class PolicyCondition { if (kpiValue_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getKpiValue()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -682,7 +635,7 @@ public final class PolicyCondition { if (!getKpiValue().equals(other.getKpiValue())) return false; } - if (!unknownFields.equals(other.unknownFields)) + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -704,7 +657,7 @@ public final class PolicyCondition { hash = (37 * hash) + KPIVALUE_FIELD_NUMBER; hash = (53 * hash) + getKpiValue().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -802,33 +755,25 @@ public final class PolicyCondition { // Construct using policy.PolicyCondition.PolicyRuleCondition.newBuilder() private Builder() { - maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - } } @java.lang.Override public Builder clear() { super.clear(); - if (kpiIdBuilder_ == null) { - kpiId_ = null; - } else { - kpiId_ = null; + bitField0_ = 0; + kpiId_ = null; + if (kpiIdBuilder_ != null) { + kpiIdBuilder_.dispose(); kpiIdBuilder_ = null; } numericalOperator_ = 0; - if (kpiValueBuilder_ == null) { - kpiValue_ = null; - } else { - kpiValue_ = null; + kpiValue_ = null; + if (kpiValueBuilder_ != null) { + kpiValueBuilder_.dispose(); kpiValueBuilder_ = null; } return this; @@ -856,49 +801,24 @@ public final class PolicyCondition { @java.lang.Override public policy.PolicyCondition.PolicyRuleCondition buildPartial() { policy.PolicyCondition.PolicyRuleCondition result = new policy.PolicyCondition.PolicyRuleCondition(this); - if (kpiIdBuilder_ == null) { - result.kpiId_ = kpiId_; - } else { - result.kpiId_ = kpiIdBuilder_.build(); - } - result.numericalOperator_ = numericalOperator_; - if (kpiValueBuilder_ == null) { - result.kpiValue_ = kpiValue_; - } else { - result.kpiValue_ = kpiValueBuilder_.build(); + if (bitField0_ != 0) { + buildPartial0(result); } onBuilt(); return result; } - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + private void buildPartial0(policy.PolicyCondition.PolicyRuleCondition result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.kpiId_ = kpiIdBuilder_ == null ? kpiId_ : kpiIdBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.numericalOperator_ = numericalOperator_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.kpiValue_ = kpiValueBuilder_ == null ? kpiValue_ : kpiValueBuilder_.build(); + } } @java.lang.Override @@ -923,7 +843,7 @@ public final class PolicyCondition { if (other.hasKpiValue()) { mergeKpiValue(other.getKpiValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -935,33 +855,82 @@ public final class PolicyCondition { @java.lang.Override public Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - policy.PolicyCondition.PolicyRuleCondition parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch(tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getKpiIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } + // case 10 + case 16: + { + numericalOperator_ = input.readEnum(); + bitField0_ |= 0x00000002; + break; + } + // case 16 + case 26: + { + input.readMessage(getKpiValueFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } + // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + // was an endgroup tag + done = true; + } + break; + } + } + // switch (tag) + } + // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (policy.PolicyCondition.PolicyRuleCondition) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } + onChanged(); } + // finally return this; } + private int bitField0_; + private monitoring.Monitoring.KpiId kpiId_; private com.google.protobuf.SingleFieldBuilderV3<monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> kpiIdBuilder_; /** + * <pre> + * to be migrated to: "kpi_manager.KpiId" + * </pre> + * * <code>.monitoring.KpiId kpiId = 1;</code> * @return Whether the kpiId field is set. */ public boolean hasKpiId() { - return kpiIdBuilder_ != null || kpiId_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** + * <pre> + * to be migrated to: "kpi_manager.KpiId" + * </pre> + * * <code>.monitoring.KpiId kpiId = 1;</code> * @return The kpiId. */ @@ -974,6 +943,10 @@ public final class PolicyCondition { } /** + * <pre> + * to be migrated to: "kpi_manager.KpiId" + * </pre> + * * <code>.monitoring.KpiId kpiId = 1;</code> */ public Builder setKpiId(monitoring.Monitoring.KpiId value) { @@ -982,66 +955,90 @@ public final class PolicyCondition { throw new NullPointerException(); } kpiId_ = value; - onChanged(); } else { kpiIdBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } /** + * <pre> + * to be migrated to: "kpi_manager.KpiId" + * </pre> + * * <code>.monitoring.KpiId kpiId = 1;</code> */ public Builder setKpiId(monitoring.Monitoring.KpiId.Builder builderForValue) { if (kpiIdBuilder_ == null) { kpiId_ = builderForValue.build(); - onChanged(); } else { kpiIdBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000001; + onChanged(); return this; } /** + * <pre> + * to be migrated to: "kpi_manager.KpiId" + * </pre> + * * <code>.monitoring.KpiId kpiId = 1;</code> */ public Builder mergeKpiId(monitoring.Monitoring.KpiId value) { if (kpiIdBuilder_ == null) { - if (kpiId_ != null) { - kpiId_ = monitoring.Monitoring.KpiId.newBuilder(kpiId_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && kpiId_ != null && kpiId_ != monitoring.Monitoring.KpiId.getDefaultInstance()) { + getKpiIdBuilder().mergeFrom(value); } else { kpiId_ = value; } - onChanged(); } else { kpiIdBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000001; + onChanged(); return this; } /** + * <pre> + * to be migrated to: "kpi_manager.KpiId" + * </pre> + * * <code>.monitoring.KpiId kpiId = 1;</code> */ public Builder clearKpiId() { - if (kpiIdBuilder_ == null) { - kpiId_ = null; - onChanged(); - } else { - kpiId_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + kpiId_ = null; + if (kpiIdBuilder_ != null) { + kpiIdBuilder_.dispose(); kpiIdBuilder_ = null; } + onChanged(); return this; } /** + * <pre> + * to be migrated to: "kpi_manager.KpiId" + * </pre> + * * <code>.monitoring.KpiId kpiId = 1;</code> */ public monitoring.Monitoring.KpiId.Builder getKpiIdBuilder() { + bitField0_ |= 0x00000001; onChanged(); return getKpiIdFieldBuilder().getBuilder(); } /** + * <pre> + * to be migrated to: "kpi_manager.KpiId" + * </pre> + * * <code>.monitoring.KpiId kpiId = 1;</code> */ public monitoring.Monitoring.KpiIdOrBuilder getKpiIdOrBuilder() { @@ -1053,6 +1050,10 @@ public final class PolicyCondition { } /** + * <pre> + * to be migrated to: "kpi_manager.KpiId" + * </pre> + * * <code>.monitoring.KpiId kpiId = 1;</code> */ private com.google.protobuf.SingleFieldBuilderV3<monitoring.Monitoring.KpiId, monitoring.Monitoring.KpiId.Builder, monitoring.Monitoring.KpiIdOrBuilder> getKpiIdFieldBuilder() { @@ -1081,6 +1082,7 @@ public final class PolicyCondition { */ public Builder setNumericalOperatorValue(int value) { numericalOperator_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -1091,8 +1093,7 @@ public final class PolicyCondition { */ @java.lang.Override public policy.PolicyCondition.NumericalOperator getNumericalOperator() { - @SuppressWarnings("deprecation") - policy.PolicyCondition.NumericalOperator result = policy.PolicyCondition.NumericalOperator.valueOf(numericalOperator_); + policy.PolicyCondition.NumericalOperator result = policy.PolicyCondition.NumericalOperator.forNumber(numericalOperator_); return result == null ? policy.PolicyCondition.NumericalOperator.UNRECOGNIZED : result; } @@ -1105,6 +1106,7 @@ public final class PolicyCondition { if (value == null) { throw new NullPointerException(); } + bitField0_ |= 0x00000002; numericalOperator_ = value.getNumber(); onChanged(); return this; @@ -1115,6 +1117,7 @@ public final class PolicyCondition { * @return This builder for chaining. */ public Builder clearNumericalOperator() { + bitField0_ = (bitField0_ & ~0x00000002); numericalOperator_ = 0; onChanged(); return this; @@ -1129,7 +1132,7 @@ public final class PolicyCondition { * @return Whether the kpiValue field is set. */ public boolean hasKpiValue() { - return kpiValueBuilder_ != null || kpiValue_ != null; + return ((bitField0_ & 0x00000004) != 0); } /** @@ -1153,10 +1156,11 @@ public final class PolicyCondition { throw new NullPointerException(); } kpiValue_ = value; - onChanged(); } else { kpiValueBuilder_.setMessage(value); } + bitField0_ |= 0x00000004; + onChanged(); return this; } @@ -1166,10 +1170,11 @@ public final class PolicyCondition { public Builder setKpiValue(monitoring.Monitoring.KpiValue.Builder builderForValue) { if (kpiValueBuilder_ == null) { kpiValue_ = builderForValue.build(); - onChanged(); } else { kpiValueBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000004; + onChanged(); return this; } @@ -1178,15 +1183,16 @@ public final class PolicyCondition { */ public Builder mergeKpiValue(monitoring.Monitoring.KpiValue value) { if (kpiValueBuilder_ == null) { - if (kpiValue_ != null) { - kpiValue_ = monitoring.Monitoring.KpiValue.newBuilder(kpiValue_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000004) != 0) && kpiValue_ != null && kpiValue_ != monitoring.Monitoring.KpiValue.getDefaultInstance()) { + getKpiValueBuilder().mergeFrom(value); } else { kpiValue_ = value; } - onChanged(); } else { kpiValueBuilder_.mergeFrom(value); } + bitField0_ |= 0x00000004; + onChanged(); return this; } @@ -1194,13 +1200,13 @@ public final class PolicyCondition { * <code>.monitoring.KpiValue kpiValue = 3;</code> */ public Builder clearKpiValue() { - if (kpiValueBuilder_ == null) { - kpiValue_ = null; - onChanged(); - } else { - kpiValue_ = null; + bitField0_ = (bitField0_ & ~0x00000004); + kpiValue_ = null; + if (kpiValueBuilder_ != null) { + kpiValueBuilder_.dispose(); kpiValueBuilder_ = null; } + onChanged(); return this; } @@ -1208,6 +1214,7 @@ public final class PolicyCondition { * <code>.monitoring.KpiValue kpiValue = 3;</code> */ public monitoring.Monitoring.KpiValue.Builder getKpiValueBuilder() { + bitField0_ |= 0x00000004; onChanged(); return getKpiValueFieldBuilder().getBuilder(); } @@ -1261,7 +1268,17 @@ public final class PolicyCondition { @java.lang.Override public PolicyRuleCondition parsePartialFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PolicyRuleCondition(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/src/policy/target/generated-sources/grpc/policy/PolicyServiceGrpc.java b/src/policy/target/generated-sources/grpc/policy/PolicyServiceGrpc.java index e701a2256eb6800137ae4cd00c8887a97ba1cf43..6bc2e280896487b712d3426d5d623e6c4a474e29 100644 --- a/src/policy/target/generated-sources/grpc/policy/PolicyServiceGrpc.java +++ b/src/policy/target/generated-sources/grpc/policy/PolicyServiceGrpc.java @@ -4,7 +4,8 @@ import static io.grpc.MethodDescriptor.generateFullMethodName; /** */ -@io.quarkus.grpc.common.Generated(value = "by gRPC proto compiler (version 1.38.1)", comments = "Source: policy.proto") +@io.quarkus.grpc.common.Generated(value = "by gRPC proto compiler (version 1.55.1)", comments = "Source: policy.proto") +@io.grpc.stub.annotations.GrpcGenerated public final class PolicyServiceGrpc { private PolicyServiceGrpc() { @@ -177,63 +178,70 @@ public final class PolicyServiceGrpc { /** */ - public static abstract class PolicyServiceImplBase implements io.grpc.BindableService { + public interface AsyncService { /** */ - public void policyAddService(policy.Policy.PolicyRuleService request, io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleState> responseObserver) { + default void policyAddService(policy.Policy.PolicyRuleService request, io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleState> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPolicyAddServiceMethod(), responseObserver); } /** */ - public void policyAddDevice(policy.Policy.PolicyRuleDevice request, io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleState> responseObserver) { + default void policyAddDevice(policy.Policy.PolicyRuleDevice request, io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleState> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPolicyAddDeviceMethod(), responseObserver); } /** */ - public void policyUpdateService(policy.Policy.PolicyRuleService request, io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleState> responseObserver) { + default void policyUpdateService(policy.Policy.PolicyRuleService request, io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleState> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPolicyUpdateServiceMethod(), responseObserver); } /** */ - public void policyUpdateDevice(policy.Policy.PolicyRuleDevice request, io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleState> responseObserver) { + default void policyUpdateDevice(policy.Policy.PolicyRuleDevice request, io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleState> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPolicyUpdateDeviceMethod(), responseObserver); } /** */ - public void policyDelete(policy.Policy.PolicyRuleId request, io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleState> responseObserver) { + default void policyDelete(policy.Policy.PolicyRuleId request, io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleState> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPolicyDeleteMethod(), responseObserver); } /** */ - public void getPolicyService(policy.Policy.PolicyRuleId request, io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleService> responseObserver) { + default void getPolicyService(policy.Policy.PolicyRuleId request, io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleService> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetPolicyServiceMethod(), responseObserver); } /** */ - public void getPolicyDevice(policy.Policy.PolicyRuleId request, io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleDevice> responseObserver) { + default void getPolicyDevice(policy.Policy.PolicyRuleId request, io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleDevice> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetPolicyDeviceMethod(), responseObserver); } /** */ - public void getPolicyByServiceId(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleServiceList> responseObserver) { + default void getPolicyByServiceId(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver<policy.Policy.PolicyRuleServiceList> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetPolicyByServiceIdMethod(), responseObserver); } + } + + /** + * Base class for the server implementation of the service PolicyService. + */ + public static abstract class PolicyServiceImplBase implements io.grpc.BindableService, AsyncService { @java.lang.Override public io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(getPolicyAddServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<policy.Policy.PolicyRuleService, policy.Policy.PolicyRuleState>(this, METHODID_POLICY_ADD_SERVICE))).addMethod(getPolicyAddDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<policy.Policy.PolicyRuleDevice, policy.Policy.PolicyRuleState>(this, METHODID_POLICY_ADD_DEVICE))).addMethod(getPolicyUpdateServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<policy.Policy.PolicyRuleService, policy.Policy.PolicyRuleState>(this, METHODID_POLICY_UPDATE_SERVICE))).addMethod(getPolicyUpdateDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<policy.Policy.PolicyRuleDevice, policy.Policy.PolicyRuleState>(this, METHODID_POLICY_UPDATE_DEVICE))).addMethod(getPolicyDeleteMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<policy.Policy.PolicyRuleId, policy.Policy.PolicyRuleState>(this, METHODID_POLICY_DELETE))).addMethod(getGetPolicyServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<policy.Policy.PolicyRuleId, policy.Policy.PolicyRuleService>(this, METHODID_GET_POLICY_SERVICE))).addMethod(getGetPolicyDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<policy.Policy.PolicyRuleId, policy.Policy.PolicyRuleDevice>(this, METHODID_GET_POLICY_DEVICE))).addMethod(getGetPolicyByServiceIdMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.ServiceId, policy.Policy.PolicyRuleServiceList>(this, METHODID_GET_POLICY_BY_SERVICE_ID))).build(); + return PolicyServiceGrpc.bindService(this); } } /** + * A stub to allow clients to do asynchronous rpc calls to service PolicyService. */ public static class PolicyServiceStub extends io.grpc.stub.AbstractAsyncStub<PolicyServiceStub> { @@ -296,6 +304,7 @@ public final class PolicyServiceGrpc { } /** + * A stub to allow clients to do synchronous rpc calls to service PolicyService. */ public static class PolicyServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub<PolicyServiceBlockingStub> { @@ -358,6 +367,7 @@ public final class PolicyServiceGrpc { } /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service PolicyService. */ public static class PolicyServiceFutureStub extends io.grpc.stub.AbstractFutureStub<PolicyServiceFutureStub> { @@ -437,11 +447,11 @@ public final class PolicyServiceGrpc { private static final class MethodHandlers<Req, Resp> implements io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>, io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>, io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>, io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> { - private final PolicyServiceImplBase serviceImpl; + private final AsyncService serviceImpl; private final int methodId; - MethodHandlers(PolicyServiceImplBase serviceImpl, int methodId) { + MethodHandlers(AsyncService serviceImpl, int methodId) { this.serviceImpl = serviceImpl; this.methodId = methodId; } @@ -489,6 +499,10 @@ public final class PolicyServiceGrpc { } } + public static io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(getPolicyAddServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<policy.Policy.PolicyRuleService, policy.Policy.PolicyRuleState>(service, METHODID_POLICY_ADD_SERVICE))).addMethod(getPolicyAddDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<policy.Policy.PolicyRuleDevice, policy.Policy.PolicyRuleState>(service, METHODID_POLICY_ADD_DEVICE))).addMethod(getPolicyUpdateServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<policy.Policy.PolicyRuleService, policy.Policy.PolicyRuleState>(service, METHODID_POLICY_UPDATE_SERVICE))).addMethod(getPolicyUpdateDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<policy.Policy.PolicyRuleDevice, policy.Policy.PolicyRuleState>(service, METHODID_POLICY_UPDATE_DEVICE))).addMethod(getPolicyDeleteMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<policy.Policy.PolicyRuleId, policy.Policy.PolicyRuleState>(service, METHODID_POLICY_DELETE))).addMethod(getGetPolicyServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<policy.Policy.PolicyRuleId, policy.Policy.PolicyRuleService>(service, METHODID_GET_POLICY_SERVICE))).addMethod(getGetPolicyDeviceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<policy.Policy.PolicyRuleId, policy.Policy.PolicyRuleDevice>(service, METHODID_GET_POLICY_DEVICE))).addMethod(getGetPolicyByServiceIdMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.ServiceId, policy.Policy.PolicyRuleServiceList>(service, METHODID_GET_POLICY_BY_SERVICE_ID))).build(); + } + private static abstract class PolicyServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { PolicyServiceBaseDescriptorSupplier() { diff --git a/src/policy/target/generated-sources/grpc/service/ServiceServiceGrpc.java b/src/policy/target/generated-sources/grpc/service/ServiceServiceGrpc.java index 4cd98546277145a8c1f277ef143fe46ac5f58dc0..7b5a367725db77054896e47965c2e50ed309a42f 100644 --- a/src/policy/target/generated-sources/grpc/service/ServiceServiceGrpc.java +++ b/src/policy/target/generated-sources/grpc/service/ServiceServiceGrpc.java @@ -4,7 +4,8 @@ import static io.grpc.MethodDescriptor.generateFullMethodName; /** */ -@io.quarkus.grpc.common.Generated(value = "by gRPC proto compiler (version 1.38.1)", comments = "Source: service.proto") +@io.quarkus.grpc.common.Generated(value = "by gRPC proto compiler (version 1.55.1)", comments = "Source: service.proto") +@io.grpc.stub.annotations.GrpcGenerated public final class ServiceServiceGrpc { private ServiceServiceGrpc() { @@ -117,39 +118,46 @@ public final class ServiceServiceGrpc { /** */ - public static abstract class ServiceServiceImplBase implements io.grpc.BindableService { + public interface AsyncService { /** */ - public void createService(context.ContextOuterClass.Service request, io.grpc.stub.StreamObserver<context.ContextOuterClass.ServiceId> responseObserver) { + default void createService(context.ContextOuterClass.Service request, io.grpc.stub.StreamObserver<context.ContextOuterClass.ServiceId> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateServiceMethod(), responseObserver); } /** */ - public void updateService(context.ContextOuterClass.Service request, io.grpc.stub.StreamObserver<context.ContextOuterClass.ServiceId> responseObserver) { + default void updateService(context.ContextOuterClass.Service request, io.grpc.stub.StreamObserver<context.ContextOuterClass.ServiceId> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateServiceMethod(), responseObserver); } /** */ - public void deleteService(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { + default void deleteService(context.ContextOuterClass.ServiceId request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteServiceMethod(), responseObserver); } /** */ - public void recomputeConnections(context.ContextOuterClass.Service request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { + default void recomputeConnections(context.ContextOuterClass.Service request, io.grpc.stub.StreamObserver<context.ContextOuterClass.Empty> responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getRecomputeConnectionsMethod(), responseObserver); } + } + + /** + * Base class for the server implementation of the service ServiceService. + */ + public static abstract class ServiceServiceImplBase implements io.grpc.BindableService, AsyncService { @java.lang.Override public io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(getCreateServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Service, context.ContextOuterClass.ServiceId>(this, METHODID_CREATE_SERVICE))).addMethod(getUpdateServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Service, context.ContextOuterClass.ServiceId>(this, METHODID_UPDATE_SERVICE))).addMethod(getDeleteServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.ServiceId, context.ContextOuterClass.Empty>(this, METHODID_DELETE_SERVICE))).addMethod(getRecomputeConnectionsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Service, context.ContextOuterClass.Empty>(this, METHODID_RECOMPUTE_CONNECTIONS))).build(); + return ServiceServiceGrpc.bindService(this); } } /** + * A stub to allow clients to do asynchronous rpc calls to service ServiceService. */ public static class ServiceServiceStub extends io.grpc.stub.AbstractAsyncStub<ServiceServiceStub> { @@ -188,6 +196,7 @@ public final class ServiceServiceGrpc { } /** + * A stub to allow clients to do synchronous rpc calls to service ServiceService. */ public static class ServiceServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub<ServiceServiceBlockingStub> { @@ -226,6 +235,7 @@ public final class ServiceServiceGrpc { } /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service ServiceService. */ public static class ServiceServiceFutureStub extends io.grpc.stub.AbstractFutureStub<ServiceServiceFutureStub> { @@ -273,11 +283,11 @@ public final class ServiceServiceGrpc { private static final class MethodHandlers<Req, Resp> implements io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>, io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>, io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>, io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> { - private final ServiceServiceImplBase serviceImpl; + private final AsyncService serviceImpl; private final int methodId; - MethodHandlers(ServiceServiceImplBase serviceImpl, int methodId) { + MethodHandlers(AsyncService serviceImpl, int methodId) { this.serviceImpl = serviceImpl; this.methodId = methodId; } @@ -313,6 +323,10 @@ public final class ServiceServiceGrpc { } } + public static io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()).addMethod(getCreateServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Service, context.ContextOuterClass.ServiceId>(service, METHODID_CREATE_SERVICE))).addMethod(getUpdateServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Service, context.ContextOuterClass.ServiceId>(service, METHODID_UPDATE_SERVICE))).addMethod(getDeleteServiceMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.ServiceId, context.ContextOuterClass.Empty>(service, METHODID_DELETE_SERVICE))).addMethod(getRecomputeConnectionsMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall(new MethodHandlers<context.ContextOuterClass.Service, context.ContextOuterClass.Empty>(service, METHODID_RECOMPUTE_CONNECTIONS))).build(); + } + private static abstract class ServiceServiceBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { ServiceServiceBaseDescriptorSupplier() { diff --git a/src/policy/target/kubernetes/kubernetes.yml b/src/policy/target/kubernetes/kubernetes.yml deleted file mode 100644 index 4f581f0c9225dd8772dd476b133ba04880683851..0000000000000000000000000000000000000000 --- a/src/policy/target/kubernetes/kubernetes.yml +++ /dev/null @@ -1,133 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - annotations: - app.quarkus.io/commit-id: 182b55a46135040b71a5980de9f72d94a85db2e8 - app.quarkus.io/build-timestamp: 2024-04-08 - 08:15:43 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8080" - prometheus.io/scheme: http - labels: - app.kubernetes.io/name: policyservice - app.kubernetes.io/version: 0.1.0 - app: policyservice - app.kubernetes.io/managed-by: quarkus - name: policyservice -spec: - ports: - - name: https - port: 443 - protocol: TCP - targetPort: 8443 - - name: grpc - port: 6060 - protocol: TCP - targetPort: 6060 - - name: http - port: 9192 - protocol: TCP - targetPort: 8080 - selector: - app.kubernetes.io/name: policyservice - type: ClusterIP ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - annotations: - app.quarkus.io/commit-id: 182b55a46135040b71a5980de9f72d94a85db2e8 - app.quarkus.io/build-timestamp: 2024-04-08 - 08:15:43 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8080" - prometheus.io/scheme: http - labels: - app: policyservice - app.kubernetes.io/managed-by: quarkus - app.kubernetes.io/name: policyservice - app.kubernetes.io/version: 0.1.0 - name: policyservice -spec: - replicas: 1 - selector: - matchLabels: - app.kubernetes.io/name: policyservice - template: - metadata: - annotations: - app.quarkus.io/commit-id: 182b55a46135040b71a5980de9f72d94a85db2e8 - app.quarkus.io/build-timestamp: 2024-04-08 - 08:15:43 +0000 - prometheus.io/scrape: "true" - prometheus.io/path: /q/metrics - prometheus.io/port: "8080" - prometheus.io/scheme: http - labels: - app: policyservice - app.kubernetes.io/managed-by: quarkus - app.kubernetes.io/name: policyservice - app.kubernetes.io/version: 0.1.0 - spec: - containers: - - env: - - name: KUBERNETES_NAMESPACE - valueFrom: - fieldRef: - fieldPath: metadata.namespace - - name: SERVICE_SERVICE_HOST - value: serviceservice - - name: MONITORING_SERVICE_HOST - value: monitoringservice - - name: CONTEXT_SERVICE_HOST - value: contextservice - image: labs.etsi.org:5050/tfs/controller/policy:0.1.0 - imagePullPolicy: Always - livenessProbe: - failureThreshold: 3 - httpGet: - path: /q/health/live - port: 8080 - scheme: HTTP - initialDelaySeconds: 2 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 10 - name: policyservice - ports: - - containerPort: 8443 - name: https - protocol: TCP - - containerPort: 6060 - name: grpc - protocol: TCP - - containerPort: 8080 - name: http - protocol: TCP - readinessProbe: - failureThreshold: 3 - httpGet: - path: /q/health/ready - port: 8080 - scheme: HTTP - initialDelaySeconds: 2 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 10 - resources: - limits: - cpu: 500m - memory: 2048Mi - requests: - cpu: 50m - memory: 512Mi - startupProbe: - failureThreshold: 3 - httpGet: - path: /q/health/started - port: 8080 - scheme: HTTP - initialDelaySeconds: 5 - periodSeconds: 10 - successThreshold: 1 - timeoutSeconds: 10 diff --git a/src/qkd_app/.gitlab-ci.yml b/src/qkd_app/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..85ee2b5e04bce3077086d0cc831043483a995aef --- /dev/null +++ b/src/qkd_app/.gitlab-ci.yml @@ -0,0 +1,80 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +build app: + variables: + IMAGE_NAME: 'qkd_app' # name of the microservice + IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) + stage: build + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + script: + - docker build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/Dockerfile . + - docker tag "$IMAGE_NAME:$IMAGE_TAG" "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG" + - docker push "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG" + after_script: + - docker images --filter="dangling=true" --quiet | xargs -r docker rmi + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' + - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' + - changes: + - src/common/**/*.py + - proto/*.proto + - src/$IMAGE_NAME/**/*.{py,in,yml} + - src/$IMAGE_NAME/Dockerfile + - src/$IMAGE_NAME/tests/*.py + - manifests/${IMAGE_NAME}service.yaml + - .gitlab-ci.yml + +# Apply unit test to the component +unit_test app: + variables: + IMAGE_NAME: 'qkd_app' # name of the microservice + IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) + stage: unit_test + needs: + - build app + - unit_test service + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + - if docker network list | grep teraflowbridge; then echo "teraflowbridge is already created"; else docker network create -d bridge teraflowbridge; fi + - if docker container ls | grep $IMAGE_NAME; then docker rm -f $IMAGE_NAME; else echo "$IMAGE_NAME image is not in the system"; fi + script: + - docker pull "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG" + - docker run --name $IMAGE_NAME -d -p 10070:10070 -p 8005:8005 -v "$PWD/src/$IMAGE_NAME/tests:/opt/results" --network=teraflowbridge $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG + - sleep 5 + - docker ps -a + - docker logs $IMAGE_NAME + - docker exec -i $IMAGE_NAME bash -c "coverage run -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_unitary.py --junitxml=/opt/results/${IMAGE_NAME}_report.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing" + coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' + after_script: + - docker rm -f $IMAGE_NAME + - docker network rm teraflowbridge + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' + - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' + - changes: + - src/common/**/*.py + - proto/*.proto + - src/$IMAGE_NAME/**/*.{py,in,yml} + - src/$IMAGE_NAME/Dockerfile + - src/$IMAGE_NAME/tests/*.py + - src/$IMAGE_NAME/tests/Dockerfile + - manifests/${IMAGE_NAME}service.yaml + - .gitlab-ci.yml + artifacts: + when: always + reports: + junit: src/$IMAGE_NAME/tests/${IMAGE_NAME}_report.xml diff --git a/src/qkd_app/Config.py b/src/qkd_app/Config.py new file mode 100644 index 0000000000000000000000000000000000000000..07d08814021ef82220611ee21c01ba01806682e9 --- /dev/null +++ b/src/qkd_app/Config.py @@ -0,0 +1,13 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/src/qkd_app/Dockerfile b/src/qkd_app/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..4d2b8d61bd61ca98d62316b021d2486de3777977 --- /dev/null +++ b/src/qkd_app/Dockerfile @@ -0,0 +1,70 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM python:3.9-slim + +# Install dependencies +RUN apt-get --yes --quiet --quiet update && \ + apt-get --yes --quiet --quiet install wget g++ git && \ + rm -rf /var/lib/apt/lists/* + +# Set Python to show logs as they occur +ENV PYTHONUNBUFFERED=0 + +# Download the gRPC health probe +RUN GRPC_HEALTH_PROBE_VERSION=v0.2.0 && \ + wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \ + chmod +x /bin/grpc_health_probe + +# Get generic Python packages +RUN python3 -m pip install --upgrade pip +RUN python3 -m pip install --upgrade setuptools wheel +RUN python3 -m pip install --upgrade pip-tools + +# Get common Python packages +# Note: this step enables sharing the previous Docker build steps among all the Python components +WORKDIR /var/teraflow +COPY common_requirements.in common_requirements.in +RUN pip-compile --quiet --output-file=common_requirements.txt common_requirements.in +RUN python3 -m pip install -r common_requirements.txt + +# Add common files into working directory +WORKDIR /var/teraflow/common +COPY src/common/. ./ +RUN rm -rf proto + +# Create proto sub-folder, copy .proto files, and generate Python code +RUN mkdir -p /var/teraflow/common/proto +WORKDIR /var/teraflow/common/proto +RUN touch __init__.py +COPY proto/*.proto ./ +RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto +RUN rm *.proto +RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \; + +# Create component sub-folders, get specific Python packages +RUN mkdir -p /var/teraflow/qkd_app +WORKDIR /var/teraflow/qkd_app +COPY src/qkd_app/requirements.in requirements.in +RUN pip-compile --quiet --output-file=requirements.txt requirements.in +RUN python3 -m pip install -r requirements.txt + +# Add component files into working directory +WORKDIR /var/teraflow +COPY src/context/. context/ +COPY src/service/. service/ +COPY src/qkd_app/. qkd_app/ + +# Start the service +ENTRYPOINT ["python", "-m", "qkd_app.service"] diff --git a/src/qkd_app/__init__.py b/src/qkd_app/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..07d08814021ef82220611ee21c01ba01806682e9 --- /dev/null +++ b/src/qkd_app/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/src/qkd_app/client/QKDAppClient.py b/src/qkd_app/client/QKDAppClient.py new file mode 100644 index 0000000000000000000000000000000000000000..a35b18f1d9f380ae4f95f1a643716075642e31d6 --- /dev/null +++ b/src/qkd_app/client/QKDAppClient.py @@ -0,0 +1,103 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import grpc +import logging +from common.Constants import ServiceNameEnum +from common.Settings import get_service_host, get_service_port_grpc +from common.proto.qkd_app_pb2 import App, AppId, AppList +from common.proto.qkd_app_pb2_grpc import AppServiceStub +from common.tools.client.RetryDecorator import retry, delay_exponential +from common.tools.grpc.Tools import grpc_message_to_json_string + +LOGGER = logging.getLogger(__name__) + +# Define retry mechanism +MAX_RETRIES = 15 +DELAY_FUNCTION = delay_exponential(initial=0.01, increment=2.0, maximum=5.0) + +class QKDAppClient: + def __init__(self, host=None, port=None): + self.host = host or get_service_host(ServiceNameEnum.QKD_APP) + self.port = port or get_service_port_grpc(ServiceNameEnum.QKD_APP) + self.endpoint = f'{self.host}:{self.port}' + LOGGER.debug(f'Initializing gRPC client to {self.endpoint}...') + self.channel = None + self.stub = None + self.connect() + + def connect(self): + try: + self.channel = grpc.insecure_channel(self.endpoint) + self.stub = AppServiceStub(self.channel) + LOGGER.debug(f'gRPC channel to {self.endpoint} established successfully') + except Exception as e: + LOGGER.error(f"Failed to establish gRPC connection: {e}") + self.stub = None + + def close(self): + if self.channel: + self.channel.close() + LOGGER.debug(f'gRPC channel to {self.endpoint} closed') + self.channel = None + self.stub = None + + def check_connection(self): + if self.stub is None: + LOGGER.error("gRPC connection is not established. Retrying...") + self.connect() + if self.stub is None: + raise ConnectionError("gRPC connection could not be established.") + + @retry(max_retries=MAX_RETRIES, delay_function=DELAY_FUNCTION) + def RegisterApp(self, app_request: App) -> None: + """Register a new QKD app.""" + self.check_connection() + LOGGER.debug(f'RegisterApp request: {grpc_message_to_json_string(app_request)}') + self.stub.RegisterApp(app_request) + LOGGER.debug('App registered successfully') + + @retry(max_retries=MAX_RETRIES, delay_function=DELAY_FUNCTION) + def UpdateApp(self, app_request: App) -> None: + """Update an existing QKD app.""" + self.check_connection() + LOGGER.debug(f'UpdateApp request: {grpc_message_to_json_string(app_request)}') + self.stub.UpdateApp(app_request) + LOGGER.debug('App updated successfully') + + @retry(max_retries=MAX_RETRIES, delay_function=DELAY_FUNCTION) + def ListApps(self, context_id) -> AppList: + """List all apps for a given context.""" + self.check_connection() + LOGGER.debug(f'ListApps request for context_id: {grpc_message_to_json_string(context_id)}') + response = self.stub.ListApps(context_id) + LOGGER.debug(f'ListApps result: {grpc_message_to_json_string(response)}') + return response + + @retry(max_retries=MAX_RETRIES, delay_function=DELAY_FUNCTION) + def GetApp(self, app_id: AppId) -> App: + """Fetch details of a specific app by its ID.""" + self.check_connection() + LOGGER.debug(f'GetApp request for app_id: {grpc_message_to_json_string(app_id)}') + response = self.stub.GetApp(app_id) + LOGGER.debug(f'GetApp result: {grpc_message_to_json_string(response)}') + return response + + @retry(max_retries=MAX_RETRIES, delay_function=DELAY_FUNCTION) + def DeleteApp(self, app_id: AppId) -> None: + """Delete an app by its ID.""" + self.check_connection() # Ensures connection is established + LOGGER.debug(f'DeleteApp request for app_id: {grpc_message_to_json_string(app_id)}') + self.stub.DeleteApp(app_id) # Calls the gRPC service + LOGGER.debug('App deleted successfully') diff --git a/src/qkd_app/client/__init__.py b/src/qkd_app/client/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..07d08814021ef82220611ee21c01ba01806682e9 --- /dev/null +++ b/src/qkd_app/client/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/src/qkd_app/requirements.in b/src/qkd_app/requirements.in new file mode 100644 index 0000000000000000000000000000000000000000..a9bce93b569792a75687811f08e03d398ae4aeb5 --- /dev/null +++ b/src/qkd_app/requirements.in @@ -0,0 +1,25 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +Flask==2.1.3 +Flask-HTTPAuth==4.5.0 +Flask-RESTful==0.3.9 +jsonschema==4.4.0 +requests==2.27.1 +werkzeug==2.3.7 +nats-py==2.6.* +psycopg2-binary==2.9.* +SQLAlchemy==1.4.* +sqlalchemy-cockroachdb==1.4.* +SQLAlchemy-Utils==0.38.* diff --git a/src/qkd_app/service/QKDAppService.py b/src/qkd_app/service/QKDAppService.py new file mode 100644 index 0000000000000000000000000000000000000000..b9b34ed9b8239ea119c5af1364bbc53914b42c51 --- /dev/null +++ b/src/qkd_app/service/QKDAppService.py @@ -0,0 +1,58 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging +import sqlalchemy +from common.Constants import ServiceNameEnum +from common.Settings import get_service_port_grpc +from common.message_broker.MessageBroker import MessageBroker +from common.proto.qkd_app_pb2_grpc import add_AppServiceServicer_to_server +from common.tools.service.GenericGrpcService import GenericGrpcService +from qkd_app.service.QKDAppServiceServicerImpl import AppServiceServicerImpl + +# Configure maximum number of workers for gRPC +GRPC_MAX_WORKERS = 200 # Adjusted for high concurrency +LOGGER = logging.getLogger(__name__) + +class AppService(GenericGrpcService): + """ + gRPC Service for handling QKD App-related operations. + This class initializes the gRPC server and installs the servicers. + """ + def __init__( + self, db_engine: sqlalchemy.engine.Engine, messagebroker: MessageBroker, cls_name: str = __name__ + ) -> None: + """ + Initializes the AppService with the provided database engine and message broker. + Sets up the gRPC server to handle app-related requests. + + Args: + db_engine (sqlalchemy.engine.Engine): Database engine for handling app data. + messagebroker (MessageBroker): Message broker for inter-service communication. + cls_name (str): Class name for logging purposes (default is __name__). + """ + # Get the port for the gRPC AppService + port = get_service_port_grpc(ServiceNameEnum.QKD_APP) + # Initialize the base class with port and max worker configuration + super().__init__(port, max_workers=GRPC_MAX_WORKERS, cls_name=cls_name) + # Initialize the AppServiceServicer with the database and message broker + self.app_servicer = AppServiceServicerImpl(db_engine, messagebroker) + + def install_servicers(self): + """ + Installs the AppService servicers to the gRPC server. + This allows the server to handle requests for QKD app operations. + """ + add_AppServiceServicer_to_server(self.app_servicer, self.server) + LOGGER.debug("AppService servicer installed") diff --git a/src/qkd_app/service/QKDAppServiceServicerImpl.py b/src/qkd_app/service/QKDAppServiceServicerImpl.py new file mode 100644 index 0000000000000000000000000000000000000000..3ef13b75e5510a95b91a9a67fa65ed06c32a3526 --- /dev/null +++ b/src/qkd_app/service/QKDAppServiceServicerImpl.py @@ -0,0 +1,186 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import grpc +import logging +import sqlalchemy +import uuid +from common.message_broker.MessageBroker import MessageBroker +from common.proto.context_pb2 import Empty, ContextId +from common.proto.qkd_app_pb2 import App, AppId, AppList, QKDAppTypesEnum, QoS +from common.method_wrappers.ServiceExceptions import InvalidArgumentException, NotFoundException +from common.proto.qkd_app_pb2_grpc import AppServiceServicer +from common.tools.grpc.Tools import grpc_message_to_json_string +from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method +from .database.QKDApp import app_set, app_list_objs, app_get, app_get_by_server, app_delete + +LOGGER = logging.getLogger(__name__) + +METRICS_POOL = MetricsPool('QkdApp', 'RPC') + +class AppServiceServicerImpl(AppServiceServicer): + def __init__(self, db_engine: sqlalchemy.engine.Engine, messagebroker: MessageBroker): + LOGGER.debug('Initializing AppServiceServicer...') + self.db_engine = db_engine + self.messagebroker = messagebroker + LOGGER.debug('AppServiceServicer initialized') + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def RegisterApp(self, request: App, context: grpc.ServicerContext) -> Empty: + """ + Registers an app in the system, handling both internal and external applications + with ETSI GS QKD 015 compliance. + """ + LOGGER.debug(f"Received RegisterApp request: {grpc_message_to_json_string(request)}") + + try: + # Validate QoS parameters as per ETSI 015 requirements + self._validate_qos(request.qos) + + # Check if an app with the same server_app_id and local_device_id already exists + existing_app = self._check_existing_app(request.server_app_id, request.local_device_id.device_uuid.uuid) + + if existing_app: + if request.app_type == QKDAppTypesEnum.QKDAPPTYPES_CLIENT: + LOGGER.debug(f"Handling external app registration for server_app_id: {request.server_app_id}") + # Handle second-party registration for external apps + if not existing_app.remote_device_id.device_uuid.uuid: + existing_app.remote_device_id.device_uuid.uuid = request.local_device_id.device_uuid.uuid + app_set(self.db_engine, self.messagebroker, existing_app) + LOGGER.debug(f"Updated external app with server_app_id: {request.server_app_id}, remote_device_id: {request.local_device_id.device_uuid.uuid}") + else: + context.set_code(grpc.StatusCode.ALREADY_EXISTS) + context.set_details(f"App with server_app_id {request.server_app_id} already has both parties registered.") + return Empty() + else: + context.set_code(grpc.StatusCode.ALREADY_EXISTS) + context.set_details(f"App with server_app_id {request.server_app_id} already exists.") + return Empty() + else: + # Assign application IDs as required + self._validate_and_assign_app_ids(request) + + # Register the app + if request.app_type == QKDAppTypesEnum.QKDAPPTYPES_INTERNAL: + LOGGER.debug(f"Registering internal app with app_uuid: {request.app_id.app_uuid.uuid}") + app_set(self.db_engine, self.messagebroker, request) + else: + self._register_external_app(request) + + LOGGER.debug(f"RegisterApp completed successfully for app: {request.server_app_id}") + return Empty() + + except InvalidArgumentException as e: + context.set_code(grpc.StatusCode.INVALID_ARGUMENT) + context.set_details(str(e)) + raise e + except Exception as e: + context.set_code(grpc.StatusCode.INTERNAL) + context.set_details("An internal error occurred during app registration.") + raise e + + def _validate_qos(self, qos: QoS) -> None: + """ + Validates the QoS parameters for the application, ensuring ETSI 015 compliance. + """ + if qos.max_bandwidth and qos.min_bandwidth and qos.max_bandwidth < qos.min_bandwidth: + raise InvalidArgumentException("QoS max_bandwidth cannot be less than min_bandwidth.") + + if qos.ttl and qos.ttl <= 0: + raise InvalidArgumentException("QoS TTL must be a positive value.") + + LOGGER.debug(f"QoS validated: {qos}") + + def _check_existing_app(self, server_app_id: str, local_device_id: str): + try: + return app_get_by_server(self.db_engine, server_app_id) + except NotFoundException: + return None + + def _validate_and_assign_app_ids(self, request: App) -> None: + """ + Validates and assigns app IDs (app_uuid, server_app_id, client_app_id) if not provided. + """ + if not request.app_id.app_uuid.uuid: + request.app_id.app_uuid.uuid = str(uuid.uuid4()) + LOGGER.debug(f"Assigned new app_uuid: {request.app_id.app_uuid.uuid}") + + if not request.server_app_id: + request.server_app_id = str(uuid.uuid4()) + LOGGER.debug(f"Assigned new server_app_id: {request.server_app_id}") + + del request.client_app_id[:] # Clear the repeated field for clients + + def _register_external_app(self, request: App) -> None: + try: + existing_app = app_get_by_server(self.db_engine, request.server_app_id) + + if not existing_app.remote_device_id.device_uuid.uuid: + existing_app.remote_device_id.device_uuid.uuid = request.local_device_id.device_uuid.uuid + app_set(self.db_engine, self.messagebroker, existing_app) + else: + LOGGER.debug(f"App with server_app_id: {request.server_app_id} already has both parties registered.") + except NotFoundException: + app_set(self.db_engine, self.messagebroker, request) + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def ListApps(self, request: ContextId, context: grpc.ServicerContext) -> AppList: + """ + Lists all apps in the system, including their statistics and QoS attributes. + """ + LOGGER.debug(f"Received ListApps request: {grpc_message_to_json_string(request)}") + + try: + apps = app_list_objs(self.db_engine, request.context_uuid.uuid) + for app in apps.apps: + LOGGER.debug(f"App retrieved: {grpc_message_to_json_string(app)}") + + LOGGER.debug(f"ListApps returned {len(apps.apps)} apps for context_id: {request.context_uuid.uuid}") + return apps + except Exception as e: + context.set_code(grpc.StatusCode.INTERNAL) + context.set_details("An internal error occurred while listing apps.") + raise e + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def GetApp(self, request: AppId, context: grpc.ServicerContext) -> App: + """ + Fetches details of a specific app based on its AppId, including QoS and performance stats. + """ + LOGGER.debug(f"Received GetApp request: {grpc_message_to_json_string(request)}") + try: + app = app_get(self.db_engine, request) + LOGGER.debug(f"GetApp found app with app_uuid: {request.app_uuid.uuid}") + return app + except NotFoundException as e: + context.set_code(grpc.StatusCode.NOT_FOUND) + context.set_details(f"App not found: {e}") + raise e + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def DeleteApp(self, request: AppId, context: grpc.ServicerContext) -> Empty: + """ + Deletes an app from the system by its AppId, following ETSI compliance. + """ + LOGGER.debug(f"Received DeleteApp request for app_uuid: {request.app_uuid.uuid}") + try: + app_delete(self.db_engine, request.app_uuid.uuid) + LOGGER.debug(f"App with UUID {request.app_uuid.uuid} deleted successfully.") + return Empty() + except NotFoundException as e: + context.set_code(grpc.StatusCode.NOT_FOUND) + context.set_details(f"App not found: {e}") + raise e + + diff --git a/src/qkd_app/service/__init__.py b/src/qkd_app/service/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..07d08814021ef82220611ee21c01ba01806682e9 --- /dev/null +++ b/src/qkd_app/service/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/src/qkd_app/service/__main__.py b/src/qkd_app/service/__main__.py new file mode 100644 index 0000000000000000000000000000000000000000..17f3ac240c33b28454e2df43862dd66a50eb5c45 --- /dev/null +++ b/src/qkd_app/service/__main__.py @@ -0,0 +1,94 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging +import signal +import sys +import threading +from prometheus_client import start_http_server +from common.Settings import get_log_level, get_metrics_port +from qkd_app.service.QKDAppService import AppService +from qkd_app.service.database.Engine import Engine +from qkd_app.service.database.models._Base import rebuild_database + +# Set up logging +LOG_LEVEL = get_log_level() +logging.basicConfig(level=LOG_LEVEL, format="[%(asctime)s] %(levelname)s:%(name)s:%(message)s") +LOGGER = logging.getLogger(__name__) + +#LOGGER.addHandler(logging.StreamHandler(stream=sys.stderr)) +#LOGGER.setLevel(logging.WARNING) + +# Event for terminating the service gracefully +terminate = threading.Event() + +def signal_handler(signum, frame): + """ + Handle termination signals like SIGINT and SIGTERM to ensure graceful shutdown. + """ + LOGGER.warning('Termination signal received') + terminate.set() + +def main(): + LOGGER.info('Starting...') + # Register signal handlers for graceful shutdown + signal.signal(signal.SIGINT, signal_handler) + signal.signal(signal.SIGTERM, signal_handler) + + # Start Prometheus metrics server + metrics_port = get_metrics_port() + start_http_server(metrics_port) + LOGGER.info(f'Metrics server started on port {metrics_port}') + + # Initialize the SQLAlchemy database engine + LOGGER.info('Getting SQLAlchemy DB Engine...') + db_engine = Engine.get_engine() + if db_engine is None: + LOGGER.error('Unable to get SQLAlchemy DB Engine. Exiting...') + return -1 + + # Try creating the database or log any issues + try: + Engine.create_database(db_engine) + except Exception as e: # More specific exception handling + LOGGER.exception(f'Failed to check/create the database: {db_engine.url}. Error: {str(e)}') + return -1 + + # Rebuild the database schema if necessary + rebuild_database(db_engine) + + # Initialize the message broker (if needed) + messagebroker = None # Disabled until further notice, can be re-enabled when necessary + # messagebroker = MessageBroker(get_messagebroker_backend()) + + # Start the gRPC App Service + grpc_service = AppService(db_engine, messagebroker) + grpc_service.start() + + LOGGER.info('Services started. Waiting for termination signal...') + + # Wait for Ctrl+C or termination signal + # Keep the process running until a termination signal is received + while not terminate.wait(timeout=1.0): + pass + + # Shutdown services gracefully on termination + LOGGER.info('Terminating services...') + grpc_service.stop() + + LOGGER.info('Shutdown complete. Exiting...') + return 0 + +if __name__ == '__main__': + sys.exit(main()) diff --git a/src/kpi_manager/database/KpiEngine.py b/src/qkd_app/service/database/Engine.py similarity index 67% rename from src/kpi_manager/database/KpiEngine.py rename to src/qkd_app/service/database/Engine.py index 0fce7e3d36cf2f03a18f311c815719a4f17b2869..ec86618218cc396dea31404b88d33e46d320ed58 100644 --- a/src/kpi_manager/database/KpiEngine.py +++ b/src/qkd_app/service/database/Engine.py @@ -12,29 +12,44 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging, sqlalchemy +import logging, sqlalchemy, sqlalchemy_utils from common.Settings import get_setting LOGGER = logging.getLogger(__name__) + +APP_NAME = 'tfs' +ECHO = False # true: dump SQL commands and transactions executed CRDB_URI_TEMPLATE = 'cockroachdb://{:s}:{:s}@cockroachdb-public.{:s}.svc.cluster.local:{:s}/{:s}?sslmode={:s}' -class KpiEngine: +class Engine: @staticmethod def get_engine() -> sqlalchemy.engine.Engine: crdb_uri = get_setting('CRDB_URI', default=None) if crdb_uri is None: CRDB_NAMESPACE = get_setting('CRDB_NAMESPACE') CRDB_SQL_PORT = get_setting('CRDB_SQL_PORT') - CRDB_DATABASE = 'tfs_kpi_mgmt' # TODO: define variable get_setting('CRDB_DATABASE_KPI_MGMT') + CRDB_DATABASE = get_setting('CRDB_DATABASE') CRDB_USERNAME = get_setting('CRDB_USERNAME') CRDB_PASSWORD = get_setting('CRDB_PASSWORD') CRDB_SSLMODE = get_setting('CRDB_SSLMODE') crdb_uri = CRDB_URI_TEMPLATE.format( CRDB_USERNAME, CRDB_PASSWORD, CRDB_NAMESPACE, CRDB_SQL_PORT, CRDB_DATABASE, CRDB_SSLMODE) + try: - engine = sqlalchemy.create_engine(crdb_uri, echo=False) - LOGGER.info(' KpiDBmanager initalized with DB URL: {:}'.format(crdb_uri)) + engine = sqlalchemy.create_engine( + crdb_uri, connect_args={'application_name': APP_NAME}, echo=ECHO, future=True) except: # pylint: disable=bare-except # pragma: no cover LOGGER.exception('Failed to connect to database: {:s}'.format(str(crdb_uri))) - return None # type: ignore + return None + return engine + + @staticmethod + def create_database(engine : sqlalchemy.engine.Engine) -> None: + if not sqlalchemy_utils.database_exists(engine.url): + sqlalchemy_utils.create_database(engine.url) + + @staticmethod + def drop_database(engine : sqlalchemy.engine.Engine) -> None: + if sqlalchemy_utils.database_exists(engine.url): + sqlalchemy_utils.drop_database(engine.url) diff --git a/src/qkd_app/service/database/QKDApp.py b/src/qkd_app/service/database/QKDApp.py new file mode 100644 index 0000000000000000000000000000000000000000..539555a4dac055d56158298ed7db6dceec39f446 --- /dev/null +++ b/src/qkd_app/service/database/QKDApp.py @@ -0,0 +1,173 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import datetime +import logging +from typing import Dict, List, Optional + +from sqlalchemy.dialects.postgresql import insert +from sqlalchemy.engine import Engine +from sqlalchemy.orm import Session, sessionmaker +from sqlalchemy_cockroachdb import run_transaction + +from common.method_wrappers.ServiceExceptions import NotFoundException +from common.message_broker.MessageBroker import MessageBroker +from common.proto.qkd_app_pb2 import AppList, App, AppId +from qkd_app.service.database.uuids._Builder import get_uuid_from_string, get_uuid_random +from common.method_wrappers.ServiceExceptions import InvalidArgumentsException +from common.tools.object_factory.QKDApp import json_app_id +from common.tools.object_factory.Context import json_context_id + +from .models.QKDAppModel import AppModel +from .uuids.QKDApp import app_get_uuid +from context.service.database.uuids.Context import context_get_uuid +from .models.enums.QKDAppStatus import grpc_to_enum__qkd_app_status +from .models.enums.QKDAppTypes import grpc_to_enum__qkd_app_types + +LOGGER = logging.getLogger(__name__) + + +def app_list_objs(db_engine: Engine, context_uuid: str = None) -> AppList: + """ + Fetches a list of all QKD applications from the database. Optionally filters by context UUID. + + :param db_engine: SQLAlchemy Engine for DB connection + :param context_uuid: UUID of the context to filter by (optional) + :return: AppList containing all apps + """ + def callback(session: Session) -> List[Dict]: + query = session.query(AppModel) + + if context_uuid: + query = query.filter_by(context_uuid=context_uuid) + + return [obj.dump() for obj in query.all()] + + apps = run_transaction(sessionmaker(bind=db_engine), callback) + return AppList(apps=apps) + + +def app_get(db_engine: Engine, request: AppId) -> App: + """ + Fetches a specific app by its UUID. + + :param db_engine: SQLAlchemy Engine for DB connection + :param request: AppId protobuf containing app ID and context ID + :return: App protobuf object + :raises NotFoundException: If the app is not found in the database + """ + app_uuid = app_get_uuid(request, allow_random=False) + + def callback(session: Session) -> Optional[Dict]: + obj = session.query(AppModel).filter_by(app_uuid=app_uuid).one_or_none() + return obj.dump() if obj else None + + obj = run_transaction(sessionmaker(bind=db_engine), callback) + + if not obj: + raise NotFoundException('App', request.app_uuid.uuid, extra_details=[ + f'app_uuid generated was: {app_uuid}' + ]) + + return App(**obj) + + +def app_set(db_engine: Engine, messagebroker: MessageBroker, request: App) -> AppId: + """ + Creates or updates an app in the database. If the app already exists, updates the app. + Otherwise, inserts a new entry. + + :param db_engine: SQLAlchemy Engine for DB connection + :param messagebroker: MessageBroker instance for notifications + :param request: App protobuf object containing app data + :return: AppId protobuf object representing the newly created or updated app + """ + context_uuid = context_get_uuid(request.app_id.context_id, allow_random=False) + app_uuid = app_get_uuid(request.app_id, allow_random=True) + + # Prepare app data for insertion/update + app_data = { + 'context_uuid': context_uuid, + 'app_uuid': app_uuid, + 'app_status': grpc_to_enum__qkd_app_status(request.app_status), + 'app_type': grpc_to_enum__qkd_app_types(request.app_type), + 'server_app_id': request.server_app_id, + 'client_app_id': request.client_app_id, + 'backing_qkdl_uuid': [qkdl.qkdl_uuid.uuid for qkdl in request.backing_qkdl_id], + 'local_device_uuid': request.local_device_id.device_uuid.uuid, + 'remote_device_uuid': request.remote_device_id.device_uuid.uuid if request.remote_device_id.device_uuid.uuid else None, + 'created_at': datetime.datetime.utcnow(), + 'updated_at': datetime.datetime.utcnow(), + } + + def callback(session: Session) -> bool: + # Create the insert statement + stmt = insert(AppModel).values(app_data) + + # Apply the conflict resolution + stmt = stmt.on_conflict_do_update( + index_elements=[AppModel.app_uuid], + set_=dict( + app_status=stmt.excluded.app_status, + app_type=stmt.excluded.app_type, + server_app_id=stmt.excluded.server_app_id, + client_app_id=stmt.excluded.client_app_id, + backing_qkdl_uuid=stmt.excluded.backing_qkdl_uuid, + local_device_uuid=stmt.excluded.local_device_uuid, + remote_device_uuid=stmt.excluded.remote_device_uuid, + updated_at=stmt.excluded.updated_at + ) + ) + session.execute(stmt) + return True + + run_transaction(sessionmaker(bind=db_engine), callback) + app_id = json_app_id(app_uuid, context_id=json_context_id(context_uuid)) + + return AppId(**app_id) + + +def app_get_by_server(db_engine: Engine, server_app_id: str) -> App: + """ + Fetches an app by its server_app_id. + """ + def callback(session: Session) -> Optional[Dict]: + obj = session.query(AppModel).filter_by(server_app_id=server_app_id).one_or_none() + return obj.dump() if obj else None + + obj = run_transaction(sessionmaker(bind=db_engine), callback) + + if not obj: + raise NotFoundException('App', server_app_id) + + return App(**obj) + + +def app_delete(db_engine: Engine, app_uuid: str) -> None: + """ + Deletes an app by its UUID from the database. + + :param db_engine: SQLAlchemy Engine for DB connection + :param app_uuid: The UUID of the app to be deleted + """ + def callback(session: Session) -> bool: + app_obj = session.query(AppModel).filter_by(app_uuid=app_uuid).one_or_none() + + if app_obj is None: + raise NotFoundException('App', app_uuid) + + session.delete(app_obj) + return True + + run_transaction(sessionmaker(bind=db_engine), callback) diff --git a/src/qkd_app/service/database/__init__.py b/src/qkd_app/service/database/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..07d08814021ef82220611ee21c01ba01806682e9 --- /dev/null +++ b/src/qkd_app/service/database/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/src/qkd_app/service/database/models/QKDAppModel.py b/src/qkd_app/service/database/models/QKDAppModel.py new file mode 100644 index 0000000000000000000000000000000000000000..d9797d73c9c168efee5810014a70e0425f67e051 --- /dev/null +++ b/src/qkd_app/service/database/models/QKDAppModel.py @@ -0,0 +1,81 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from sqlalchemy import Column, DateTime, String, Enum, ARRAY +from sqlalchemy.dialects.postgresql import UUID +from typing import Dict +from ._Base import _Base +from .enums.QKDAppStatus import ORM_QKDAppStatusEnum +from .enums.QKDAppTypes import ORM_QKDAppTypesEnum + + +class AppModel(_Base): + """ + ORM model representing a QKD (Quantum Key Distribution) Application. + This model stores information about the QKD app status, type, and related device and + backing QKD links. It is stored in the 'qkd_app' table. + """ + __tablename__ = 'qkd_app' + + # Primary Key + app_uuid = Column(UUID(as_uuid=False), primary_key=True, nullable=False, doc="Unique identifier for the QKD app.") + + # Foreign Key-like field (context) + context_uuid = Column(UUID(as_uuid=False), nullable=False, doc="Foreign key linking to the application's context.") + + # Status and type + app_status = Column(Enum(ORM_QKDAppStatusEnum), nullable=False, doc="Current status of the QKD app.") + app_type = Column(Enum(ORM_QKDAppTypesEnum), nullable=False, doc="Type of the QKD app (internal or client).") + + # Application IDs + server_app_id = Column(String, nullable=False, doc="ID of the server-side QKD application.") + client_app_id = Column(ARRAY(String), nullable=False, doc="List of client-side QKD application IDs.") + + # Backing QKD links and devices + backing_qkdl_uuid = Column(ARRAY(UUID(as_uuid=False)), nullable=False, doc="List of UUIDs of the backing QKD links.") + local_device_uuid = Column(UUID(as_uuid=False), nullable=False, doc="UUID of the local QKD device.") + remote_device_uuid = Column(UUID(as_uuid=False), nullable=True, doc="UUID of the remote QKD device (nullable).") + + # Timestamps + created_at = Column(DateTime, nullable=False, doc="Timestamp when the QKD app record was created.") + updated_at = Column(DateTime, nullable=False, doc="Timestamp when the QKD app record was last updated.") + + def dump_id(self) -> Dict: + """ + Serializes the primary key fields (context and app UUID) into a dictionary. + + :return: A dictionary with 'context_id' and 'app_uuid' keys. + """ + return { + 'context_id': {'context_uuid': {'uuid': self.context_uuid}}, + 'app_uuid': {'uuid': self.app_uuid} + } + + def dump(self) -> Dict: + """ + Serializes the entire QKD app model into a dictionary, including app status, type, IDs, + device info, and backing QKD links. + + :return: A dictionary representation of the QKD app. + """ + return { + 'app_id': self.dump_id(), + 'app_status': self.app_status.value, + 'app_type': self.app_type.value, + 'server_app_id': self.server_app_id, + 'client_app_id': self.client_app_id, + 'backing_qkdl_id': [{'qkdl_uuid': {'uuid': qkdl_id}} for qkdl_id in self.backing_qkdl_uuid], + 'local_device_id': {'device_uuid': {'uuid': self.local_device_uuid}}, + 'remote_device_id': {'device_uuid': {'uuid': self.remote_device_uuid}} if self.remote_device_uuid else None, + } diff --git a/src/qkd_app/service/database/models/_Base.py b/src/qkd_app/service/database/models/_Base.py new file mode 100644 index 0000000000000000000000000000000000000000..f17fb9a56dcd120ad1dc95ceee720aa942f6ae6c --- /dev/null +++ b/src/qkd_app/service/database/models/_Base.py @@ -0,0 +1,29 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import sqlalchemy +from sqlalchemy.orm import declarative_base + +_Base = declarative_base() + +def rebuild_database(db_engine: sqlalchemy.engine.Engine, drop_if_exists: bool = False): + """ + Rebuild the database schema for the QKD application. Optionally drop the existing schema if specified. + + :param db_engine: SQLAlchemy engine instance. + :param drop_if_exists: Boolean indicating if the schema should be dropped before rebuilding. + """ + if drop_if_exists: + _Base.metadata.drop_all(db_engine) + _Base.metadata.create_all(db_engine) diff --git a/src/qkd_app/service/database/models/__init__.py b/src/qkd_app/service/database/models/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..07d08814021ef82220611ee21c01ba01806682e9 --- /dev/null +++ b/src/qkd_app/service/database/models/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/src/qkd_app/service/database/models/enums/QKDAppStatus.py b/src/qkd_app/service/database/models/enums/QKDAppStatus.py new file mode 100644 index 0000000000000000000000000000000000000000..980a8b14adca8c69eaf567037dc09872f33622f9 --- /dev/null +++ b/src/qkd_app/service/database/models/enums/QKDAppStatus.py @@ -0,0 +1,30 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import enum +import functools +from common.proto.qkd_app_pb2 import QKDAppStatusEnum +from ._GrpcToEnum import grpc_to_enum + +# Enum mapping for ORM-based app statuses. +class ORM_QKDAppStatusEnum(enum.Enum): + ON = QKDAppStatusEnum.QKDAPPSTATUS_ON + DISCONNECTED = QKDAppStatusEnum.QKDAPPSTATUS_DISCONNECTED + OUT_OF_TIME = QKDAppStatusEnum.QKDAPPSTATUS_OUT_OF_TIME + ZOMBIE = QKDAppStatusEnum.QKDAPPSTATUS_ZOMBIE + +# Function to map between gRPC and ORM enums. +grpc_to_enum__qkd_app_status = functools.partial( + grpc_to_enum, QKDAppStatusEnum, ORM_QKDAppStatusEnum +) diff --git a/src/qkd_app/service/database/models/enums/QKDAppTypes.py b/src/qkd_app/service/database/models/enums/QKDAppTypes.py new file mode 100644 index 0000000000000000000000000000000000000000..fdd318cec49b7b7ec8e1a0347c8b0f8c1aeb3a5c --- /dev/null +++ b/src/qkd_app/service/database/models/enums/QKDAppTypes.py @@ -0,0 +1,28 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import enum +import functools +from common.proto.qkd_app_pb2 import QKDAppTypesEnum +from ._GrpcToEnum import grpc_to_enum + +# Enum mapping for ORM-based app types. +class ORM_QKDAppTypesEnum(enum.Enum): + INTERNAL = QKDAppTypesEnum.QKDAPPTYPES_INTERNAL + CLIENT = QKDAppTypesEnum.QKDAPPTYPES_CLIENT + +# Function to map between gRPC and ORM enums. +grpc_to_enum__qkd_app_types = functools.partial( + grpc_to_enum, QKDAppTypesEnum, ORM_QKDAppTypesEnum +) diff --git a/src/qkd_app/service/database/models/enums/_GrpcToEnum.py b/src/qkd_app/service/database/models/enums/_GrpcToEnum.py new file mode 100644 index 0000000000000000000000000000000000000000..0dcad039f7be240acbbec418d12475557e4c42c1 --- /dev/null +++ b/src/qkd_app/service/database/models/enums/_GrpcToEnum.py @@ -0,0 +1,38 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import re +from enum import Enum +from typing import Optional + +# Enumeration classes are redundant with gRPC classes, but gRPC does not provide a programmatical method to retrieve +# the values it expects from strings containing the desired value symbol or its integer value, so a kind of mapping is +# required. Besides, ORM Models expect Enum classes in EnumeratedFields; we create specific and conveniently defined +# Enum classes to serve both purposes. + +def grpc_to_enum(grpc_enum_class, orm_enum_class : Enum, grpc_enum_value, grpc_enum_prefix : Optional[str] = None): + enum_name = grpc_enum_class.Name(grpc_enum_value) + + if grpc_enum_prefix is None: + grpc_enum_prefix = orm_enum_class.__name__.upper() + #grpc_enum_prefix = re.sub(r'^ORM_(.+)$', r'\1', grpc_enum_prefix) + #grpc_enum_prefix = re.sub(r'^(.+)ENUM$', r'\1', grpc_enum_prefix) + #grpc_enum_prefix = grpc_enum_prefix + '_' + grpc_enum_prefix = re.sub(r'^ORM_(.+)ENUM$', r'\1_', grpc_enum_prefix) + + if len(grpc_enum_prefix) > 0: + enum_name = enum_name.replace(grpc_enum_prefix, '') + + orm_enum_value = orm_enum_class._member_map_.get(enum_name) + return orm_enum_value diff --git a/src/qkd_app/service/database/models/enums/__init__.py b/src/qkd_app/service/database/models/enums/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..07d08814021ef82220611ee21c01ba01806682e9 --- /dev/null +++ b/src/qkd_app/service/database/models/enums/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/src/qkd_app/service/database/uuids/QKDApp.py b/src/qkd_app/service/database/uuids/QKDApp.py new file mode 100644 index 0000000000000000000000000000000000000000..f6c0e1e12d591e747adf9497c77177e0fdd4dc51 --- /dev/null +++ b/src/qkd_app/service/database/uuids/QKDApp.py @@ -0,0 +1,37 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from common.proto.qkd_app_pb2 import AppId +from common.method_wrappers.ServiceExceptions import InvalidArgumentsException +from ._Builder import get_uuid_from_string, get_uuid_random + +def app_get_uuid(app_id: AppId, allow_random: bool = False) -> str: + """ + Retrieves or generates the UUID for an app. + + :param app_id: AppId object that contains the app UUID + :param allow_random: If True, generates a random UUID if app_uuid is not set + :return: App UUID as a string + """ + app_uuid = app_id.app_uuid.uuid + + if app_uuid: + return get_uuid_from_string(app_uuid) + + if allow_random: + return get_uuid_random() + + raise InvalidArgumentsException([ + ('app_id.app_uuid.uuid', app_uuid), + ], extra_details=['At least one UUID is required to identify the app.']) diff --git a/src/qkd_app/service/database/uuids/_Builder.py b/src/qkd_app/service/database/uuids/_Builder.py new file mode 100644 index 0000000000000000000000000000000000000000..c5996b0f9d2cced27fd05e3966c3a60fa9bae24d --- /dev/null +++ b/src/qkd_app/service/database/uuids/_Builder.py @@ -0,0 +1,51 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Optional, Union +from uuid import UUID, uuid4, uuid5 + +# Hardcoded namespace for generating UUIDs. +NAMESPACE_TFS = UUID('200e3a1f-2223-534f-a100-758e29c37f40') + +def get_uuid_from_string(str_uuid_or_name: Union[str, UUID], prefix_for_name: Optional[str] = None) -> str: + """ + Convert a string or UUID object into a UUID string. If input is a name, generate a UUID using the TFS namespace. + + :param str_uuid_or_name: Input string or UUID to be converted into UUID format + :param prefix_for_name: Optional prefix to add before the name when generating a name-based UUID + :return: A valid UUID string + :raises ValueError: If the input is invalid and cannot be converted to a UUID + """ + if isinstance(str_uuid_or_name, UUID): + return str(str_uuid_or_name) # Ensure returning a string representation + + if not isinstance(str_uuid_or_name, str): + raise ValueError(f"Invalid parameter ({repr(str_uuid_or_name)}). Expected a string or UUID to produce a valid UUID.") + + try: + # Try to interpret the input as a UUID + return str(UUID(str_uuid_or_name)) + except ValueError: + # If the input isn't a valid UUID, generate one using the name-based approach + if prefix_for_name: + str_uuid_or_name = f"{prefix_for_name}/{str_uuid_or_name}" + return str(uuid5(NAMESPACE_TFS, str_uuid_or_name)) + +def get_uuid_random() -> str: + """ + Generate and return a new random UUID as a string. + + :return: A randomly generated UUID string + """ + return str(uuid4()) diff --git a/src/qos_profile/.gitlab-ci.yml b/src/qos_profile/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..a688cdb0590701d1f2659cac0c1049368a2228a2 --- /dev/null +++ b/src/qos_profile/.gitlab-ci.yml @@ -0,0 +1,107 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Build, tag, and push the Docker image to the GitLab Docker registry +build qos_profile: + variables: + IMAGE_NAME: 'qos_profile' # name of the microservice + IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) + stage: build + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + script: + - docker buildx build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/Dockerfile . + - docker tag "$IMAGE_NAME:$IMAGE_TAG" "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG" + - docker push "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG" + after_script: + - docker images --filter="dangling=true" --quiet | xargs -r docker rmi + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' + - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' + - changes: + - src/common/**/*.py + - proto/*.proto + - src/$IMAGE_NAME/**/*.{py,in,yml} + - src/$IMAGE_NAME/Dockerfile + - src/$IMAGE_NAME/tests/*.py + - manifests/${IMAGE_NAME}service.yaml + - .gitlab-ci.yml + +# Apply unit test to the component +unit_test qos_profile: + variables: + IMAGE_NAME: 'qos_profile' # name of the microservice + IMAGE_TAG: 'latest' # tag of the container image (production, development, etc) + stage: unit_test + needs: + - build qos_profile + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + - if docker network list | grep teraflowbridge; then echo "teraflowbridge is already created"; else docker network create --driver=bridge teraflowbridge; fi + - if docker container ls | grep crdb; then docker rm -f crdb; else echo "CockroachDB container is not in the system"; fi + - if docker volume ls | grep crdb; then docker volume rm -f crdb; else echo "CockroachDB volume is not in the system"; fi + - if docker container ls | grep $IMAGE_NAME; then docker rm -f $IMAGE_NAME; else echo "$IMAGE_NAME container is not in the system"; fi + script: + - docker pull "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG" + - docker pull "cockroachdb/cockroach:latest-v22.2" + - docker volume create crdb + - > + docker run --name crdb -d --network=teraflowbridge -p 26257:26257 -p 8080:8080 + --env COCKROACH_DATABASE=tfs_test --env COCKROACH_USER=tfs --env COCKROACH_PASSWORD=tfs123 + --volume "crdb:/cockroach/cockroach-data" + cockroachdb/cockroach:latest-v22.2 start-single-node + - echo "Waiting for initialization..." + - while ! docker logs crdb 2>&1 | grep -q 'finished creating default user \"tfs\"'; do sleep 1; done + - docker logs crdb + - docker ps -a + - CRDB_ADDRESS=$(docker inspect crdb --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}") + - echo $CRDB_ADDRESS + - > + docker run --name $IMAGE_NAME -d -p 3030:3030 + --env "CRDB_URI=cockroachdb://tfs:tfs123@${CRDB_ADDRESS}:26257/tfs_test?sslmode=require" + --volume "$PWD/src/$IMAGE_NAME/tests:/opt/results" + --network=teraflowbridge + $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG + - docker ps -a + - sleep 5 + - docker logs $IMAGE_NAME + - > + docker exec -i $IMAGE_NAME bash -c + "coverage run -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_crud.py --junitxml=/opt/results/${IMAGE_NAME}_report.xml" + - docker exec -i $IMAGE_NAME bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing" + coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' + after_script: + # Check status after the tests + - docker ps -a + - docker logs $IMAGE_NAME + - docker rm -f $IMAGE_NAME crdb + - docker volume rm -f crdb + - docker network rm teraflowbridge + - docker volume prune --force + - docker image prune --force + rules: + - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' + - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' + - changes: + - src/common/**/*.py + - proto/*.proto + - src/$IMAGE_NAME/**/*.{py,in,yml} + - src/$IMAGE_NAME/Dockerfile + - src/$IMAGE_NAME/tests/*.py + - manifests/${IMAGE_NAME}service.yaml + - .gitlab-ci.yml + artifacts: + when: always + reports: + junit: src/$IMAGE_NAME/tests/${IMAGE_NAME}_report.xml diff --git a/src/qos_profile/Config.py b/src/qos_profile/Config.py new file mode 100644 index 0000000000000000000000000000000000000000..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 --- /dev/null +++ b/src/qos_profile/Config.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/src/qos_profile/Dockerfile b/src/qos_profile/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..361dc588c298b384b597edc2709333ba29cf28de --- /dev/null +++ b/src/qos_profile/Dockerfile @@ -0,0 +1,68 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM python:3.9-slim + +# Install dependencies +RUN apt-get --yes --quiet --quiet update && \ + apt-get --yes --quiet --quiet install wget g++ git && \ + rm -rf /var/lib/apt/lists/* + +# Set Python to show logs as they occur +ENV PYTHONUNBUFFERED=0 + +# Download the gRPC health probe +RUN GRPC_HEALTH_PROBE_VERSION=v0.2.0 && \ + wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \ + chmod +x /bin/grpc_health_probe + +# Get generic Python packages +RUN python3 -m pip install --upgrade pip +RUN python3 -m pip install --upgrade setuptools wheel +RUN python3 -m pip install --upgrade pip-tools + +# Get common Python packages +# Note: this step enables sharing the previous Docker build steps among all the Python components +WORKDIR /var/teraflow +COPY common_requirements.in common_requirements.in +RUN pip-compile --quiet --output-file=common_requirements.txt common_requirements.in +RUN python3 -m pip install -r common_requirements.txt + +# Add common files into working directory +WORKDIR /var/teraflow/common +COPY src/common/. ./ +RUN rm -rf proto + +# Create proto sub-folder, copy .proto files, and generate Python code +RUN mkdir -p /var/teraflow/common/proto +WORKDIR /var/teraflow/common/proto +RUN touch __init__.py +COPY proto/*.proto ./ +RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto +RUN rm *.proto +RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \; + +# Create component sub-folders, get specific Python packages +RUN mkdir -p /var/teraflow/qos_profile +WORKDIR /var/teraflow/qos_profile +COPY src/qos_profile/requirements.in requirements.in +RUN pip-compile --quiet --output-file=requirements.txt requirements.in +RUN python3 -m pip install -r requirements.txt + +# Add component files into working directory +WORKDIR /var/teraflow +COPY src/qos_profile/. qos_profile/ + +# Start the service +ENTRYPOINT ["python", "-m", "qos_profile.service"] diff --git a/src/qos_profile/__init__.py b/src/qos_profile/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 --- /dev/null +++ b/src/qos_profile/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/src/qos_profile/client/QoSProfileClient.py b/src/qos_profile/client/QoSProfileClient.py new file mode 100644 index 0000000000000000000000000000000000000000..748b3f208cc44e80c2e7b88f163f937328249633 --- /dev/null +++ b/src/qos_profile/client/QoSProfileClient.py @@ -0,0 +1,91 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from typing import Iterator +import grpc, logging +from common.Constants import ServiceNameEnum +from common.Settings import get_service_host, get_service_port_grpc +from common.proto.context_pb2 import Empty, QoSProfileId +from common.proto.qos_profile_pb2 import QoSProfile, QoDConstraintsRequest +from common.proto.context_pb2 import Constraint +from common.proto.qos_profile_pb2_grpc import QoSProfileServiceStub +from common.tools.client.RetryDecorator import retry, delay_exponential +from common.tools.grpc.Tools import grpc_message_to_json_string + +LOGGER = logging.getLogger(__name__) +MAX_RETRIES = 15 +DELAY_FUNCTION = delay_exponential(initial=0.01, increment=2.0, maximum=5.0) +RETRY_DECORATOR = retry(max_retries=MAX_RETRIES, delay_function=DELAY_FUNCTION, prepare_method_name='connect') + +class QoSProfileClient: + def __init__(self, host=None, port=None): + if not host: host = get_service_host(ServiceNameEnum.QOSPROFILE) + if not port: port = get_service_port_grpc(ServiceNameEnum.QOSPROFILE) + self.endpoint = '{:s}:{:s}'.format(str(host), str(port)) + LOGGER.debug('Creating channel to {:s}...'.format(str(self.endpoint))) + self.channel = None + self.stub = None + self.connect() + LOGGER.debug('Channel created') + + def connect(self): + self.channel = grpc.insecure_channel(self.endpoint) + self.stub = QoSProfileServiceStub(self.channel) + + def close(self): + if self.channel is not None: self.channel.close() + self.channel = None + self.stub = None + + @RETRY_DECORATOR + def CreateQoSProfile(self, request: QoSProfile) -> QoSProfile: + LOGGER.debug('CreateQoSProfile request: {:s}'.format(grpc_message_to_json_string(request))) + response = self.stub.CreateQoSProfile(request) + LOGGER.debug('CreateQoSProfile result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + @RETRY_DECORATOR + def UpdateQoSProfile(self, request: QoSProfile) -> QoSProfile: + LOGGER.debug('UpdateQoSProfile request: {:s}'.format(grpc_message_to_json_string(request))) + response = self.stub.UpdateQoSProfile(request) + LOGGER.debug('UpdateQoSProfile result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + @RETRY_DECORATOR + def DeleteQoSProfile(self, request: QoSProfileId) -> Empty: + LOGGER.debug('DeleteQoSProfile request: {:s}'.format(grpc_message_to_json_string(request))) + response = self.stub.DeleteQoSProfile(request) + LOGGER.debug('DeleteQoSProfile result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + @RETRY_DECORATOR + def GetQoSProfile(self, request: QoSProfileId) -> QoSProfile: + LOGGER.debug('GetQoSProfile request: {:s}'.format(grpc_message_to_json_string(request))) + response = self.stub.GetQoSProfile(request) + LOGGER.debug('GetQoSProfile result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + @RETRY_DECORATOR + def GetQoSProfiles(self, request: Empty) -> Iterator[QoSProfile]: + LOGGER.debug('GetQoSProfiles request: {:s}'.format(grpc_message_to_json_string(request))) + response = self.stub.GetQoSProfiles(request) + LOGGER.debug('GetQoSProfiles result: {:s}'.format(grpc_message_to_json_string(response))) + return response + + @RETRY_DECORATOR + def GetConstraintListFromQoSProfile(self, request: QoDConstraintsRequest) -> Iterator[Constraint]: + LOGGER.debug('GetConstraintListFromQoSProfile request: {:s}'.format(grpc_message_to_json_string(request))) + response = self.stub.GetConstraintListFromQoSProfile(request) + LOGGER.debug('GetConstraintListFromQoSProfile result: {:s}'.format(grpc_message_to_json_string(response))) + return response diff --git a/src/qos_profile/client/__init__.py b/src/qos_profile/client/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 --- /dev/null +++ b/src/qos_profile/client/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/src/qos_profile/requirements.in b/src/qos_profile/requirements.in new file mode 100644 index 0000000000000000000000000000000000000000..3e98fef362277dbf60019902e115d1c733bea9e7 --- /dev/null +++ b/src/qos_profile/requirements.in @@ -0,0 +1,18 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +psycopg2-binary==2.9.* +SQLAlchemy==1.4.* +sqlalchemy-cockroachdb==1.4.* +SQLAlchemy-Utils==0.38.* diff --git a/src/qos_profile/service/QoSProfileService.py b/src/qos_profile/service/QoSProfileService.py new file mode 100644 index 0000000000000000000000000000000000000000..ce5c5591b498787240c5390bbe5575822bc9da91 --- /dev/null +++ b/src/qos_profile/service/QoSProfileService.py @@ -0,0 +1,29 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import sqlalchemy +from common.Constants import ServiceNameEnum +from common.Settings import get_service_port_grpc +from common.proto.qos_profile_pb2_grpc import add_QoSProfileServiceServicer_to_server +from common.tools.service.GenericGrpcService import GenericGrpcService +from .QoSProfileServiceServicerImpl import QoSProfileServiceServicerImpl + +class QoSProfileService(GenericGrpcService): + def __init__(self, db_engine: sqlalchemy.engine.Engine, cls_name: str = __name__) -> None: + port = get_service_port_grpc(ServiceNameEnum.QOSPROFILE) + super().__init__(port, cls_name=cls_name) + self.qos_profile_servicer = QoSProfileServiceServicerImpl(db_engine) + + def install_servicers(self): + add_QoSProfileServiceServicer_to_server(self.qos_profile_servicer, self.server) diff --git a/src/qos_profile/service/QoSProfileServiceServicerImpl.py b/src/qos_profile/service/QoSProfileServiceServicerImpl.py new file mode 100644 index 0000000000000000000000000000000000000000..e705b35ae1e1bf8f2398ba95601c5a4723ba39a1 --- /dev/null +++ b/src/qos_profile/service/QoSProfileServiceServicerImpl.py @@ -0,0 +1,96 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import grpc, logging, sqlalchemy +from typing import Iterator + +import grpc._channel +from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method +from common.proto.context_pb2 import Constraint, ConstraintActionEnum, Constraint_QoSProfile, Constraint_Schedule, Empty, QoSProfileId +from common.proto.qos_profile_pb2 import QoSProfile, QoDConstraintsRequest +from common.proto.qos_profile_pb2_grpc import QoSProfileServiceServicer +from .database.QoSProfile import set_qos_profile, delete_qos_profile, get_qos_profile, get_qos_profiles + + +LOGGER = logging.getLogger(__name__) + +METRICS_POOL = MetricsPool('QoSProfile', 'RPC') + +class QoSProfileServiceServicerImpl(QoSProfileServiceServicer): + def __init__(self, db_engine: sqlalchemy.engine.Engine) -> None: + LOGGER.debug('Servicer Created') + self.db_engine = db_engine + + def _get_metrics(self) -> MetricsPool: return METRICS_POOL + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def CreateQoSProfile(self, request: QoSProfile, context: grpc.ServicerContext) -> QoSProfile: + qos_profile = get_qos_profile(self.db_engine, request.qos_profile_id.qos_profile_id.uuid) + if qos_profile is not None: + context.set_details(f'QoSProfile {request.qos_profile_id.qos_profile_id.uuid} already exists') + context.set_code(grpc.StatusCode.ALREADY_EXISTS) + return QoSProfile() + return set_qos_profile(self.db_engine, request) + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def UpdateQoSProfile(self, request: QoSProfile, context: grpc.ServicerContext) -> QoSProfile: + qos_profile = get_qos_profile(self.db_engine, request.qos_profile_id.qos_profile_id.uuid) + if qos_profile is None: + context.set_details(f'QoSProfile {request.qos_profile_id.qos_profile_id.uuid} not found') + context.set_code(grpc.StatusCode.NOT_FOUND) + return QoSProfile() + return set_qos_profile(self.db_engine, request) + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def DeleteQoSProfile(self, request: QoSProfileId, context: grpc.ServicerContext) -> Empty: + qos_profile = get_qos_profile(self.db_engine, request.qos_profile_id.uuid) + if qos_profile is None: + context.set_details(f'QoSProfile {request.qos_profile_id.uuid} not found') + context.set_code(grpc.StatusCode.NOT_FOUND) + return QoSProfile() + return delete_qos_profile(self.db_engine, request.qos_profile_id.uuid) + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def GetQoSProfile(self, request: QoSProfileId, context: grpc.ServicerContext) -> QoSProfile: + qos_profile = get_qos_profile(self.db_engine, request.qos_profile_id.uuid) + if qos_profile is None: + context.set_details(f'QoSProfile {request.qos_profile_id.uuid} not found') + context.set_code(grpc.StatusCode.NOT_FOUND) + return QoSProfile() + return qos_profile + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def GetQoSProfiles(self, request: Empty, context: grpc.ServicerContext) -> Iterator[QoSProfile]: + yield from get_qos_profiles(self.db_engine, request) + + + @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) + def GetConstraintListFromQoSProfile(self, request: QoDConstraintsRequest, context: grpc.ServicerContext) -> Iterator[Constraint]: + qos_profile = get_qos_profile(self.db_engine, request.qos_profile_id.qos_profile_id.uuid) + if qos_profile is None: + context.set_details(f'QoSProfile {request.qos_profile_id.qos_profile_id.uuid} not found') + context.set_code(grpc.StatusCode.NOT_FOUND) + yield Constraint() + + qos_profile_constraint = Constraint_QoSProfile() + qos_profile_constraint.qos_profile_name = qos_profile.name + qos_profile_constraint.qos_profile_id.CopyFrom(qos_profile.qos_profile_id) + constraint_qos = Constraint() + constraint_qos.action = ConstraintActionEnum.CONSTRAINTACTION_SET + constraint_qos.qos_profile.CopyFrom(qos_profile_constraint) + yield constraint_qos + constraint_schedule = Constraint() + constraint_schedule.action = ConstraintActionEnum.CONSTRAINTACTION_SET + constraint_schedule.schedule.CopyFrom(Constraint_Schedule(start_timestamp=request.start_timestamp, duration_days=request.duration/86400)) + yield constraint_schedule diff --git a/src/qos_profile/service/__init__.py b/src/qos_profile/service/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 --- /dev/null +++ b/src/qos_profile/service/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/src/qos_profile/service/__main__.py b/src/qos_profile/service/__main__.py new file mode 100644 index 0000000000000000000000000000000000000000..7f9e6de92b3ddf24e46a53f478bf90046e32d523 --- /dev/null +++ b/src/qos_profile/service/__main__.py @@ -0,0 +1,66 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging, signal, sys, threading +from prometheus_client import start_http_server +from common.Settings import get_log_level, get_metrics_port +from common.tools.database.GenericDatabase import Database +from .QoSProfileService import QoSProfileService +from .database.models.QoSProfile import QoSProfileModel + +LOG_LEVEL = get_log_level() +logging.basicConfig(level=LOG_LEVEL, format="[%(asctime)s] %(levelname)s:%(name)s:%(message)s") +LOGGER = logging.getLogger(__name__) + + +terminate = threading.Event() + +def signal_handler(signal, frame): # pylint: disable=redefined-outer-name,unused-argument + LOGGER.warning('Terminate signal received') + terminate.set() + +def main(): + LOGGER.info('Starting...') + signal.signal(signal.SIGINT, signal_handler) + signal.signal(signal.SIGTERM, signal_handler) + + # Start metrics server + metrics_port = get_metrics_port() + start_http_server(metrics_port) + + # Get Database Engine instance and initialize database, if needed + db_manager = Database(QoSProfileModel) + + try: + db_manager.create_database() + db_manager.create_tables() + except Exception as e: # pylint: disable=bare-except # pragma: no cover + LOGGER.exception('Failed to check/create the database: {:s}'.format(str(db_manager.db_engine.url))) + raise e + + # Starting service + grpc_service = QoSProfileService(db_manager.db_engine) + grpc_service.start() + + # Wait for Ctrl+C or termination signal + while not terminate.wait(timeout=1.0): pass + + LOGGER.info('Terminating...') + grpc_service.stop() + + LOGGER.info('Bye') + return 0 + +if __name__ == '__main__': + sys.exit(main()) diff --git a/src/telemetry/database/TelemetryEngine.py b/src/qos_profile/service/database/Engine.py similarity index 64% rename from src/telemetry/database/TelemetryEngine.py rename to src/qos_profile/service/database/Engine.py index 7c8620faf25e695e7f971bce78be9ad208a7701b..6ba1a82d0b5790deded242ecde682020a0c785f8 100644 --- a/src/telemetry/database/TelemetryEngine.py +++ b/src/qos_profile/service/database/Engine.py @@ -12,29 +12,44 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging, sqlalchemy +import logging, sqlalchemy, sqlalchemy_utils from common.Settings import get_setting LOGGER = logging.getLogger(__name__) -CRDB_URI_TEMPLATE = 'cockroachdb://{:s}:{:s}@cockroachdb-public.{:s}.svc.cluster.local:{:s}/{:s}?sslmode={:s}' -class TelemetryEngine: +APP_NAME = 'tfs' +ECHO = False # true: dump SQL commands and transactions executed +CRDB_URI_TEMPLATE = 'cockroachdb://{:s}:{:s}@qos-profileservice.{:s}.svc.cluster.local:{:s}/{:s}?sslmode={:s}' + +class Engine: @staticmethod def get_engine() -> sqlalchemy.engine.Engine: crdb_uri = get_setting('CRDB_URI', default=None) if crdb_uri is None: CRDB_NAMESPACE = get_setting('CRDB_NAMESPACE') CRDB_SQL_PORT = get_setting('CRDB_SQL_PORT') - CRDB_DATABASE = "tfs-telemetry" # TODO: define variable get_setting('CRDB_DATABASE_KPI_MGMT') + CRDB_DATABASE = get_setting('CRDB_DATABASE') CRDB_USERNAME = get_setting('CRDB_USERNAME') CRDB_PASSWORD = get_setting('CRDB_PASSWORD') CRDB_SSLMODE = get_setting('CRDB_SSLMODE') crdb_uri = CRDB_URI_TEMPLATE.format( CRDB_USERNAME, CRDB_PASSWORD, CRDB_NAMESPACE, CRDB_SQL_PORT, CRDB_DATABASE, CRDB_SSLMODE) + try: - engine = sqlalchemy.create_engine(crdb_uri, echo=False) - LOGGER.info(' TelemetryDB initalized with DB URL: {:}'.format(crdb_uri)) + engine = sqlalchemy.create_engine( + crdb_uri, connect_args={'application_name': APP_NAME}, echo=ECHO, future=True) except: # pylint: disable=bare-except # pragma: no cover LOGGER.exception('Failed to connect to database: {:s}'.format(str(crdb_uri))) - return None # type: ignore + return None + return engine + + @staticmethod + def create_database(engine : sqlalchemy.engine.Engine) -> None: + if not sqlalchemy_utils.database_exists(engine.url): + sqlalchemy_utils.create_database(engine.url) + + @staticmethod + def drop_database(engine : sqlalchemy.engine.Engine) -> None: + if sqlalchemy_utils.database_exists(engine.url): + sqlalchemy_utils.drop_database(engine.url) diff --git a/src/qos_profile/service/database/QoSProfile.py b/src/qos_profile/service/database/QoSProfile.py new file mode 100644 index 0000000000000000000000000000000000000000..86823c16586bb15db4cfd846c97d141095aa6944 --- /dev/null +++ b/src/qos_profile/service/database/QoSProfile.py @@ -0,0 +1,116 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging +from sqlalchemy.dialects.postgresql import insert +from sqlalchemy.engine import Engine +from sqlalchemy.orm import Session, sessionmaker +from sqlalchemy_cockroachdb import run_transaction +from typing import List, Optional + +from common.proto.context_pb2 import Empty, Uuid, QoSProfileId +from common.proto.qos_profile_pb2 import QoSProfileValueUnitPair, QoSProfile +from common.tools.grpc.Tools import grpc_message_to_json +from .models.QoSProfile import QoSProfileModel + +LOGGER = logging.getLogger(__name__) + +def grpc_message_to_qos_table_data(message: QoSProfile) -> dict: + return { + 'qos_profile_id' : message.qos_profile_id.qos_profile_id.uuid, + 'name' : message.name, + 'description' : message.description, + 'status' : message.status, + 'targetMinUpstreamRate' : grpc_message_to_json(message.targetMinUpstreamRate), + 'maxUpstreamRate' : grpc_message_to_json(message.maxUpstreamRate), + 'maxUpstreamBurstRate' : grpc_message_to_json(message.maxUpstreamBurstRate), + 'targetMinDownstreamRate' : grpc_message_to_json(message.targetMinDownstreamRate), + 'maxDownstreamRate' : grpc_message_to_json(message.maxDownstreamRate), + 'maxDownstreamBurstRate' : grpc_message_to_json(message.maxDownstreamBurstRate), + 'minDuration' : grpc_message_to_json(message.minDuration), + 'maxDuration' : grpc_message_to_json(message.maxDuration), + 'priority' : message.priority, + 'packetDelayBudget' : grpc_message_to_json(message.packetDelayBudget), + 'jitter' : grpc_message_to_json(message.jitter), + 'packetErrorLossRate' : message.packetErrorLossRate, + } + +def qos_table_data_to_grpc_message(data: QoSProfileModel) -> QoSProfile: + return QoSProfile( + qos_profile_id = QoSProfileId(qos_profile_id=Uuid(uuid=data.qos_profile_id)), + name = data.name, + description = data.description, + status = data.status, + targetMinUpstreamRate = QoSProfileValueUnitPair(**data.targetMinUpstreamRate), + maxUpstreamRate = QoSProfileValueUnitPair(**data.maxUpstreamRate), + maxUpstreamBurstRate = QoSProfileValueUnitPair(**data.maxUpstreamBurstRate), + targetMinDownstreamRate = QoSProfileValueUnitPair(**data.targetMinDownstreamRate), + maxDownstreamRate = QoSProfileValueUnitPair(**data.maxDownstreamRate), + maxDownstreamBurstRate = QoSProfileValueUnitPair(**data.maxDownstreamBurstRate), + minDuration = QoSProfileValueUnitPair(**data.minDuration), + maxDuration = QoSProfileValueUnitPair(**data.maxDuration), + priority = data.priority, + packetDelayBudget = QoSProfileValueUnitPair(**data.packetDelayBudget), + jitter = QoSProfileValueUnitPair(**data.jitter), + packetErrorLossRate = data.packetErrorLossRate + ) + +def set_qos_profile(db_engine : Engine, request : QoSProfile) -> QoSProfile: + qos_profile_data = grpc_message_to_qos_table_data(request) + def callback(session : Session) -> bool: + stmt = insert(QoSProfileModel).values([qos_profile_data]) + stmt = stmt.on_conflict_do_update(index_elements=[QoSProfileModel.qos_profile_id], + set_=dict( + + name = stmt.excluded.name, + description = stmt.excluded.description, + status = stmt.excluded.status, + targetMinUpstreamRate = stmt.excluded.targetMinUpstreamRate, + maxUpstreamRate = stmt.excluded.maxUpstreamRate, + maxUpstreamBurstRate = stmt.excluded.maxUpstreamBurstRate, + targetMinDownstreamRate = stmt.excluded.targetMinDownstreamRate, + maxDownstreamRate = stmt.excluded.maxDownstreamRate, + maxDownstreamBurstRate = stmt.excluded.maxDownstreamBurstRate, + minDuration = stmt.excluded.minDuration, + maxDuration = stmt.excluded.maxDuration, + priority = stmt.excluded.priority, + packetDelayBudget = stmt.excluded.packetDelayBudget, + jitter = stmt.excluded.jitter, + packetErrorLossRate = stmt.excluded.packetErrorLossRate, + ) + ) + stmt = stmt.returning(QoSProfileModel) + qos_profile = session.execute(stmt).fetchall() + return qos_profile[0] + qos_profile_row = run_transaction(sessionmaker(bind=db_engine), callback) + return qos_table_data_to_grpc_message(qos_profile_row) + +def delete_qos_profile(db_engine : Engine, request : str) -> Empty: + def callback(session : Session) -> bool: + num_deleted = session.query(QoSProfileModel).filter_by(qos_profile_id=request).delete() + return num_deleted > 0 + deleted = run_transaction(sessionmaker(bind=db_engine), callback) + return Empty() + +def get_qos_profile(db_engine : Engine, request : str) -> Optional[QoSProfile]: + def callback(session : Session) -> Optional[QoSProfile]: + obj : Optional[QoSProfileModel] = session.query(QoSProfileModel).filter_by(qos_profile_id=request).one_or_none() + return None if obj is None else qos_table_data_to_grpc_message(obj) + return run_transaction(sessionmaker(bind=db_engine), callback) + +def get_qos_profiles(db_engine : Engine, request : Empty) -> List[QoSProfile]: + def callback(session : Session) -> List[QoSProfile]: + obj_list : List[QoSProfileModel] = session.query(QoSProfileModel).all() + return [qos_table_data_to_grpc_message(obj) for obj in obj_list] + return run_transaction(sessionmaker(bind=db_engine), callback) diff --git a/src/qos_profile/service/database/__init__.py b/src/qos_profile/service/database/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 --- /dev/null +++ b/src/qos_profile/service/database/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/src/qos_profile/service/database/models/QoSProfile.py b/src/qos_profile/service/database/models/QoSProfile.py new file mode 100644 index 0000000000000000000000000000000000000000..bfbdeef0a35490b1a62b80bddb098fd2bf90c2e4 --- /dev/null +++ b/src/qos_profile/service/database/models/QoSProfile.py @@ -0,0 +1,38 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from sqlalchemy import Column, Integer, String, JSON +from sqlalchemy.dialects.postgresql import UUID +from ._Base import _Base + + +class QoSProfileModel(_Base): + __tablename__ = 'qos_profile' + + qos_profile_id = Column(UUID(as_uuid=False), primary_key=True) + name = Column(String, nullable=False) + description = Column(String, nullable=False) + status = Column(String, nullable=False) + targetMinUpstreamRate = Column(JSON, nullable=False) + maxUpstreamRate = Column(JSON, nullable=False) + maxUpstreamBurstRate = Column(JSON, nullable=False) + targetMinDownstreamRate = Column(JSON, nullable=False) + maxDownstreamRate = Column(JSON, nullable=False) + maxDownstreamBurstRate = Column(JSON, nullable=False) + minDuration = Column(JSON, nullable=False) + maxDuration = Column(JSON, nullable=False) + priority = Column(Integer, nullable=False) + packetDelayBudget = Column(JSON, nullable=False) + jitter = Column(JSON, nullable=False) + packetErrorLossRate = Column(Integer, nullable=False) diff --git a/src/qos_profile/service/database/models/_Base.py b/src/qos_profile/service/database/models/_Base.py new file mode 100644 index 0000000000000000000000000000000000000000..d94dad3cdfc4dad473cc12eb00d502b05595b8f4 --- /dev/null +++ b/src/qos_profile/service/database/models/_Base.py @@ -0,0 +1,22 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import sqlalchemy +from sqlalchemy.orm import declarative_base + +_Base = declarative_base() + +def rebuild_database(db_engine : sqlalchemy.engine.Engine, drop_if_exists : bool = False): + if drop_if_exists: _Base.metadata.drop_all(db_engine) + _Base.metadata.create_all(db_engine) diff --git a/src/qos_profile/service/database/models/__init__.py b/src/qos_profile/service/database/models/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bbfc943b68af13a11e562abbc8680ade71db8f02 --- /dev/null +++ b/src/qos_profile/service/database/models/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/src/qos_profile/tests/.gitignore b/src/qos_profile/tests/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..6b97d6fe3ad32f39097745229ab7f547f26ecb12 --- /dev/null +++ b/src/qos_profile/tests/.gitignore @@ -0,0 +1 @@ +# Add here your files containing confidential testbed details such as IP addresses, ports, usernames, passwords, etc. diff --git a/src/qos_profile/tests/__init__.py b/src/qos_profile/tests/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 --- /dev/null +++ b/src/qos_profile/tests/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/src/qos_profile/tests/conftest.py b/src/qos_profile/tests/conftest.py new file mode 100644 index 0000000000000000000000000000000000000000..6e8d42b336accef155967ab8d736272f17efcbdc --- /dev/null +++ b/src/qos_profile/tests/conftest.py @@ -0,0 +1,95 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import os, pytest, sqlalchemy +from _pytest.config import Config +from _pytest.terminal import TerminalReporter +from common.Constants import ServiceNameEnum +from common.Settings import ( + ENVVAR_SUFIX_SERVICE_HOST, ENVVAR_SUFIX_SERVICE_PORT_GRPC, + get_env_var_name, get_service_port_grpc +) +from common.proto.context_pb2 import Uuid, QoSProfileId +from common.proto.qos_profile_pb2 import QoSProfileValueUnitPair, QoSProfile +from common.method_wrappers.Decorator import MetricsPool +from qos_profile.client.QoSProfileClient import QoSProfileClient +from qos_profile.service.QoSProfileService import QoSProfileService +from qos_profile.service.database.Engine import Engine +from qos_profile.service.database.models._Base import rebuild_database + +LOCAL_HOST = '127.0.0.1' +GRPC_PORT = 10000 + int(get_service_port_grpc(ServiceNameEnum.QOSPROFILE)) # avoid privileged ports + +os.environ[get_env_var_name(ServiceNameEnum.QOSPROFILE, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST) +os.environ[get_env_var_name(ServiceNameEnum.QOSPROFILE, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(GRPC_PORT) + +@pytest.fixture(scope='session') +def qosprofile_db(request) -> sqlalchemy.engine.Engine: # pylint: disable=unused-argument + _db_engine = Engine.get_engine() + Engine.drop_database(_db_engine) + Engine.create_database(_db_engine) + rebuild_database(_db_engine) + yield _db_engine + +RAW_METRICS : MetricsPool = None + +@pytest.fixture(scope='session') +def qosprofile_service( + qosprofile_db : sqlalchemy.engine.Engine # pylint: disable=redefined-outer-name +): + global RAW_METRICS # pylint: disable=global-statement + _service = QoSProfileService(qosprofile_db) + RAW_METRICS = _service.qos_profile_servicer._get_metrics() + _service.start() + yield _service + _service.stop() + +@pytest.fixture(scope='session') +def qos_profile_client(qosprofile_service : QoSProfileService): # pylint: disable=redefined-outer-name,unused-argument + _client = QoSProfileClient() + yield _client + _client.close() + +@pytest.hookimpl(hookwrapper=True) +def pytest_terminal_summary( + terminalreporter : TerminalReporter, exitstatus : int, config : Config # pylint: disable=unused-argument +): + yield + + if RAW_METRICS is not None: + print('') + print('Performance Results:') + print(RAW_METRICS.get_pretty_table().get_string()) + +def create_qos_profile_from_json(qos_profile_data: dict) -> QoSProfile: + def create_QoSProfileValueUnitPair(data) -> QoSProfileValueUnitPair: + return QoSProfileValueUnitPair(value=data['value'], unit=data['unit']) + qos_profile = QoSProfile() + qos_profile.qos_profile_id.CopyFrom(QoSProfileId(qos_profile_id=Uuid(uuid=qos_profile_data['qos_profile_id']))) + qos_profile.name = qos_profile_data['name'] + qos_profile.description = qos_profile_data['description'] + qos_profile.status = qos_profile_data['status'] + qos_profile.targetMinUpstreamRate.CopyFrom(create_QoSProfileValueUnitPair(qos_profile_data['targetMinUpstreamRate'])) + qos_profile.maxUpstreamRate.CopyFrom(create_QoSProfileValueUnitPair(qos_profile_data['maxUpstreamRate'])) + qos_profile.maxUpstreamBurstRate.CopyFrom(create_QoSProfileValueUnitPair(qos_profile_data['maxUpstreamBurstRate'])) + qos_profile.targetMinDownstreamRate.CopyFrom(create_QoSProfileValueUnitPair(qos_profile_data['targetMinDownstreamRate'])) + qos_profile.maxDownstreamRate.CopyFrom(create_QoSProfileValueUnitPair(qos_profile_data['maxDownstreamRate'])) + qos_profile.maxDownstreamBurstRate.CopyFrom(create_QoSProfileValueUnitPair(qos_profile_data['maxDownstreamBurstRate'])) + qos_profile.minDuration.CopyFrom(create_QoSProfileValueUnitPair(qos_profile_data['minDuration'])) + qos_profile.maxDuration.CopyFrom(create_QoSProfileValueUnitPair(qos_profile_data['maxDuration'])) + qos_profile.priority = qos_profile_data['priority'] + qos_profile.packetDelayBudget.CopyFrom(create_QoSProfileValueUnitPair(qos_profile_data['packetDelayBudget'])) + qos_profile.jitter.CopyFrom(create_QoSProfileValueUnitPair(qos_profile_data['jitter'])) + qos_profile.packetErrorLossRate = qos_profile_data['packetErrorLossRate'] + return qos_profile diff --git a/src/qos_profile/tests/test_constraints.py b/src/qos_profile/tests/test_constraints.py new file mode 100644 index 0000000000000000000000000000000000000000..78fe73d64c11502c6468134f937003d2700e5b71 --- /dev/null +++ b/src/qos_profile/tests/test_constraints.py @@ -0,0 +1,94 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import logging +from google.protobuf.json_format import MessageToDict + +from common.proto.qos_profile_pb2 import QoDConstraintsRequest +from common.tools.grpc.Tools import grpc_message_to_json_string +from qos_profile.client.QoSProfileClient import QoSProfileClient + +from .conftest import create_qos_profile_from_json + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +qos_profile_data = { + "qos_profile_id": "0afc905f-f1f0-4ae2-9925-9df17140b8bf", + "name": "QCI_2_voice", + "description": "QoS profile for game streaming", + "status": "ACTIVE", + "targetMinUpstreamRate": { + "value": 5, + "unit": "bps" + }, + "maxUpstreamRate": { + "value": 5, + "unit": "bps" + }, + "maxUpstreamBurstRate": { + "value": 5, + "unit": "bps" + }, + "targetMinDownstreamRate": { + "value": 5, + "unit": "bps" + }, + "maxDownstreamRate": { + "value": 5, + "unit": "bps" + }, + "maxDownstreamBurstRate": { + "value": 5, + "unit": "bps" + }, + "minDuration": { + "value": 5, + "unit": "Minutes" + }, + "maxDuration": { + "value": 6, + "unit": "Minutes" + }, + "priority": 5, + "packetDelayBudget": { + "value": 5, + "unit": "Minutes" + }, + "jitter": { + "value": 5, + "unit": "Minutes" + }, + "packetErrorLossRate": 3 +} + + +def test_get_constraints(qos_profile_client: QoSProfileClient): + qos_profile = create_qos_profile_from_json(qos_profile_data) + qos_profile_created = qos_profile_client.CreateQoSProfile(qos_profile) + LOGGER.info('qos_profile_data = {:s}'.format(grpc_message_to_json_string(qos_profile_created))) + constraints = list(qos_profile_client.GetConstraintListFromQoSProfile(QoDConstraintsRequest( + qos_profile_id=qos_profile.qos_profile_id, start_timestamp=1726063284.25332, duration=86400) + )) + constraint_1 = constraints[0] + constraint_2 = constraints[1] + assert len(constraints) == 2 + assert constraint_1.WhichOneof('constraint') == 'qos_profile' + assert constraint_1.qos_profile.qos_profile_id == qos_profile.qos_profile_id + assert constraint_1.qos_profile.qos_profile_name == 'QCI_2_voice' + assert constraint_2.WhichOneof('constraint') == 'schedule' + assert constraint_2.schedule.start_timestamp == 1726063284.25332 + assert constraint_2.schedule.duration_days == 1 + + qos_profile_client.DeleteQoSProfile(qos_profile.qos_profile_id) diff --git a/src/qos_profile/tests/test_crud.py b/src/qos_profile/tests/test_crud.py new file mode 100644 index 0000000000000000000000000000000000000000..9b92646c3341d2801e3b04741430075b4956a263 --- /dev/null +++ b/src/qos_profile/tests/test_crud.py @@ -0,0 +1,117 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from grpc import RpcError, StatusCode +import logging, pytest +from .conftest import create_qos_profile_from_json +from common.proto.context_pb2 import Empty, Uuid, QoSProfileId +from common.tools.grpc.Tools import grpc_message_to_json_string +from qos_profile.client.QoSProfileClient import QoSProfileClient + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +qos_profile_data = { + "qos_profile_id": "f00406f5-8e36-4abc-a0ec-b871c7f062b7", + "name": "QCI_1_voice", + "description": "QoS profile for video streaming", + "status": "ACTIVE", + "targetMinUpstreamRate": { + "value": 10, + "unit": "bps" + }, + "maxUpstreamRate": { + "value": 10, + "unit": "bps" + }, + "maxUpstreamBurstRate": { + "value": 10, + "unit": "bps" + }, + "targetMinDownstreamRate": { + "value": 10, + "unit": "bps" + }, + "maxDownstreamRate": { + "value": 10, + "unit": "bps" + }, + "maxDownstreamBurstRate": { + "value": 10, + "unit": "bps" + }, + "minDuration": { + "value": 12, + "unit": "Minutes" + }, + "maxDuration": { + "value": 12, + "unit": "Minutes" + }, + "priority": 20, + "packetDelayBudget": { + "value": 12, + "unit": "Minutes" + }, + "jitter": { + "value": 12, + "unit": "Minutes" + }, + "packetErrorLossRate": 3 +} + +def test_create_qos_profile(qos_profile_client: QoSProfileClient): + qos_profile = create_qos_profile_from_json(qos_profile_data) + qos_profile_created = qos_profile_client.CreateQoSProfile(qos_profile) + LOGGER.info('qos_profile_data = {:s}'.format(grpc_message_to_json_string(qos_profile_created))) + assert qos_profile == qos_profile_created + + +def test_failed_create_qos_profile(qos_profile_client: QoSProfileClient): + qos_profile = create_qos_profile_from_json(qos_profile_data) + with pytest.raises(RpcError) as exc: + qos_profile_created = qos_profile_client.CreateQoSProfile(qos_profile) + assert exc.value.code() == StatusCode.ALREADY_EXISTS + +def test_get_qos_profile(qos_profile_client: QoSProfileClient): + qos_profile = create_qos_profile_from_json(qos_profile_data) + qos_profile_got = qos_profile_client.GetQoSProfile(qos_profile.qos_profile_id) + LOGGER.info('qos_profile_data = {:s}'.format(grpc_message_to_json_string(qos_profile_got))) + assert qos_profile == qos_profile_got + +def test_get_qos_profiles(qos_profile_client: QoSProfileClient): + qos_profile = create_qos_profile_from_json(qos_profile_data) + qos_profiles_got = list(qos_profile_client.GetQoSProfiles(Empty())) + the_qos_profile = [q for q in qos_profiles_got if q.qos_profile_id == qos_profile.qos_profile_id] + LOGGER.info('qos_profile_data = {:s}'.format(grpc_message_to_json_string(qos_profiles_got))) + assert len(the_qos_profile) == 1 + assert qos_profile == the_qos_profile[0] + +def test_update_qos_profile(qos_profile_client: QoSProfileClient): + qos_profile = create_qos_profile_from_json(qos_profile_data) + qos_profile.packetErrorLossRate = 5 + qos_profile_updated = qos_profile_client.UpdateQoSProfile(qos_profile) + LOGGER.info('qos_profile_data = {:s}'.format(grpc_message_to_json_string(qos_profile_updated))) + assert qos_profile_updated.packetErrorLossRate == 5 + +def test_failed_delete_qos_profiles(qos_profile_client: QoSProfileClient): + qos_profile = create_qos_profile_from_json(qos_profile_data) + with pytest.raises(RpcError) as exc: + qos_profiles_deleted = qos_profile_client.DeleteQoSProfile(QoSProfileId(qos_profile_id=Uuid(uuid='f8b1c625-ac01-405c-b1f7-b5ee06e16282'))) + assert exc.value.code() == StatusCode.NOT_FOUND + +def test_delete_qos_profiles(qos_profile_client: QoSProfileClient): + qos_profile = create_qos_profile_from_json(qos_profile_data) + qos_profiles_deleted = qos_profile_client.DeleteQoSProfile(qos_profile.qos_profile_id) + assert qos_profiles_deleted == Empty() diff --git a/src/service/Dockerfile b/src/service/Dockerfile index a847ae762d1303dda852d7f3d8200d3db3ef53f7..6f23f0a89387e2db3802ee20e003ccb6482844ff 100644 --- a/src/service/Dockerfile +++ b/src/service/Dockerfile @@ -70,6 +70,8 @@ COPY src/pathcomp/frontend/__init__.py pathcomp/frontend/__init__.py COPY src/pathcomp/frontend/client/. pathcomp/frontend/client/ COPY src/e2e_orchestrator/__init__.py e2e_orchestrator/__init__.py COPY src/e2e_orchestrator/client/. e2e_orchestrator/client/ +COPY src/qkd_app/__init__.py qkd_app/__init__.py +COPY src/qkd_app/client/. qkd_app/client/ COPY src/service/. service/ # Start the service diff --git a/src/service/service/ServiceServiceServicerImpl.py b/src/service/service/ServiceServiceServicerImpl.py index eb821972a6447a85990261586e656f2f365dda0d..45a8e0b6c0fd9a26b45fc47d55074d8863c0caed 100644 --- a/src/service/service/ServiceServiceServicerImpl.py +++ b/src/service/service/ServiceServiceServicerImpl.py @@ -30,6 +30,9 @@ from common.tools.grpc.Tools import grpc_message_to_json, grpc_message_to_json_s from common.tools.object_factory.Context import json_context_id from common.tools.object_factory.Topology import json_topology_id from common.Constants import DEFAULT_CONTEXT_NAME, DEFAULT_TOPOLOGY_NAME +from common.Settings import ( + is_deployed_e2e_orch, is_deployed_optical, is_deployed_te +) from context.client.ContextClient import ContextClient from e2e_orchestrator.client.E2EOrchestratorClient import E2EOrchestratorClient from pathcomp.frontend.client.PathCompClient import PathCompClient @@ -142,7 +145,7 @@ class ServiceServiceServicerImpl(ServiceServiceServicer): service.service_type = request.service_type # pylint: disable=no-member service.service_status.service_status = ServiceStatusEnum.SERVICESTATUS_PLANNED # pylint: disable=no-member - if service.service_type == ServiceTypeEnum.SERVICETYPE_TE: + if is_deployed_te() and service.service_type == ServiceTypeEnum.SERVICETYPE_TE: # TE service: context_client.SetService(request) @@ -164,7 +167,7 @@ class ServiceServiceServicerImpl(ServiceServiceServicer): str_service_status = ServiceStatusEnum.Name(service_status.service_status) raise Exception(MSG.format(service_key, str_service_status)) - if service.service_type == ServiceTypeEnum.SERVICETYPE_E2E: + if is_deployed_e2e_orch() and service.service_type == ServiceTypeEnum.SERVICETYPE_E2E: # End-to-End service: service_id_with_uuids = context_client.SetService(request) @@ -248,7 +251,7 @@ class ServiceServiceServicerImpl(ServiceServiceServicer): tasks_scheduler = TasksScheduler(self.service_handler_factory) - if service.service_type == ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY: + if is_deployed_optical() and service.service_type == ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY: context_id_x = json_context_id(DEFAULT_CONTEXT_NAME) topology_id_x = json_topology_id( DEFAULT_TOPOLOGY_NAME, context_id_x) @@ -341,14 +344,14 @@ class ServiceServiceServicerImpl(ServiceServiceServicer): service.service_status.service_status = ServiceStatusEnum.SERVICESTATUS_PENDING_REMOVAL context_client.SetService(service) - if service.service_type == ServiceTypeEnum.SERVICETYPE_TE: + if is_deployed_te() and service.service_type == ServiceTypeEnum.SERVICETYPE_TE: # TE service te_service_client = TEServiceClient() te_service_client.DeleteLSP(request) context_client.RemoveService(request) return Empty() - if service.service_type == ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY: + if is_deployed_optical() and service.service_type == ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY: devs = [] context_id_x = json_context_id(DEFAULT_CONTEXT_NAME) diff --git a/src/service/service/service_handler_api/FilterFields.py b/src/service/service/service_handler_api/FilterFields.py index ca70fa9386e356e7e49397365701013e1d3a1697..494e59e3c6698c6ae052e1f4b35b7a56e8dc3fba 100644 --- a/src/service/service/service_handler_api/FilterFields.py +++ b/src/service/service/service_handler_api/FilterFields.py @@ -26,7 +26,8 @@ SERVICE_TYPE_VALUES = { ServiceTypeEnum.SERVICETYPE_TAPI_CONNECTIVITY_SERVICE, ServiceTypeEnum.SERVICETYPE_TE, ServiceTypeEnum.SERVICETYPE_E2E, - ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY + ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY, + ServiceTypeEnum.SERVICETYPE_QKD, } DEVICE_DRIVER_VALUES = { @@ -41,7 +42,8 @@ DEVICE_DRIVER_VALUES = { DeviceDriverEnum.DEVICEDRIVER_GNMI_OPENCONFIG, DeviceDriverEnum.DEVICEDRIVER_OPTICAL_TFS, DeviceDriverEnum.DEVICEDRIVER_IETF_ACTN, - DeviceDriverEnum.DEVICEDRIVER_OC + DeviceDriverEnum.DEVICEDRIVER_OC, + DeviceDriverEnum.DEVICEDRIVER_QKD, } # Map allowed filter fields to allowed values per Filter field. If no restriction (free text) None is specified diff --git a/src/service/service/service_handlers/__init__.py b/src/service/service/service_handlers/__init__.py index 8b5e2b2834f37dc3d616907e46cf1fa5b2f1274f..3beb7c9ee95c79d7219550a62166c648e061a01d 100644 --- a/src/service/service/service_handlers/__init__.py +++ b/src/service/service/service_handlers/__init__.py @@ -27,6 +27,7 @@ from .tapi_tapi.TapiServiceHandler import TapiServiceHandler from .tapi_xr.TapiXrServiceHandler import TapiXrServiceHandler from .e2e_orch.E2EOrchestratorServiceHandler import E2EOrchestratorServiceHandler from .oc.OCServiceHandler import OCServiceHandler +from .qkd.qkd_service_handler import QKDServiceHandler SERVICE_HANDLERS = [ (L2NMEmulatedServiceHandler, [ @@ -106,5 +107,11 @@ SERVICE_HANDLERS = [ FilterFieldEnum.SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_OPTICAL_CONNECTIVITY, FilterFieldEnum.DEVICE_DRIVER : DeviceDriverEnum.DEVICEDRIVER_OC, } + ]), + (QKDServiceHandler, [ + { + FilterFieldEnum.SERVICE_TYPE : ServiceTypeEnum.SERVICETYPE_QKD, + FilterFieldEnum.DEVICE_DRIVER : [DeviceDriverEnum.DEVICEDRIVER_QKD], + } ]) ] diff --git a/src/service/service/service_handlers/qkd/__init__.py b/src/service/service/service_handlers/qkd/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3ee6f7071f145e06c3aeaefc09a43ccd88e619e3 --- /dev/null +++ b/src/service/service/service_handlers/qkd/__init__.py @@ -0,0 +1,14 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + diff --git a/src/service/service/service_handlers/qkd/qkd_service_handler.py b/src/service/service/service_handlers/qkd/qkd_service_handler.py new file mode 100644 index 0000000000000000000000000000000000000000..2bfbcb59dd045d10b9267dc15119e1d17e1929d4 --- /dev/null +++ b/src/service/service/service_handlers/qkd/qkd_service_handler.py @@ -0,0 +1,567 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import json, logging, uuid +from typing import Any, Dict, List, Optional, Tuple, Union +from common.method_wrappers.Decorator import MetricsPool, metered_subclass_method +from common.proto.context_pb2 import ConfigRule, DeviceId, Service +from common.proto.qkd_app_pb2 import App, AppId, QKDAppStatusEnum, QKDAppTypesEnum +from common.proto.context_pb2 import ContextId, Uuid +from common.tools.object_factory.ConfigRule import json_config_rule_delete, json_config_rule_set +from common.tools.object_factory.Device import json_device_id +from common.type_checkers.Checkers import chk_type +from service.service.service_handler_api.Tools import get_device_endpoint_uuids, get_endpoint_matching +from service.service.service_handler_api._ServiceHandler import _ServiceHandler +from service.service.service_handler_api.SettingsHandler import SettingsHandler +from service.service.task_scheduler.TaskExecutor import TaskExecutor + +LOGGER = logging.getLogger(__name__) + +def get_endpoint_name_by_uuid(device, uuid): + for device_endpoint in device.device_endpoints: + if device_endpoint.endpoint_id.endpoint_uuid.uuid == uuid: + return device_endpoint.name + return None + +class QKDServiceHandler(_ServiceHandler): + def __init__( # pylint: disable=super-init-not-called + self, service : Service, task_executor : TaskExecutor, **settings + ) -> None: + self.__service = service + self.__task_executor = task_executor + self.__settings_handler = SettingsHandler(service.service_config, **settings) + self.qkd_app_client = task_executor._qkd_app_client # Initialize qkd_app_client + + + # Optare: This function is where the service is created + # Optare: It already receives the path provided by pathcomp in endpoints variable + # Optare: It then checks for each respective QKD Node and requests SBI to inform of the new connection + # Optare: It also requests app module for a creation of internal service if the service is virtual + def SetEndpoint( + self, endpoints : List[Tuple[str, str, Optional[str]]], + connection_uuid : Optional[str] = None + ) -> List[Union[bool, Exception]]: + chk_type('endpoints', endpoints, list) + if len(endpoints) < 2 or len(endpoints) % 2: return [] + + LOGGER.info('Endpoints: ' + str(endpoints)) + + + service_uuid = self.__service.service_id.service_uuid.uuid + settings = self.__settings_handler.get('/settings') + + context_uuid = self.__service.service_id.context_id.context_uuid.uuid + + results = [] + try: + + if len(endpoints) > 4: + is_virtual = True + else: + is_virtual = False + + devices = [] + qkdn_ids = [] + interfaces = [] + links = [] + + # Optare: First a big iteration through all devices is done in order to obtain all information needed for the whole operation + # Optare: This is a way to minimize time of operation. Otherwise it would require many O(N) operations. This way we can reduce it to one + + # Populate devices and QKDN ids + for idx, endpoint in enumerate(endpoints[::2]): + device_uuid, endpoint_left_uuid = get_device_endpoint_uuids(endpoint) + _, endpoint_right_uuid = get_device_endpoint_uuids(endpoints[2 * idx + 1]) + + device = self.__task_executor.get_device(DeviceId(**json_device_id(device_uuid))) + devices.append(device) + interfaces.append([0,0]) + links.append([]) + + endpoint_left = get_endpoint_name_by_uuid(device, endpoint_left_uuid) if idx > 0 else None + endpoint_right = get_endpoint_name_by_uuid(device, endpoint_right_uuid) if 2 * idx + 2 < len(endpoints) else None + + for config_rule in device.device_config.config_rules: + resource_key = config_rule.custom.resource_key + + if resource_key == '__node__': + value = json.loads(config_rule.custom.resource_value) + qkdn_ids.append(value['qkdn_id']) + + elif resource_key.startswith('/interface'): + value = json.loads(config_rule.custom.resource_value) + try: + endpoint_str = value['qkdi_att_point']['uuid'] + LOGGER.info("A: " + str(endpoint_str) + "....." + str(endpoint_left) + "....." + str(endpoint_right)) + + if endpoint_str == endpoint_left: + interfaces[idx][0] = value['qkdi_id'] + elif endpoint_str == endpoint_right: + interfaces[idx][1] = value['qkdi_id'] + except KeyError: + pass + + elif resource_key.startswith('/link'): + value = json.loads(config_rule.custom.resource_value) + links[idx].append(( value['uuid'], + (value['src_qkdn_id'], value['src_interface_id']), + (value['dst_qkdn_id'], value['dst_interface_id']) + )) + + + LOGGER.info("IFs: " + str(interfaces)) + LOGGER.info("Links: " + str(links)) + LOGGER.info("context_: " + context_uuid) + + + # Optare: From here now is where the work is really done. It iterates over every device in use for the service (ordered) + + src_device_uuid, src_endpoint_uuid = get_device_endpoint_uuids(endpoints[0]) + src_device = devices[0] + src_endpoint = get_endpoint_matching(src_device, src_endpoint_uuid) + + dst_device_uuid, dst_endpoint_uuid = get_device_endpoint_uuids(endpoints[-1]) + dst_device = devices[-1] + dst_endpoint = get_endpoint_matching(dst_device, dst_endpoint_uuid) + + src_qkdn_id = qkdn_ids[0] + dst_qkdn_id = qkdn_ids[-1] + + src_interface_id = interfaces[0][1] + dst_interface_id = interfaces[-1][0] + + service_qkdl_id_src_dst = str(uuid.uuid4()) + service_qkdl_id_dst_src = str(uuid.uuid4()) + + + for idx, device in enumerate(devices): + + # Even though we always create them together. There is a chance the admin deletes one of the rules manually + phys_qkdl_id_right = None if idx == (len(devices) - 1) else '' # None == impossible + phys_qkdl_id_left = None if idx == 0 else '' # None == impossible + + for link_uuid, link_src, link_dst in links[idx]: + qkdn_link_src, qkdn_interface_src = link_src + qkdn_link_dst, qkdn_interface_dst = link_dst + + if phys_qkdl_id_right == '' and \ + qkdn_link_src == qkdn_ids[idx] and qkdn_interface_src == interfaces[idx][1] and \ + qkdn_link_dst[idx+1] and qkdn_interface_dst == interfaces[idx+1][0]: + phys_qkdl_id_right = link_uuid + + + if phys_qkdl_id_left == '' and \ + qkdn_link_src == qkdn_ids[idx] and qkdn_interface_src == interfaces[idx][0] and \ + qkdn_link_dst[idx-1] and qkdn_interface_dst == interfaces[idx-1][1]: + phys_qkdl_id_left = link_uuid + + + # Optare: Before adding information to config_rules you have to delete the list first otherwise old content will be called again + del device.device_config.config_rules[:] + + + if phys_qkdl_id_right: + if not is_virtual: + service_qkdl_id_src_dst = phys_qkdl_id_right + + elif phys_qkdl_id_right == '': + qkdl_id_src_dst = str(uuid.uuid4()) if is_virtual else service_qkdl_id_src_dst + + json_config_rule = json_config_rule_set('/link/link[{:s}]'.format(qkdl_id_src_dst), { + 'uuid' : qkdl_id_src_dst, + 'type' : 'DIRECT', + 'src_qkdn_id' : qkdn_ids[idx], + 'src_interface_id' : interfaces[idx][1], + 'dst_qkdn_id' : qkdn_ids[idx+1], + 'dst_interface_id' : interfaces[idx+1][0], + }) + + device.device_config.config_rules.append(ConfigRule(**json_config_rule)) + + + if phys_qkdl_id_left: + if not is_virtual: + service_qkdl_id_dst_src = phys_qkdl_id_left + + elif phys_qkdl_id_left == '': + qkdl_id_dst_src = str(uuid.uuid4()) if is_virtual else service_qkdl_id_dst_src + + json_config_rule = json_config_rule_set('/link/link[{:s}]'.format(qkdl_id_dst_src), { + 'uuid' : qkdl_id_dst_src, + 'type' : 'DIRECT', + 'src_qkdn_id' : qkdn_ids[idx], + 'src_interface_id' : interfaces[idx][0], + 'dst_qkdn_id' : qkdn_ids[idx-1], + 'dst_interface_id' : interfaces[idx-1][1], + }) + + device.device_config.config_rules.append(ConfigRule(**json_config_rule)) + + + + if is_virtual: + if idx < len(qkdn_ids) - 1: + json_config_rule = json_config_rule_set('/link/link[{:s}]'.format(service_qkdl_id_src_dst), { + 'uuid' : service_qkdl_id_src_dst, + 'type' : 'VIRTUAL', + 'src_qkdn_id' : src_qkdn_id, + 'src_interface_id' : src_interface_id, + 'dst_qkdn_id' : dst_qkdn_id, + 'dst_interface_id' : dst_interface_id, + 'virt_prev_hop' : qkdn_ids[idx-1] if idx > 0 else None, + 'virt_next_hops' : qkdn_ids[idx+1:], + 'virt_bandwidth' : 0, + }) + + device.device_config.config_rules.append(ConfigRule(**json_config_rule)) + + if idx > 0: + json_config_rule = json_config_rule_set('/link/link[{:s}]'.format(service_qkdl_id_dst_src), { + 'uuid' : service_qkdl_id_dst_src, + 'type' : 'VIRTUAL', + 'src_qkdn_id' : dst_qkdn_id, + 'src_interface_id' : dst_interface_id, + 'dst_qkdn_id' : src_qkdn_id, + 'dst_interface_id' : src_interface_id, + 'virt_prev_hop' : qkdn_ids[idx+1] if idx < len(qkdn_ids) - 1 else None, + 'virt_next_hops' : qkdn_ids[idx-1::-1], + 'virt_bandwidth' : 0, + }) + + device.device_config.config_rules.append(ConfigRule(**json_config_rule)) + + + + json_config_rule = json_config_rule_set('/services/service[{:s}]'.format(service_uuid), { + 'uuid' : service_uuid, + 'qkdl_id_src_dst' : service_qkdl_id_src_dst, + 'qkdl_id_dst_src' : service_qkdl_id_dst_src, + }) + + device.device_config.config_rules.append(ConfigRule(**json_config_rule)) + self.__task_executor.configure_device(device) + + + if is_virtual: + + # Register App + internal_app_src_dst = { + 'app_id': {'context_id': {'context_uuid': {'uuid': context_uuid}}, 'app_uuid': {'uuid': str(uuid.uuid4())}}, + 'app_status': QKDAppStatusEnum.QKDAPPSTATUS_ON, + 'app_type': QKDAppTypesEnum.QKDAPPTYPES_INTERNAL, + 'server_app_id': '', + 'client_app_id': [], + 'backing_qkdl_id': [{'qkdl_uuid': {'uuid': service_qkdl_id_src_dst}}], + 'local_device_id': src_device.device_id, + 'remote_device_id': dst_device.device_id, + } + + self.__task_executor.register_qkd_app(App(**internal_app_src_dst)) + + + # Register App + internal_app_dst_src = { + 'app_id': {'context_id': {'context_uuid': {'uuid': context_uuid}}, 'app_uuid': {'uuid': str(uuid.uuid4())}}, + 'app_status': QKDAppStatusEnum.QKDAPPSTATUS_ON, + 'app_type': QKDAppTypesEnum.QKDAPPTYPES_INTERNAL, + 'server_app_id': '', + 'client_app_id': [], + 'backing_qkdl_id': [{'qkdl_uuid': {'uuid': service_qkdl_id_dst_src}}], + 'local_device_id': dst_device.device_id, + 'remote_device_id': src_device.device_id, + } + + self.__task_executor.register_qkd_app(App(**internal_app_dst_src)) + + results.append(True) + except Exception as e: # pylint: disable=broad-except + LOGGER.exception('Unable to SetEndpoint for Service({:s})'.format(str(service_uuid))) + results.append(e) + + return results + + # Optare: This will be to delete a service + def DeleteEndpoint( + self, endpoints: List[Tuple[str, str, Optional[str]]], connection_uuid: Optional[str] = None + ) -> List[Union[bool, Exception]]: + chk_type('endpoints', endpoints, list) + if len(endpoints) == 0: + return [] + + LOGGER.info(f'Deleting Endpoints: {endpoints}') + LOGGER.info(f'Connection UUID: {connection_uuid}') + + service_uuid = self.__service.service_id.service_uuid.uuid + context_uuid = self.__service.service_id.context_id.context_uuid.uuid + LOGGER.info(f'Service UUID: {service_uuid}, Context UUID: {context_uuid}') + + results = [] + apps = list() # Initialize apps as an empty list, in case fetching fails + try: + # Initialize device lists and QKDN IDs + devices = [] + qkdn_ids = [] + interfaces = [] + links = [] + + # Populate devices and QKDN ids from endpoints + for idx, endpoint in enumerate(endpoints[::2]): + device_uuid, endpoint_left_uuid = get_device_endpoint_uuids(endpoint) + _, endpoint_right_uuid = get_device_endpoint_uuids(endpoints[2 * idx + 1]) + + device = self.__task_executor.get_device(DeviceId(**json_device_id(device_uuid))) + LOGGER.info(f'Device: {device}, Endpoint Left: {endpoint_left_uuid}, Endpoint Right: {endpoint_right_uuid}') + + devices.append(device) + interfaces.append([0, 0]) + links.append([]) + + for config_rule in device.device_config.config_rules: + resource_key = config_rule.custom.resource_key + + if resource_key == '__node__': + value = json.loads(config_rule.custom.resource_value) + qkdn_ids.append(value['qkdn_id']) + + elif resource_key.startswith('/interface'): + value = json.loads(config_rule.custom.resource_value) + try: + endpoint_str = value['qkdi_att_point']['uuid'] + if endpoint_str == endpoint_left_uuid: + interfaces[idx][0] = value['qkdi_id'] + elif endpoint_str == endpoint_right_uuid: + interfaces[idx][1] = value['qkdi_id'] + except KeyError: + pass + + elif resource_key.startswith('/link'): + value = json.loads(config_rule.custom.resource_value) + links[idx].append(( + value['uuid'], + (value['src_qkdn_id'], value['src_interface_id']), + (value['dst_qkdn_id'], value['dst_interface_id']) + )) + + LOGGER.info(f'Interfaces: {interfaces}, Links: {links}, QKDN IDs: {qkdn_ids}') + + # Fetch the related apps for the service using the same pattern as in routes.py + try: + context_id = ContextId(context_uuid=Uuid(uuid=context_uuid)) + apps_response = self.__task_executor._qkd_app_client.ListApps(context_id) + apps = apps_response.apps # Assign the apps to the list, if successful + LOGGER.info(f"Apps retrieved: {apps}") + except grpc.RpcError as e: + LOGGER.error(f"gRPC error while fetching apps: {e.details()}") + if e.code() != grpc.StatusCode.NOT_FOUND: + raise + apps = list() # If an error occurs, ensure `apps` is still an empty list + + # Filter related internal apps + related_apps = [ + app for app in apps + if app.server_app_id == service_uuid and app.app_type == QKDAppTypesEnum.QKDAPPTYPES_INTERNAL + ] + + # Log each app's details + for app in related_apps: + LOGGER.info(f"App ID: {app.app_id.app_uuid.uuid}, Status: {app.app_status}") + + # Update each app status to DISCONNECTED before deletion + for app in related_apps: + self.__task_executor.update_qkd_app_status(app, QKDAppStatusEnum.QKDAPPSTATUS_DISCONNECTED) + + results.append(True) + + except Exception as e: # pylint: disable=broad-except + LOGGER.error(f"Failed to delete QKD service: {str(e)}") + results.append(e) + + return results + + def fetch_related_internal_apps(self, context_uuid: str, service_uuid: str) -> List[App]: + try: + context_id = ContextId(context_uuid=Uuid(uuid=context_uuid)) + apps_response = self.qkd_app_client.ListApps(context_id) + + # Log the apps retrieved to ensure they exist and have a status + LOGGER.info(f"Apps retrieved: {apps_response.apps}") + + internal_apps = [ + app for app in apps_response.apps + if app.app_type == QKDAppTypesEnum.QKDAPPTYPES_INTERNAL + and app.server_app_id == service_uuid + and app.app_status == QKDAppStatusEnum.ACTIVE # Ensure you are checking status + ] + + LOGGER.info(f"Filtered internal apps: {internal_apps}") + return internal_apps + + except Exception as e: + LOGGER.error(f"Error fetching related internal apps: {e}") + return [] + + # Optare: Can be ingored. It's in case if a service is later updated. Not required to proper functioning + + def SetConstraint(self, constraints: List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + """ Create/Update service constraints. + Parameters: + constraints: List[Tuple[str, Any]] + List of tuples, each containing a constraint_type and the + new constraint_value to be set. + Returns: + results: List[Union[bool, Exception]] + List of results for constraint changes requested. + Return values must be in the same order as the requested + constraints. If a constraint is properly set, True must be + returned; otherwise, the Exception that is raised during + the processing must be returned. + """ + results = [] + try: + for constraint_type, constraint_value in constraints: + LOGGER.info(f"Setting constraint: {constraint_type} with value: {constraint_value}") + + # Assuming you store constraints as part of service config rules + constraint_key = f"/constraints/{constraint_type}" + json_config_rule = json_config_rule_set(constraint_key, constraint_value) + + # Apply the configuration rule to the service + self.__service.service_config.config_rules.append(ConfigRule(**json_config_rule)) + + # Reconfigure the service with new constraints + self.__task_executor.configure_service(self.__service) + + results.append(True) + + except Exception as e: + LOGGER.error(f"Failed to set constraints: {str(e)}") + results.append(e) + + return results + + def DeleteConstraint(self, constraints: List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + """ Delete service constraints. + Parameters: + constraints: List[Tuple[str, Any]] + List of tuples, each containing a constraint_type pointing + to the constraint to be deleted, and a constraint_value + containing possible additionally required values to locate + the constraint to be removed. + Returns: + results: List[Union[bool, Exception]] + List of results for constraint deletions requested. + Return values must be in the same order as the requested + constraints. If a constraint is properly deleted, True must + be returned; otherwise, the Exception that is raised during + the processing must be returned. + """ + results = [] + try: + for constraint_type, _ in constraints: + LOGGER.info(f"Deleting constraint: {constraint_type}") + + # Remove the constraint from the service config rules + constraint_key = f"/constraints/{constraint_type}" + json_config_rule = json_config_rule_delete(constraint_key) + + for rule in self.__service.service_config.config_rules: + if rule.custom.resource_key == constraint_key: + self.__service.service_config.config_rules.remove(rule) + + # Reconfigure the service after removing constraints + self.__task_executor.configure_service(self.__service) + + results.append(True) + + except Exception as e: + LOGGER.error(f"Failed to delete constraints: {str(e)}") + results.append(e) + + return results + + def SetConfig(self, resources: List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + """ Create/Update configuration for a list of service resources. + Parameters: + resources: List[Tuple[str, Any]] + List of tuples, each containing a resource_key pointing to + the resource to be modified, and a resource_value containing + the new value to be set. + Returns: + results: List[Union[bool, Exception]] + List of results for resource key changes requested. + Return values must be in the same order as the requested + resource keys. If a resource is properly set, True must be + returned; otherwise, the Exception that is raised during + the processing must be returned. + """ + results = [] + try: + for resource_key, resource_value in resources: + LOGGER.info(f"Setting config: {resource_key} with value: {resource_value}") + + json_config_rule = json_config_rule_set(resource_key, resource_value) + + # Apply the configuration rule to the service + self.__service.service_config.config_rules.append(ConfigRule(**json_config_rule)) + + # Reconfigure the service with new configurations + self.__task_executor.configure_service(self.__service) + + results.append(True) + + except Exception as e: + LOGGER.error(f"Failed to set config: {str(e)}") + results.append(e) + + return results + + def DeleteConfig(self, resources: List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: + """ Delete configuration for a list of service resources. + Parameters: + resources: List[Tuple[str, Any]] + List of tuples, each containing a resource_key pointing to + the resource to be modified, and a resource_value containing + possible additionally required values to locate the value + to be removed. + Returns: + results: List[Union[bool, Exception]] + List of results for resource key deletions requested. + Return values must be in the same order as the requested + resource keys. If a resource is properly deleted, True must + be returned; otherwise, the Exception that is raised during + the processing must be returned. + """ + results = [] + try: + for resource_key, _ in resources: + LOGGER.info(f"Deleting config: {resource_key}") + + json_config_rule = json_config_rule_delete(resource_key) + + # Remove the matching configuration rule + for rule in self.__service.service_config.config_rules: + if rule.custom.resource_key == resource_key: + self.__service.service_config.config_rules.remove(rule) + + # Reconfigure the service after deleting configurations + self.__task_executor.configure_service(self.__service) + + results.append(True) + + except Exception as e: + LOGGER.error(f"Failed to delete config: {str(e)}") + results.append(e) + + return results diff --git a/src/service/service/task_scheduler/TaskExecutor.py b/src/service/service/task_scheduler/TaskExecutor.py index 08373230c55af5d92b64b6f4947d22f240181d7e..70d17027eb48987faef562118bf4fb42dfb9c399 100644 --- a/src/service/service/task_scheduler/TaskExecutor.py +++ b/src/service/service/task_scheduler/TaskExecutor.py @@ -17,10 +17,14 @@ from enum import Enum from typing import TYPE_CHECKING, Any, Dict, Optional, Tuple, Union from common.DeviceTypes import DeviceTypeEnum from common.method_wrappers.ServiceExceptions import NotFoundException +from typing import List +from common.proto.qkd_app_pb2 import QKDAppStatusEnum from common.proto.context_pb2 import ( Connection, ConnectionId, Device, DeviceDriverEnum, DeviceId, Service, ServiceId, OpticalConfig, OpticalConfigId ) +from common.proto.qkd_app_pb2 import App, AppId +from common.proto.context_pb2 import ContextId from common.tools.context_queries.Connection import get_connection_by_id from common.tools.context_queries.Device import get_device from common.tools.context_queries.Service import get_service_by_id @@ -28,11 +32,12 @@ from common.tools.grpc.Tools import grpc_message_to_json_string from common.tools.object_factory.Device import json_device_id from context.client.ContextClient import ContextClient from device.client.DeviceClient import DeviceClient +from qkd_app.client.QKDAppClient import QKDAppClient from service.service.service_handler_api.Exceptions import ( UnsatisfiedFilterException, UnsupportedFilterFieldException, UnsupportedFilterFieldValueException ) from service.service.service_handler_api.ServiceHandlerFactory import ServiceHandlerFactory, get_service_handler_class -from service.service.tools.ObjectKeys import get_connection_key, get_device_key, get_service_key +from service.service.tools.ObjectKeys import get_connection_key, get_device_key, get_service_key, get_qkd_app_key if TYPE_CHECKING: from service.service.service_handler_api._ServiceHandler import _ServiceHandler @@ -45,11 +50,14 @@ class CacheableObjectType(Enum): CONNECTION = 'connection' DEVICE = 'device' SERVICE = 'service' + QKD_APP = 'qkd-app' class TaskExecutor: def __init__(self, service_handler_factory : ServiceHandlerFactory) -> None: self._service_handler_factory = service_handler_factory self._context_client = ContextClient() + # DEPENDENCY QKD + self._qkd_app_client = QKDAppClient() self._device_client = DeviceClient() self._grpc_objects_cache : Dict[str, CacheableObject] = dict() @@ -232,3 +240,60 @@ class TaskExecutor: str(dict_connection_devices) )) return service_handlers + + + # ----- QkdApp-related methods ------------------------------------------------------------------------------------- + + def register_qkd_app(self, app: App) -> None: + """ + Registers a QKD App and stores it in the cache. + """ + qkd_app_key = get_qkd_app_key(app.app_id) + self._qkd_app_client.RegisterApp(app) + LOGGER.info("QKD app registered with key: %s", qkd_app_key) + self._store_grpc_object(CacheableObjectType.QKD_APP, qkd_app_key, app) + + def update_qkd_app_status(self, app: App, new_status: QKDAppStatusEnum) -> None: + """ + Updates the status of a QKD app and persists it to the database. + """ + try: + app.app_status = new_status + LOGGER.info(f"Attempting to update app {app.app_id.app_uuid.uuid} to status {new_status}") + self._qkd_app_client.UpdateApp(app) + LOGGER.info(f"Successfully updated app {app.app_id.app_uuid.uuid} to status {new_status}") + except Exception as e: + LOGGER.error(f"Failed to update QKD app {app.app_id.app_uuid.uuid}: {str(e)}") + raise e + + def list_qkd_apps(self, context_id: ContextId) -> List[App]: + """ + Retrieves a list of QKD apps from the QKD App service. + """ + try: + apps_response = self._qkd_app_client.ListApps(context_id) + LOGGER.info(f"ListApps retrieved: {len(apps_response.apps)} apps with status") + + # Ensure that the status is logged and used + for app in apps_response.apps: + LOGGER.info(f"App ID: {app.app_id.app_uuid.uuid}, Status: {app.app_status}") + + return apps_response.apps + except Exception as e: + LOGGER.error(f"Failed to list QKD apps: {str(e)}") + return [] + + def delete_qkd_app(self, app_id: AppId) -> None: + """ + Deletes a QKD App by its AppId and removes it from the cache. + """ + qkd_app_key = get_qkd_app_key(app_id) + try: + LOGGER.info(f"Attempting to delete QKD app with AppId: {app_id}") + self._qkd_app_client.DeleteApp(app_id) + LOGGER.info(f"QKD app deleted with key: {qkd_app_key}") + self._delete_grpc_object(CacheableObjectType.QKD_APP, qkd_app_key) + except Exception as e: + LOGGER.error(f"Failed to delete QKD app with AppId {app_id}: {str(e)}") + raise e + diff --git a/src/service/service/tools/ObjectKeys.py b/src/service/service/tools/ObjectKeys.py index f45126e07df6a74a20e507fd51d08f1a32de7f98..f67cb02e143b78127484d6644a7fdd8c9c71e29c 100644 --- a/src/service/service/tools/ObjectKeys.py +++ b/src/service/service/tools/ObjectKeys.py @@ -13,6 +13,7 @@ # limitations under the License. from common.proto.context_pb2 import ConnectionId, DeviceId, ServiceId +from common.proto.qkd_app_pb2 import AppId def get_connection_key(connection_id : ConnectionId) -> str: return connection_id.connection_uuid.uuid @@ -24,3 +25,7 @@ def get_service_key(service_id : ServiceId) -> str: context_uuid = service_id.context_id.context_uuid.uuid service_uuid = service_id.service_uuid.uuid return '{:s}/{:s}'.format(context_uuid, service_uuid) + +def get_qkd_app_key(app_id: AppId) -> str: + return app_id.app_uuid.uuid + diff --git a/src/telemetry/.gitlab-ci.yml b/src/telemetry/.gitlab-ci.yml index 110a6490d20558c6589550be45b6432e500ba9d6..358a93af8d309c3ea8e80c9b905792763ad51de8 100644 --- a/src/telemetry/.gitlab-ci.yml +++ b/src/telemetry/.gitlab-ci.yml @@ -69,9 +69,11 @@ unit_test telemetry-backend: - docker pull "bitnami/kafka:latest" - > docker run --name zookeeper -d --network=teraflowbridge -p 2181:2181 + --env ALLOW_ANONYMOUS_LOGIN=yes bitnami/zookeeper:latest - sleep 10 # Wait for Zookeeper to start - - docker run --name kafka -d --network=teraflowbridge -p 9092:9092 + - > + docker run --name kafka -d --network=teraflowbridge -p 9092:9092 --env KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181 --env ALLOW_PLAINTEXT_LISTENER=yes bitnami/kafka:latest @@ -93,12 +95,12 @@ unit_test telemetry-backend: - docker exec -i ${IMAGE_NAME}-backend bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing" coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' after_script: + - docker rm -f ${IMAGE_NAME}-backend + - docker rm -f kafka + - docker rm -f zookeeper - docker network rm teraflowbridge - docker volume prune --force - docker image prune --force - - docker rm -f ${IMAGE_NAME}-backend - - docker rm -f zookeeper - - docker rm -f kafka rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' @@ -150,19 +152,20 @@ unit_test telemetry-frontend: - CRDB_ADDRESS=$(docker inspect crdb --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}") - echo $CRDB_ADDRESS - > - docker run --name zookeeper -d --network=teraflowbridge -p 2181:2181 \ - -e ALLOW_ANONYMOUS_LOGIN=yes \ + docker run --name zookeeper -d --network=teraflowbridge -p 2181:2181 + --env ALLOW_ANONYMOUS_LOGIN=yes bitnami/zookeeper:latest - sleep 10 # Wait for Zookeeper to start - - docker run --name kafka -d --network=teraflowbridge -p 9092:9092 + - > + docker run --name kafka -d --network=teraflowbridge -p 9092:9092 --env KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181 --env ALLOW_PLAINTEXT_LISTENER=yes bitnami/kafka:latest - sleep 20 # Wait for Kafka to start - KAFKA_IP=$(docker inspect kafka --format "{{.NetworkSettings.Networks.teraflowbridge.IPAddress}}") - echo $KAFKA_IP - # - docker logs zookeeper - # - docker logs kafka + - docker logs zookeeper + - docker logs kafka - > docker run --name $IMAGE_NAME-frontend -d -p 30050:30050 --env "CRDB_URI=cockroachdb://tfs:tfs123@${CRDB_ADDRESS}:26257/tfs_test?sslmode=require" @@ -179,13 +182,13 @@ unit_test telemetry-frontend: - docker exec -i ${IMAGE_NAME}-frontend bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing" coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/' after_script: - - docker volume rm -f crdb - - docker network rm teraflowbridge - - docker volume prune --force - - docker image prune --force - docker rm -f ${IMAGE_NAME}-frontend - docker rm -f zookeeper - docker rm -f kafka + - docker volume rm -f crdb + - docker volume prune --force + - docker image prune --force + - docker network rm teraflowbridge rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)' - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"' @@ -200,4 +203,4 @@ unit_test telemetry-frontend: artifacts: when: always reports: - junit: src/$IMAGE_NAME/frontend/tests/${IMAGE_NAME}-frontend_report.xml \ No newline at end of file + junit: src/$IMAGE_NAME/frontend/tests/${IMAGE_NAME}-frontend_report.xml diff --git a/src/telemetry/backend/service/TelemetryBackendService.py b/src/telemetry/backend/service/TelemetryBackendService.py index 6ab841238f446a2895cd163fab4b7eb05eaa3176..79a35d343860d19992518c0e8b29e427e5cbbef4 100755 --- a/src/telemetry/backend/service/TelemetryBackendService.py +++ b/src/telemetry/backend/service/TelemetryBackendService.py @@ -17,7 +17,8 @@ import time import random import logging import threading -from typing import Any, Dict +from typing import Any, Dict +from datetime import datetime, timezone # from common.proto.context_pb2 import Empty from confluent_kafka import Producer as KafkaProducer from confluent_kafka import Consumer as KafkaConsumer @@ -53,6 +54,8 @@ class TelemetryBackendService(GenericGrpcService): """ listener for requests on Kafka topic. """ + LOGGER.info('Telemetry backend request listener is running ...') + # print ('Telemetry backend request listener is running ...') consumer = self.kafka_consumer consumer.subscribe([KafkaTopic.REQUEST.value]) while True: @@ -63,29 +66,33 @@ class TelemetryBackendService(GenericGrpcService): if receive_msg.error().code() == KafkaError._PARTITION_EOF: continue else: - print("Consumer error: {}".format(receive_msg.error())) + # print("Consumer error: {}".format(receive_msg.error())) break - - collector = json.loads(receive_msg.value().decode('utf-8')) - collector_id = receive_msg.key().decode('utf-8') - LOGGER.debug('Recevied Collector: {:} - {:}'.format(collector_id, collector)) - print('Recevied Collector: {:} - {:}'.format(collector_id, collector)) - - if collector['duration'] == -1 and collector['interval'] == -1: - self.TerminateCollectorBackend(collector_id) - else: - self.RunInitiateCollectorBackend(collector_id, collector) + try: + collector = json.loads(receive_msg.value().decode('utf-8')) + collector_id = receive_msg.key().decode('utf-8') + LOGGER.debug('Recevied Collector: {:} - {:}'.format(collector_id, collector)) + # print('Recevied Collector: {:} - {:}'.format(collector_id, collector)) + + if collector['duration'] == -1 and collector['interval'] == -1: + self.TerminateCollectorBackend(collector_id) + else: + self.RunInitiateCollectorBackend(collector_id, collector) + except Exception as e: + LOGGER.warning("Unable to consumer message from topic: {:}. ERROR: {:}".format(KafkaTopic.REQUEST.value, e)) + # print ("Unable to consumer message from topic: {:}. ERROR: {:}".format(KafkaTopic.REQUEST.value, e)) def TerminateCollectorBackend(self, collector_id): if collector_id in self.running_threads: thread, stop_event = self.running_threads[collector_id] stop_event.set() thread.join() - print ("Terminating backend (by StopCollector): Collector Id: ", collector_id) + # print ("Terminating backend (by StopCollector): Collector Id: ", collector_id) del self.running_threads[collector_id] - self.GenerateCollectorResponse(collector_id, "-1", -1) # Termination confirmation to frontend. + self.GenerateCollectorTerminationSignal(collector_id, "-1", -1) # Termination confirmation to frontend. else: - print ('Backend collector {:} not found'.format(collector_id)) + # print ('Backend collector {:} not found'.format(collector_id)) + LOGGER.warning('Backend collector {:} not found'.format(collector_id)) def RunInitiateCollectorBackend(self, collector_id: str, collector: str): stop_event = threading.Event() @@ -98,23 +105,40 @@ class TelemetryBackendService(GenericGrpcService): """ Method receives collector request and initiates collecter backend. """ - print("Initiating backend for collector: ", collector_id) + # print("Initiating backend for collector: ", collector_id) + LOGGER.info("Initiating backend for collector: ", collector_id) start_time = time.time() while not stop_event.is_set(): - if time.time() - start_time >= collector['duration']: # condition to terminate backend + if int(collector['duration']) != -1 and time.time() - start_time >= collector['duration']: # condition to terminate backend print("Execuation duration completed: Terminating backend: Collector Id: ", collector_id, " - ", time.time() - start_time) - self.GenerateCollectorResponse(collector_id, "-1", -1) # Termination confirmation to frontend. + self.GenerateCollectorTerminationSignal(collector_id, "-1", -1) # Termination confirmation to frontend. break self.ExtractKpiValue(collector_id, collector['kpi_id']) time.sleep(collector['interval']) + def GenerateCollectorTerminationSignal(self, collector_id: str, kpi_id: str, measured_kpi_value: Any): + """ + Method to write kpi Termination signat on RESPONSE Kafka topic + """ + producer = self.kafka_producer + kpi_value : Dict = { + "kpi_id" : kpi_id, + "kpi_value" : measured_kpi_value, + } + producer.produce( + KafkaTopic.RESPONSE.value, # TODO: to the topic ... + key = collector_id, + value = json.dumps(kpi_value), + callback = self.delivery_callback + ) + producer.flush() + def ExtractKpiValue(self, collector_id: str, kpi_id: str): """ Method to extract kpi value. """ measured_kpi_value = random.randint(1,100) # TODO: To be extracted from a device - print ("Measured Kpi value: {:}".format(measured_kpi_value)) - # measured_kpi_value = self.fetch_node_exporter_metrics() # exporter extracted metric value against default KPI + # print ("Measured Kpi value: {:}".format(measured_kpi_value)) self.GenerateCollectorResponse(collector_id, kpi_id , measured_kpi_value) def GenerateCollectorResponse(self, collector_id: str, kpi_id: str, measured_kpi_value: Any): @@ -123,117 +147,27 @@ class TelemetryBackendService(GenericGrpcService): """ producer = self.kafka_producer kpi_value : Dict = { + "time_stamp": datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ"), "kpi_id" : kpi_id, "kpi_value" : measured_kpi_value } producer.produce( - KafkaTopic.RESPONSE.value, + KafkaTopic.VALUE.value, # TODO: to the topic ... key = collector_id, value = json.dumps(kpi_value), callback = self.delivery_callback ) producer.flush() - def GenerateRawMetric(self, metrics: Any): - """ - Method writes raw metrics on VALUE Kafka topic - """ - producer = self.kafka_producer - some_metric : Dict = { - "some_id" : metrics - } - producer.produce( - KafkaTopic.VALUE.value, - key = 'raw', - value = json.dumps(some_metric), - callback = self.delivery_callback - ) - producer.flush() - def delivery_callback(self, err, msg): """ Callback function to handle message delivery status. Args: err (KafkaError): Kafka error object. msg (Message): Kafka message object. """ - if err: print(f'Message delivery failed: {err}') - # else: print(f'Message delivered to topic {msg.topic()}') - -# # ----------- BELOW: Actual Implementation of Kafka Producer with Node Exporter ----------- -# @staticmethod -# def fetch_single_node_exporter_metric(): -# """ -# Method to fetch metrics from Node Exporter. -# Returns: -# str: Metrics fetched from Node Exporter. -# """ -# KPI = "node_network_receive_packets_total" -# try: -# response = requests.get(EXPORTER_ENDPOINT) # type: ignore -# LOGGER.info("Request status {:}".format(response)) -# if response.status_code == 200: -# # print(f"Metrics fetched sucessfully...") -# metrics = response.text -# # Check if the desired metric is available in the response -# if KPI in metrics: -# KPI_VALUE = TelemetryBackendService.extract_metric_value(metrics, KPI) -# # Extract the metric value -# if KPI_VALUE is not None: -# LOGGER.info("Extracted value of {:} is {:}".format(KPI, KPI_VALUE)) -# print(f"Extracted value of {KPI} is: {KPI_VALUE}") -# return KPI_VALUE -# else: -# LOGGER.info("Failed to fetch metrics. Status code: {:}".format(response.status_code)) -# # print(f"Failed to fetch metrics. Status code: {response.status_code}") -# return None -# except Exception as e: -# LOGGER.info("Failed to fetch metrics. Status code: {:}".format(e)) -# # print(f"Failed to fetch metrics: {str(e)}") -# return None - -# @staticmethod -# def extract_metric_value(metrics, metric_name): -# """ -# Method to extract the value of a metric from the metrics string. -# Args: -# metrics (str): Metrics string fetched from Exporter. -# metric_name (str): Name of the metric to extract. -# Returns: -# float: Value of the extracted metric, or None if not found. -# """ -# try: -# # Find the metric line containing the desired metric name -# metric_line = next(line for line in metrics.split('\n') if line.startswith(metric_name)) -# # Split the line to extract the metric value -# metric_value = float(metric_line.split()[1]) -# return metric_value -# except StopIteration: -# print(f"Metric '{metric_name}' not found in the metrics.") -# return None - -# @staticmethod -# def stream_node_export_metrics_to_raw_topic(): -# try: -# while True: -# response = requests.get(EXPORTER_ENDPOINT) -# # print("Response Status {:} ".format(response)) -# # LOGGER.info("Response Status {:} ".format(response)) -# try: -# if response.status_code == 200: -# producerObj = KafkaProducer(PRODUCER_CONFIG) -# producerObj.produce(KAFKA_TOPICS['raw'], key="raw", value= str(response.text), callback=TelemetryBackendService.delivery_callback) -# producerObj.flush() -# LOGGER.info("Produce to topic") -# else: -# LOGGER.info("Didn't received expected response. Status code: {:}".format(response.status_code)) -# print(f"Didn't received expected response. Status code: {response.status_code}") -# return None -# time.sleep(15) -# except Exception as e: -# LOGGER.info("Failed to process response. Status code: {:}".format(e)) -# return None -# except Exception as e: -# LOGGER.info("Failed to fetch metrics. Status code: {:}".format(e)) -# print(f"Failed to fetch metrics: {str(e)}") -# return None -# # ----------- ABOVE: Actual Implementation of Kafka Producer with Node Exporter ----------- \ No newline at end of file + if err: + LOGGER.debug('Message delivery failed: {:}'.format(err)) + # print(f'Message delivery failed: {err}') + else: + LOGGER.info('Message delivered to topic {:}'.format(msg.topic())) + # print(f'Message delivered to topic {msg.topic()}') diff --git a/src/telemetry/backend/tests/messagesBackend.py b/src/telemetry/backend/tests/messages.py similarity index 100% rename from src/telemetry/backend/tests/messagesBackend.py rename to src/telemetry/backend/tests/messages.py diff --git a/src/telemetry/backend/tests/test_TelemetryBackend.py b/src/telemetry/backend/tests/test_backend.py similarity index 81% rename from src/telemetry/backend/tests/test_TelemetryBackend.py rename to src/telemetry/backend/tests/test_backend.py index a2bbee540c3ce348ef52eceb0e776f48a68d94b1..8bbde9769ae1dfb16a33ef528f74031d2ba94c01 100644 --- a/src/telemetry/backend/tests/test_TelemetryBackend.py +++ b/src/telemetry/backend/tests/test_backend.py @@ -13,6 +13,7 @@ # limitations under the License. import logging +import threading from common.tools.kafka.Variables import KafkaTopic from telemetry.backend.service.TelemetryBackendService import TelemetryBackendService @@ -30,9 +31,7 @@ def test_validate_kafka_topics(): response = KafkaTopic.create_all_topics() assert isinstance(response, bool) -def test_RunRequestListener(): - LOGGER.info('test_RunRequestListener') - TelemetryBackendServiceObj = TelemetryBackendService() - response = TelemetryBackendServiceObj.RunRequestListener() - LOGGER.debug(str(response)) - assert isinstance(response, bool) +# def test_RunRequestListener(): +# LOGGER.info('test_RunRequestListener') +# TelemetryBackendServiceObj = TelemetryBackendService() +# threading.Thread(target=TelemetryBackendServiceObj.RequestListener).start() \ No newline at end of file diff --git a/src/telemetry/database/Telemetry_DB.py b/src/telemetry/database/Telemetry_DB.py index 32acfd73a410a7bfddd6b487d0b1962afadb3842..110c7e80a4c36eed15417bfa05c4057ccb7fe292 100644 --- a/src/telemetry/database/Telemetry_DB.py +++ b/src/telemetry/database/Telemetry_DB.py @@ -13,125 +13,32 @@ # limitations under the License. import logging -import sqlalchemy_utils -from sqlalchemy import inspect -from sqlalchemy.orm import sessionmaker -from telemetry.database.TelemetryModel import Collector as CollectorModel -from telemetry.database.TelemetryEngine import TelemetryEngine -from common.method_wrappers.ServiceExceptions import ( - OperationFailedException, AlreadyExistsException ) +from common.method_wrappers.Decorator import MetricsPool +from common.tools.database.GenericDatabase import Database +from common.method_wrappers.ServiceExceptions import OperationFailedException -LOGGER = logging.getLogger(__name__) -DB_NAME = "tfs_telemetry" +LOGGER = logging.getLogger(__name__) +METRICS_POOL = MetricsPool('TelemteryFrontend', 'Database') -class TelemetryDB: - def __init__(self): - self.db_engine = TelemetryEngine.get_engine() - if self.db_engine is None: - LOGGER.error('Unable to get SQLAlchemy DB Engine...') - return False - self.db_name = DB_NAME - self.Session = sessionmaker(bind=self.db_engine) - - def create_database(self): - if not sqlalchemy_utils.database_exists(self.db_engine.url): - LOGGER.debug("Database created. {:}".format(self.db_engine.url)) - sqlalchemy_utils.create_database(self.db_engine.url) - - def drop_database(self) -> None: - if sqlalchemy_utils.database_exists(self.db_engine.url): - sqlalchemy_utils.drop_database(self.db_engine.url) - - def create_tables(self): - try: - CollectorModel.metadata.create_all(self.db_engine) # type: ignore - LOGGER.debug("Tables created in the database: {:}".format(self.db_name)) - except Exception as e: - LOGGER.debug("Tables cannot be created in the database. {:s}".format(str(e))) - raise OperationFailedException ("Tables can't be created", extra_details=["unable to create table {:}".format(e)]) - - def verify_tables(self): - try: - inspect_object = inspect(self.db_engine) - if(inspect_object.has_table('collector', None)): - LOGGER.info("Table exists in DB: {:}".format(self.db_name)) - except Exception as e: - LOGGER.info("Unable to fetch Table names. {:s}".format(str(e))) - -# ----------------- CURD METHODs --------------------- - - def add_row_to_db(self, row): - session = self.Session() - try: - session.add(row) - session.commit() - LOGGER.debug(f"Row inserted into {row.__class__.__name__} table.") - return True - except Exception as e: - session.rollback() - if "psycopg2.errors.UniqueViolation" in str(e): - LOGGER.error(f"Unique key voilation: {row.__class__.__name__} table. {str(e)}") - raise AlreadyExistsException(row.__class__.__name__, row, - extra_details=["Unique key voilation: {:}".format(e)] ) - else: - LOGGER.error(f"Failed to insert new row into {row.__class__.__name__} table. {str(e)}") - raise OperationFailedException ("Deletion by column id", extra_details=["unable to delete row {:}".format(e)]) - finally: - session.close() - - def search_db_row_by_id(self, model, col_name, id_to_search): - session = self.Session() - try: - entity = session.query(model).filter_by(**{col_name: id_to_search}).first() - if entity: - # LOGGER.debug(f"{model.__name__} ID found: {str(entity)}") - return entity - else: - LOGGER.debug(f"{model.__name__} ID not found, No matching row: {str(id_to_search)}") - print("{:} ID not found, No matching row: {:}".format(model.__name__, id_to_search)) - return None - except Exception as e: - session.rollback() - LOGGER.debug(f"Failed to retrieve {model.__name__} ID. {str(e)}") - raise OperationFailedException ("search by column id", extra_details=["unable to search row {:}".format(e)]) - finally: - session.close() - - def delete_db_row_by_id(self, model, col_name, id_to_search): - session = self.Session() - try: - record = session.query(model).filter_by(**{col_name: id_to_search}).first() - if record: - session.delete(record) - session.commit() - LOGGER.debug("Deleted %s with %s: %s", model.__name__, col_name, id_to_search) - else: - LOGGER.debug("%s with %s %s not found", model.__name__, col_name, id_to_search) - return None - except Exception as e: - session.rollback() - LOGGER.error("Error deleting %s with %s %s: %s", model.__name__, col_name, id_to_search, e) - raise OperationFailedException ("Deletion by column id", extra_details=["unable to delete row {:}".format(e)]) - finally: - session.close() +class TelemetryDB(Database): + def __init__(self, model) -> None: + LOGGER.info('Init KpiManagerService') + super().__init__(model) def select_with_filter(self, model, filter_object): + """ + Generic method to create filters dynamically based on filter_object attributes. + params: model: SQLAlchemy model class to query. + filter_object: Object that contains filtering criteria as attributes. + return: SQLAlchemy session, query and Model + """ session = self.Session() try: - query = session.query(CollectorModel) - # Apply filters based on the filter_object + query = session.query(model) if filter_object.kpi_id: - query = query.filter(CollectorModel.kpi_id.in_([k.kpi_id.uuid for k in filter_object.kpi_id])) - result = query.all() - # query should be added to return all rows - if result: - LOGGER.debug(f"Fetched filtered rows from {model.__name__} table with filters: {filter_object}") # - Results: {result} - else: - LOGGER.warning(f"No matching row found in {model.__name__} table with filters: {filter_object}") - return result + query = query.filter(model.kpi_id.in_([k.kpi_id.uuid for k in filter_object.kpi_id])) except Exception as e: - LOGGER.error(f"Error fetching filtered rows from {model.__name__} table with filters {filter_object} ::: {e}") - raise OperationFailedException ("Select by filter", extra_details=["unable to apply the filter {:}".format(e)]) - finally: - session.close() - + LOGGER.error(f"Error creating filter of {model.__name__} table. ERROR: {e}") + raise OperationFailedException ("CreateKpiDescriptorFilter", extra_details=["unable to create the filter {:}".format(e)]) + + return super().select_with_filter(query, session, model) diff --git a/src/telemetry/frontend/service/TelemetryFrontendServiceServicerImpl.py b/src/telemetry/frontend/service/TelemetryFrontendServiceServicerImpl.py index b73d9fa952ee42aeb7adb8f3c0b2e4a3ba7f3e09..5c569e2ddd1d75dd89f88fe9ae08517330470254 100644 --- a/src/telemetry/frontend/service/TelemetryFrontendServiceServicerImpl.py +++ b/src/telemetry/frontend/service/TelemetryFrontendServiceServicerImpl.py @@ -40,7 +40,7 @@ ACTIVE_COLLECTORS = [] # keep and can be populated from DB class TelemetryFrontendServiceServicerImpl(TelemetryFrontendServiceServicer): def __init__(self): LOGGER.info('Init TelemetryFrontendService') - self.tele_db_obj = TelemetryDB() + self.tele_db_obj = TelemetryDB(CollectorModel) self.kafka_producer = KafkaProducer({'bootstrap.servers' : KafkaConfig.get_kafka_address()}) self.kafka_consumer = KafkaConsumer({'bootstrap.servers' : KafkaConfig.get_kafka_address(), 'group.id' : 'frontend', @@ -153,7 +153,7 @@ class TelemetryFrontendServiceServicerImpl(TelemetryFrontendServiceServicer): """ if err: LOGGER.debug('Message delivery failed: {:}'.format(err)) - print('Message delivery failed: {:}'.format(err)) + # print('Message delivery failed: {:}'.format(err)) # else: # LOGGER.debug('Message delivered to topic {:}'.format(msg.topic())) # print('Message delivered to topic {:}'.format(msg.topic())) @@ -161,9 +161,8 @@ class TelemetryFrontendServiceServicerImpl(TelemetryFrontendServiceServicer): # ---------- Independent Method --------------- # Listener method is independent of any method (same lifetime as service) # continously listens for responses - def RunResponseListener(self): + def install_servicers(self): threading.Thread(target=self.ResponseListener).start() - return True def ResponseListener(self): """ @@ -178,7 +177,8 @@ class TelemetryFrontendServiceServicerImpl(TelemetryFrontendServiceServicer): if receive_msg.error().code() == KafkaError._PARTITION_EOF: continue else: - print("Consumer error: {}".format(receive_msg.error())) + # print("Consumer error: {:}".format(receive_msg.error())) + LOGGER.error("Consumer error: {:}".format(receive_msg.error())) break try: collector_id = receive_msg.key().decode('utf-8') @@ -186,13 +186,17 @@ class TelemetryFrontendServiceServicerImpl(TelemetryFrontendServiceServicer): kpi_value = json.loads(receive_msg.value().decode('utf-8')) self.process_response(collector_id, kpi_value['kpi_id'], kpi_value['kpi_value']) else: - print(f"collector id does not match.\nRespone ID: '{collector_id}' --- Active IDs: '{ACTIVE_COLLECTORS}' ") + # print(f"collector id does not match.\nRespone ID: '{collector_id}' --- Active IDs: '{ACTIVE_COLLECTORS}' ") + LOGGER.info("collector id does not match.\nRespone ID: {:} --- Active IDs: {:}".format(collector_id, ACTIVE_COLLECTORS)) except Exception as e: - print(f"Error extarcting msg key or value: {str(e)}") + # print(f"Error extarcting msg key or value: {str(e)}") + LOGGER.info("Error extarcting msg key or value: {:}".format(e)) continue def process_response(self, collector_id: str, kpi_id: str, kpi_value: Any): if kpi_id == "-1" and kpi_value == -1: - print ("Backend termination confirmation for collector id: ", collector_id) + # print ("Backend termination confirmation for collector id: ", collector_id) + LOGGER.info("Backend termination confirmation for collector id: ", collector_id) else: - print ("KPI Value: Collector Id:", collector_id, ", Kpi Id:", kpi_id, ", Value:", kpi_value) + LOGGER.info("Backend termination confirmation for collector id: ", collector_id) + # print ("KPI Value: Collector Id:", collector_id, ", Kpi Id:", kpi_id, ", Value:", kpi_value) diff --git a/src/telemetry/frontend/service/__main__.py b/src/telemetry/frontend/service/__main__.py index 2a6c5dbcf2da6b6a074c2b8ee23791bc4896442f..6697ff5f10e58b494736738e631a29a20691732d 100644 --- a/src/telemetry/frontend/service/__main__.py +++ b/src/telemetry/frontend/service/__main__.py @@ -16,6 +16,8 @@ import logging, signal, sys, threading from prometheus_client import start_http_server from common.Settings import get_log_level, get_metrics_port from .TelemetryFrontendService import TelemetryFrontendService +from telemetry.database.TelemetryModel import Collector as Model +from common.tools.database.GenericDatabase import Database terminate = threading.Event() LOGGER = None @@ -36,6 +38,11 @@ def main(): LOGGER.info('Starting...') + # To create DB + kpiDBobj = Database(Model) + kpiDBobj.create_database() + kpiDBobj.create_tables() + # Start metrics server metrics_port = get_metrics_port() start_http_server(metrics_port) diff --git a/src/telemetry/frontend/tests/Messages.py b/src/telemetry/frontend/tests/Messages.py index a0e93e8a121b9efaac83f7169419911c8ee6e3ea..e6d8ef439f4ad4764c5a6f8b5f36ec68cbb10867 100644 --- a/src/telemetry/frontend/tests/Messages.py +++ b/src/telemetry/frontend/tests/Messages.py @@ -22,15 +22,18 @@ from common.proto.kpi_manager_pb2 import KpiId def create_collector_id(): _collector_id = telemetry_frontend_pb2.CollectorId() # _collector_id.collector_id.uuid = str(uuid.uuid4()) - _collector_id.collector_id.uuid = "5d45f53f-d567-429f-9427-9196ac72ff0c" + _collector_id.collector_id.uuid = "efef4d95-1cf1-43c4-9742-95c283dddddd" return _collector_id def create_collector_request(): _create_collector_request = telemetry_frontend_pb2.Collector() - _create_collector_request.collector_id.collector_id.uuid = str(uuid.uuid4()) - _create_collector_request.kpi_id.kpi_id.uuid = str(uuid.uuid4()) - _create_collector_request.duration_s = float(random.randint(8, 16)) - _create_collector_request.interval_s = float(random.randint(2, 4)) + # _create_collector_request.collector_id.collector_id.uuid = str(uuid.uuid4()) + _create_collector_request.collector_id.collector_id.uuid = "efef4d95-1cf1-43c4-9742-95c283dddddd" + # _create_collector_request.kpi_id.kpi_id.uuid = str(uuid.uuid4()) + _create_collector_request.kpi_id.kpi_id.uuid = "6e22f180-ba28-4641-b190-2287bf448888" + # _create_collector_request.duration_s = float(random.randint(8, 16)) + _create_collector_request.duration_s = -1 + _create_collector_request.interval_s = float(random.randint(3, 5)) return _create_collector_request def create_collector_filter(): diff --git a/src/telemetry/frontend/tests/test_frontend.py b/src/telemetry/frontend/tests/test_frontend.py index 9c3f9d3a8f545792eb2bb3a371c6c20664d24f69..c3f8091c83f56fd4a134ec092b1e22723040595d 100644 --- a/src/telemetry/frontend/tests/test_frontend.py +++ b/src/telemetry/frontend/tests/test_frontend.py @@ -105,47 +105,10 @@ def test_SelectCollectors(telemetryFrontend_client): LOGGER.debug(str(response)) assert isinstance(response, CollectorList) -# ----- Non-gRPC method tests ----- -def test_RunResponseListener(): - LOGGER.info(' >>> test_RunResponseListener START: <<< ') - TelemetryFrontendServiceObj = TelemetryFrontendServiceServicerImpl() - response = TelemetryFrontendServiceObj.RunResponseListener() # becasue Method "run_kafka_listener" is not define in frontend.proto - LOGGER.debug(str(response)) - assert isinstance(response, bool) - -# ------- previous test ---------------- - -# def test_verify_db_and_table(): -# LOGGER.info(' >>> test_verify_database_and_tables START: <<< ') -# _engine = TelemetryEngine.get_engine() -# managementDB.create_database(_engine) -# managementDB.create_tables(_engine) - -# def test_StartCollector(telemetryFrontend_client): -# LOGGER.info(' >>> test_StartCollector START: <<< ') -# response = telemetryFrontend_client.StartCollector(create_collector_request()) -# LOGGER.debug(str(response)) -# assert isinstance(response, CollectorId) - -# def test_run_kafka_listener(): -# LOGGER.info(' >>> test_run_kafka_listener START: <<< ') -# name_mapping = NameMapping() -# TelemetryFrontendServiceObj = TelemetryFrontendServiceServicerImpl(name_mapping) -# response = TelemetryFrontendServiceObj.run_kafka_listener() # Method "run_kafka_listener" is not define in frontend.proto +# # ----- Non-gRPC method tests ----- +# def test_RunResponseListener(): +# LOGGER.info(' >>> test_RunResponseListener START: <<< ') +# TelemetryFrontendServiceObj = TelemetryFrontendServiceServicerImpl() +# response = TelemetryFrontendServiceObj.RunResponseListener() # becasue Method "run_kafka_listener" is not define in frontend.proto # LOGGER.debug(str(response)) # assert isinstance(response, bool) - -# def test_StopCollector(telemetryFrontend_client): -# LOGGER.info(' >>> test_StopCollector START: <<< ') -# _collector_id = telemetryFrontend_client.StartCollector(create_collector_request()) -# time.sleep(3) # wait for small amount before call the stopCollecter() -# response = telemetryFrontend_client.StopCollector(_collector_id) -# LOGGER.debug(str(response)) -# assert isinstance(response, Empty) - -# def test_select_collectors(telemetryFrontend_client): -# LOGGER.info(' >>> test_select_collector requesting <<< ') -# response = telemetryFrontend_client.SelectCollectors(create_collector_filter()) -# LOGGER.info('Received Rows after applying Filter: {:} '.format(response)) -# LOGGER.debug(str(response)) -# assert isinstance(response, CollectorList) \ No newline at end of file diff --git a/src/telemetry/requirements.in b/src/telemetry/requirements.in index a0e78d2bfb7270b9664ad5ba810e2f213d887bf7..503468a662599f0225b293d0ef4c4e4313fa3e0f 100644 --- a/src/telemetry/requirements.in +++ b/src/telemetry/requirements.in @@ -12,13 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -anytree==2.8.0 APScheduler==3.10.1 -influx-line-protocol==0.1.4 psycopg2-binary==2.9.3 python-dateutil==2.8.2 python-json-logger==2.0.2 pytz==2024.1 -questdb==1.0.1 requests==2.27.1 -xmltodict==0.12.0 \ No newline at end of file diff --git a/src/telemetry/tests/test_telemetryDB.py b/src/telemetry/tests/test_telemetryDB.py index c4976f8c2144fcdcad43a3e25d43091010de0d18..bbc02a2a22fbbae3a1064fc5f9606ec8b29ff0f9 100644 --- a/src/telemetry/tests/test_telemetryDB.py +++ b/src/telemetry/tests/test_telemetryDB.py @@ -15,14 +15,15 @@ import logging from telemetry.database.Telemetry_DB import TelemetryDB +from telemetry.database.TelemetryModel import Collector as CollectorModel LOGGER = logging.getLogger(__name__) def test_verify_databases_and_tables(): LOGGER.info('>>> test_verify_databases_and_tables : START <<< ') - TelemetryDBobj = TelemetryDB() - TelemetryDBobj.drop_database() - TelemetryDBobj.verify_tables() + TelemetryDBobj = TelemetryDB(CollectorModel) + # TelemetryDBobj.drop_database() + # TelemetryDBobj.verify_tables() TelemetryDBobj.create_database() TelemetryDBobj.create_tables() - TelemetryDBobj.verify_tables() \ No newline at end of file + TelemetryDBobj.verify_tables() diff --git a/src/tests/hackfest3/tests/Objects.py b/src/tests/hackfest3/tests/Objects.py index 0d49747b89647997d9f2aafbccc8aacc137793a4..e5f394070f403f780abe39a2c1e73288ff8cf3b1 100644 --- a/src/tests/hackfest3/tests/Objects.py +++ b/src/tests/hackfest3/tests/Objects.py @@ -60,7 +60,7 @@ DEVICE_SW1 = json_device_p4_disabled(DEVICE_SW1_UUID) DEVICE_SW1_DPID = 1 DEVICE_SW1_NAME = DEVICE_SW1_UUID -DEVICE_SW1_IP_ADDR = '192.168.6.38' +DEVICE_SW1_IP_ADDR = '192.168.5.131' DEVICE_SW1_PORT = '50001' DEVICE_SW1_VENDOR = 'Open Networking Foundation' DEVICE_SW1_HW_VER = 'BMv2 simple_switch' @@ -100,7 +100,7 @@ DEVICE_SW2 = json_device_p4_disabled(DEVICE_SW2_UUID) DEVICE_SW2_DPID = 1 DEVICE_SW2_NAME = DEVICE_SW2_UUID -DEVICE_SW2_IP_ADDR = '192.168.6.38' +DEVICE_SW2_IP_ADDR = '192.168.5.131' DEVICE_SW2_PORT = '50002' DEVICE_SW2_VENDOR = 'Open Networking Foundation' DEVICE_SW2_HW_VER = 'BMv2 simple_switch' @@ -138,7 +138,7 @@ DEVICE_SW3 = json_device_p4_disabled(DEVICE_SW3_UUID) DEVICE_SW3_DPID = 1 DEVICE_SW3_NAME = DEVICE_SW3_UUID -DEVICE_SW3_IP_ADDR = '192.168.6.38' +DEVICE_SW3_IP_ADDR = '192.168.5.131' DEVICE_SW3_PORT = '50003' DEVICE_SW3_VENDOR = 'Open Networking Foundation' DEVICE_SW3_HW_VER = 'BMv2 simple_switch' @@ -176,7 +176,7 @@ DEVICE_SW4 = json_device_p4_disabled(DEVICE_SW4_UUID) DEVICE_SW4_DPID = 1 DEVICE_SW4_NAME = DEVICE_SW4_UUID -DEVICE_SW4_IP_ADDR = '192.168.6.38' +DEVICE_SW4_IP_ADDR = '192.168.5.131' DEVICE_SW4_PORT = '50004' DEVICE_SW4_VENDOR = 'Open Networking Foundation' DEVICE_SW4_HW_VER = 'BMv2 simple_switch' diff --git a/src/tests/hackfest3/tests/test_functional_create_service.py b/src/tests/hackfest3/tests/test_functional_create_service.py index fdd006eb71a359fa7a3b43bb86be713ab5b2b2dd..a358c4c022be3216e29c23515a3192c8acbe8ce1 100644 --- a/src/tests/hackfest3/tests/test_functional_create_service.py +++ b/src/tests/hackfest3/tests/test_functional_create_service.py @@ -28,6 +28,7 @@ from service.client.ServiceClient import ServiceClient from .Objects import CONTEXT_ID, CONTEXTS, DEVICES, LINKS, TOPOLOGIES, SERVICES from common.proto.context_pb2 import ConfigActionEnum, Device, DeviceId,\ DeviceOperationalStatusEnum +from common.tools.object_factory.Constraint import json_constraint_custom LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) @@ -62,4 +63,5 @@ def test_rules_entry( service_p4 = copy.deepcopy(service) service_client.CreateService(Service(**service_p4)) service_p4['service_endpoint_ids'].extend(endpoints) + service_p4['service_constraints'].extend([json_constraint_custom('min_latency_E2E','2')]) service_client.UpdateService(Service(**service_p4)) diff --git a/src/tests/p4/tests/Objects.py b/src/tests/p4/tests/Objects.py index 6004ea413ec6af3412780bb7b49f03edb0481b7e..d8f08c271d1f1c2ca36f6ac87b38dd0a47bc1cf8 100644 --- a/src/tests/p4/tests/Objects.py +++ b/src/tests/p4/tests/Objects.py @@ -60,7 +60,7 @@ DEVICE_SW1 = json_device_p4_disabled(DEVICE_SW1_UUID) DEVICE_SW1_DPID = 1 DEVICE_SW1_NAME = DEVICE_SW1_UUID -DEVICE_SW1_IP_ADDR = '192.168.6.38' +DEVICE_SW1_IP_ADDR = '192.168.5.131' DEVICE_SW1_PORT = '50001' DEVICE_SW1_VENDOR = 'Open Networking Foundation' DEVICE_SW1_HW_VER = 'BMv2 simple_switch' @@ -102,7 +102,7 @@ DEVICE_SW2 = json_device_p4_disabled(DEVICE_SW2_UUID) DEVICE_SW2_DPID = 1 DEVICE_SW2_NAME = DEVICE_SW2_UUID -DEVICE_SW2_IP_ADDR = '192.168.6.38' +DEVICE_SW2_IP_ADDR = '192.168.5.131' DEVICE_SW2_PORT = '50002' DEVICE_SW2_VENDOR = 'Open Networking Foundation' DEVICE_SW2_HW_VER = 'BMv2 simple_switch' @@ -140,7 +140,7 @@ DEVICE_SW3 = json_device_p4_disabled(DEVICE_SW3_UUID) DEVICE_SW3_DPID = 1 DEVICE_SW3_NAME = DEVICE_SW3_UUID -DEVICE_SW3_IP_ADDR = '192.168.6.38' +DEVICE_SW3_IP_ADDR = '192.168.5.131' DEVICE_SW3_PORT = '50003' DEVICE_SW3_VENDOR = 'Open Networking Foundation' DEVICE_SW3_HW_VER = 'BMv2 simple_switch' @@ -178,7 +178,7 @@ DEVICE_SW4 = json_device_p4_disabled(DEVICE_SW4_UUID) DEVICE_SW4_DPID = 1 DEVICE_SW4_NAME = DEVICE_SW4_UUID -DEVICE_SW4_IP_ADDR = '192.168.6.38' +DEVICE_SW4_IP_ADDR = '192.168.5.131' DEVICE_SW4_PORT = '50004' DEVICE_SW4_VENDOR = 'Open Networking Foundation' DEVICE_SW4_HW_VER = 'BMv2 simple_switch' @@ -216,7 +216,7 @@ DEVICE_SW5 = json_device_p4_disabled(DEVICE_SW5_UUID) DEVICE_SW5_DPID = 1 DEVICE_SW5_NAME = DEVICE_SW5_UUID -DEVICE_SW5_IP_ADDR = '192.168.6.38' +DEVICE_SW5_IP_ADDR = '192.168.5.131' DEVICE_SW5_PORT = '50005' DEVICE_SW5_VENDOR = 'Open Networking Foundation' DEVICE_SW5_HW_VER = 'BMv2 simple_switch' @@ -254,7 +254,7 @@ DEVICE_SW6 = json_device_p4_disabled(DEVICE_SW6_UUID) DEVICE_SW6_DPID = 1 DEVICE_SW6_NAME = DEVICE_SW6_UUID -DEVICE_SW6_IP_ADDR = '192.168.6.38' +DEVICE_SW6_IP_ADDR = '192.168.5.131' DEVICE_SW6_PORT = '50006' DEVICE_SW6_VENDOR = 'Open Networking Foundation' DEVICE_SW6_HW_VER = 'BMv2 simple_switch' @@ -292,7 +292,7 @@ DEVICE_SW7 = json_device_p4_disabled(DEVICE_SW7_UUID) DEVICE_SW7_DPID = 1 DEVICE_SW7_NAME = DEVICE_SW7_UUID -DEVICE_SW7_IP_ADDR = '192.168.6.38' +DEVICE_SW7_IP_ADDR = '192.168.5.131' DEVICE_SW7_PORT = '50007' DEVICE_SW7_VENDOR = 'Open Networking Foundation' DEVICE_SW7_HW_VER = 'BMv2 simple_switch' @@ -330,7 +330,7 @@ DEVICE_SW8 = json_device_p4_disabled(DEVICE_SW8_UUID) DEVICE_SW8_DPID = 1 DEVICE_SW8_NAME = DEVICE_SW8_UUID -DEVICE_SW8_IP_ADDR = '192.168.6.38' +DEVICE_SW8_IP_ADDR = '192.168.5.131' DEVICE_SW8_PORT = '50008' DEVICE_SW8_VENDOR = 'Open Networking Foundation' DEVICE_SW8_HW_VER = 'BMv2 simple_switch' diff --git a/src/tests/tools/mock_qkd_nodes/YangValidator.py b/src/tests/tools/mock_qkd_nodes/YangValidator.py new file mode 100644 index 0000000000000000000000000000000000000000..2056d5df64a1d841fc74c1be73aa6408051ab738 --- /dev/null +++ b/src/tests/tools/mock_qkd_nodes/YangValidator.py @@ -0,0 +1,42 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import libyang, os +from typing import Dict, Optional + +YANG_DIR = os.path.join(os.path.dirname(__file__), 'yang') + +class YangValidator: + def __init__(self, main_module : str, dependency_modules : [str]) -> None: + self._yang_context = libyang.Context(YANG_DIR) + + self._yang_module = self._yang_context.load_module(main_module) + mods = [self._yang_context.load_module(mod) for mod in dependency_modules] + [self._yang_module] + + for mod in mods: + mod.feature_enable_all() + + + + def parse_to_dict(self, message : Dict) -> Dict: + dnode : Optional[libyang.DNode] = self._yang_module.parse_data_dict( + message, validate_present=True, validate=True, strict=True + ) + if dnode is None: raise Exception('Unable to parse Message({:s})'.format(str(message))) + message = dnode.print_dict() + dnode.free() + return message + + def destroy(self) -> None: + self._yang_context.destroy() diff --git a/src/tests/tools/mock_qkd_nodes/start.sh b/src/tests/tools/mock_qkd_nodes/start.sh new file mode 100755 index 0000000000000000000000000000000000000000..89797b9c9496cdf58061c406ad2886be0d9c47f6 --- /dev/null +++ b/src/tests/tools/mock_qkd_nodes/start.sh @@ -0,0 +1,42 @@ +#!/bin/bash +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +#!/bin/bash +cd "$(dirname "$0")" + +# Function to kill all background processes +killbg() { + for p in "${pids[@]}" ; do + kill "$p"; + done +} + +trap killbg EXIT +pids=() + +# Set FLASK_APP and run the Flask instances on different ports +export FLASK_APP=wsgi +flask run --host 0.0.0.0 --port 11111 & +pids+=($!) + +flask run --host 0.0.0.0 --port 22222 & +pids+=($!) + +flask run --host 0.0.0.0 --port 33333 & +pids+=($!) + +# Wait for all background processes to finish +wait + diff --git a/src/tests/tools/mock_qkd_nodes/wsgi.py b/src/tests/tools/mock_qkd_nodes/wsgi.py new file mode 100644 index 0000000000000000000000000000000000000000..3f8847849337fbfb1a9f84c783786218db4fb04d --- /dev/null +++ b/src/tests/tools/mock_qkd_nodes/wsgi.py @@ -0,0 +1,368 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import os +from flask import Flask, request +from YangValidator import YangValidator + +app = Flask(__name__) + + +yang_validator = YangValidator('etsi-qkd-sdn-node', ['etsi-qkd-node-types']) + + +nodes = { + '10.0.2.10:11111': {'node': { + 'qkdn_id': '00000001-0000-0000-0000-000000000000', + }, + 'qkdn_capabilities': { + }, + 'qkd_applications': { + 'qkd_app': [ + { + 'app_id': '00000001-0001-0000-0000-000000000000', + 'client_app_id': [], + 'app_statistics': { + 'statistics': [] + }, + 'app_qos': { + }, + 'backing_qkdl_id': [] + } + ] + }, + 'qkd_interfaces': { + 'qkd_interface': [ + { + 'qkdi_id': '100', + 'qkdi_att_point': { + }, + 'qkdi_capabilities': { + } + }, + { + 'qkdi_id': '101', + 'qkdi_att_point': { + 'device':'10.0.2.10', + 'port':'1001' + }, + 'qkdi_capabilities': { + } + } + ] + }, + 'qkd_links': { + 'qkd_link': [ + + ] + } + }, + + '10.0.2.10:22222': {'node': { + 'qkdn_id': '00000002-0000-0000-0000-000000000000', + }, + 'qkdn_capabilities': { + }, + 'qkd_applications': { + 'qkd_app': [ + { + 'app_id': '00000002-0001-0000-0000-000000000000', + 'client_app_id': [], + 'app_statistics': { + 'statistics': [] + }, + 'app_qos': { + }, + 'backing_qkdl_id': [] + } + ] + }, + 'qkd_interfaces': { + 'qkd_interface': [ + { + 'qkdi_id': '200', + 'qkdi_att_point': { + }, + 'qkdi_capabilities': { + } + }, + { + 'qkdi_id': '201', + 'qkdi_att_point': { + 'device':'10.0.2.10', + 'port':'2001' + }, + 'qkdi_capabilities': { + } + }, + { + 'qkdi_id': '202', + 'qkdi_att_point': { + 'device':'10.0.2.10', + 'port':'2002' + }, + 'qkdi_capabilities': { + } + } + ] + }, + 'qkd_links': { + 'qkd_link': [ + + ] + } + }, + + '10.0.2.10:33333': {'node': { + 'qkdn_id': '00000003-0000-0000-0000-000000000000', + }, + 'qkdn_capabilities': { + }, + 'qkd_applications': { + 'qkd_app': [ + { + 'app_id': '00000003-0001-0000-0000-000000000000', + 'client_app_id': [], + 'app_statistics': { + 'statistics': [] + }, + 'app_qos': { + }, + 'backing_qkdl_id': [] + } + ] + }, + 'qkd_interfaces': { + 'qkd_interface': [ + { + 'qkdi_id': '300', + 'qkdi_att_point': { + }, + 'qkdi_capabilities': { + } + }, + { + 'qkdi_id': '301', + 'qkdi_att_point': { + 'device':'10.0.2.10', + 'port':'3001' + }, + 'qkdi_capabilities': { + } + } + ] + }, + 'qkd_links': { + 'qkd_link': [ + + ] + } + } +} + + +def get_side_effect(url): + + steps = url.lstrip('https://').lstrip('http://').rstrip('/') + ip_port, _, _, header, *steps = steps.split('/') + + header_splitted = header.split(':') + + module = header_splitted[0] + assert(module == 'etsi-qkd-sdn-node') + + tree = {'qkd_node': nodes[ip_port]['node'].copy()} + + if len(header_splitted) == 1 or not header_splitted[1]: + value = nodes[ip_port].copy() + value.pop('node') + tree['qkd_node'].update(value) + + return tree, tree + + root = header_splitted[1] + assert(root == 'qkd_node') + + if not steps: + return tree, tree + + + endpoint, *steps = steps + + value = nodes[ip_port][endpoint] + + if not steps: + return_value = {endpoint:value} + tree['qkd_node'].update(return_value) + + return return_value, tree + + + + ''' + element, *steps = steps + + container, key = element.split('=') + + # value = value[container][key] + + if not steps: + return_value['qkd_node'][endpoint] = [value] + return return_value + + ''' + raise Exception('Url too long') + + + +def edit(from_dict, to_dict, create): + for key, value in from_dict.items(): + if isinstance(value, dict): + if key not in to_dict and create: + to_dict[key] = {} + edit(from_dict[key], to_dict[key], create) + elif isinstance(value, list): + to_dict[key].extend(value) + else: + to_dict[key] = value + + + +def edit_side_effect(url, json, create): + steps = url.lstrip('https://').lstrip('http://').rstrip('/') + ip_port, _, _, header, *steps = steps.split('/') + + module, root = header.split(':') + + assert(module == 'etsi-qkd-sdn-node') + assert(root == 'qkd_node') + + if not steps: + edit(json, nodes[ip_port]['node']) + return + + endpoint, *steps = steps + + if not steps: + edit(json[endpoint], nodes[ip_port][endpoint], create) + return + + + ''' + element, *steps = steps + + container, key = element.split('=') + + if not steps: + if key not in nodes[ip_port][endpoint][container] and create: + nodes[ip_port][endpoint][container][key] = {} + + edit(json, nodes[ip_port][endpoint][container][key], create) + return 0 + ''' + + raise Exception('Url too long') + + + + + + +@app.get('/', defaults={'path': ''}) +@app.get("/<string:path>") +@app.get('/<path:path>') +def get(path): + msg, msg_validate = get_side_effect(request.base_url) + print(msg_validate) + yang_validator.parse_to_dict(msg_validate) + return msg + + +@app.post('/', defaults={'path': ''}) +@app.post("/<string:path>") +@app.post('/<path:path>') +def post(path): + success = True + reason = '' + try: + edit_side_effect(request.base_url, request.json, True) + except Exception as e: + reason = str(e) + success = False + return {'success': success, 'reason': reason} + + + +@app.route('/', defaults={'path': ''}, methods=['PUT', 'PATCH']) +@app.route("/<string:path>", methods=['PUT', 'PATCH']) +@app.route('/<path:path>', methods=['PUT', 'PATCH']) +def patch(path): + success = True + reason = '' + try: + edit_side_effect(request.base_url, request.json, False) + except Exception as e: + reason = str(e) + success = False + return {'success': success, 'reason': reason} + + + + + +# import json +# from mock import requests +# import pyangbind.lib.pybindJSON as enc +# from pyangbind.lib.serialise import pybindJSONDecoder as dec +# from yang.sbi.qkd.templates.etsi_qkd_sdn_node import etsi_qkd_sdn_node + +# module = etsi_qkd_sdn_node() +# url = 'https://1.1.1.1/restconf/data/etsi-qkd-sdn-node:' + +# # Get node all info +# z = requests.get(url).json() +# var = dec.load_json(z, None, None, obj=module) +# print(enc.dumps(var)) + + +# Reset module variable because it is already filled +# module = etsi_qkd_sdn_node() + +# # Get node basic info +# node = module.qkd_node +# z = requests.get(url + 'qkd_node').json() +# var = dec.load_json(z, None, None, obj=node) +# print(enc.dumps(var)) + + +# # Get all apps +# apps = node.qkd_applications +# z = requests.get(url + 'qkd_node/qkd_applications').json() +# var = dec.load_json(z, None, None, obj=apps) +# print(enc.dumps(var)) + +# # Edit app 0 +# app = apps.qkd_app['00000000-0001-0000-0000-000000000000'] +# app.client_app_id = 'id_0' +# requests.put(url + 'qkd_node/qkd_applications/qkd_app=00000000-0001-0000-0000-000000000000', json=json.loads(enc.dumps(app))) + +# # Create app 1 +# app = apps.qkd_app.add('00000000-0001-0000-0000-000000000001') +# requests.post(url + 'qkd_node/qkd_applications/qkd_app=00000000-0001-0000-0000-000000000001', json=json.loads(enc.dumps(app))) + +# # Get all apps +# apps = node.qkd_applications +# z = requests.get(url + 'qkd_node/qkd_applications').json() +# var = dec.load_json(z, None, None, obj=apps) +# print(enc.dumps(var)) diff --git a/src/tests/tools/mock_qkd_nodes/yang/etsi-qkd-node-types.yang b/src/tests/tools/mock_qkd_nodes/yang/etsi-qkd-node-types.yang new file mode 100644 index 0000000000000000000000000000000000000000..04bbd8a875445a9bcf19266f21b792439bf9005c --- /dev/null +++ b/src/tests/tools/mock_qkd_nodes/yang/etsi-qkd-node-types.yang @@ -0,0 +1,326 @@ +/* Copyright 2022 ETSI +Licensed under the BSD-3 Clause (https://forge.etsi.org/legal-matters) */ + +module etsi-qkd-node-types { + + yang-version "1"; + + namespace "urn:etsi:qkd:yang:etsi-qkd-node-types"; + + prefix "etsi-qkdn-types"; + + organization "ETSI ISG QKD"; + + contact + "https://www.etsi.org/committee/qkd + vicente@fi.upm.es"; + + description + "This module contains the base types created for + the software-defined QKD node information models + specified in ETSI GS QKD 015 V2.1.1 + - QKD-TECHNOLOGY-TYPES + - QKDN-STATUS-TYPES + - QKD-LINK-TYPES + - QKD-ROLE-TYPES + - QKD-APP-TYPES + - Wavelength + "; + + revision "2022-01-30" { + description + "Refinement of the YANG model to make it compatible with the ETSI ISG QKD 018. Minor fixes."; + } + + revision "2020-09-30" { + description + "First definition based on initial requirement analysis."; + } + + identity QKD-TECHNOLOGY-TYPES { + description "Quantum Key Distribution System base technology types."; + } + + identity CV-QKD { + base QKD-TECHNOLOGY-TYPES; + description "Continuous Variable base technology."; + } + + identity DV-QKD { + base QKD-TECHNOLOGY-TYPES; + description "Discrete Variable base technology."; + } + + identity DV-QKD-COW { + base QKD-TECHNOLOGY-TYPES; + description "COW base technology."; + } + + identity DV-QKD-2Ws { + base QKD-TECHNOLOGY-TYPES; + description "2-Ways base technology."; + } + + typedef qkd-technology-types { + type identityref { + base QKD-TECHNOLOGY-TYPES; + } + description "This type represents the base technology types of the SD-QKD system."; + } + + identity QKDN-STATUS-TYPES { + description "Base identity used to identify the SD-QKD node status."; + } + + identity NEW { + base QKDN-STATUS-TYPES; + description "The QKD node is installed."; + } + + identity OPERATING { + base QKDN-STATUS-TYPES; + description "The QKD node is up."; + } + + identity DOWN { + base QKDN-STATUS-TYPES; + description "The QKD node is not working as expected."; + } + + identity FAILURE { + base QKDN-STATUS-TYPES; + description "The QKD node cannot be accessed by SDN controller with communication failure."; + } + + identity OUT { + base QKDN-STATUS-TYPES; + description "The QKD node is switched off and uninstalled."; + } + + typedef qkdn-status-types { + type identityref { + base QKDN-STATUS-TYPES; + } + description "This type represents the status of the SD-QKD node."; + } + + identity QKD-LINK-TYPES { + description "QKD key association link types."; + } + + identity VIRT { + base QKD-LINK-TYPES; + description "Virtual Link."; + } + + identity PHYS { + base QKD-LINK-TYPES; + description "Physical Link."; + } + + typedef qkd-link-types { + type identityref { + base QKD-LINK-TYPES; + } + description "This type represents the key association link type between two SD-QKD nodes."; + } + + identity QKD-ROLE-TYPES { + description "QKD Role Type."; + } + + identity TRANSMITTER { + base QKD-ROLE-TYPES; + description "QKD module working as transmitter."; + } + + identity RECEIVER { + base QKD-ROLE-TYPES; + description "QKD module working as receiver."; + } + + identity TRANSCEIVER { + base QKD-ROLE-TYPES; + description "QKD System that can work as a transmitter or receiver."; + } + + typedef qkd-role-types { + type identityref { + base QKD-ROLE-TYPES; + } + description "This type represents the working mode of a SD-QKD module."; + } + + identity QKD-APP-TYPES { + description "Application types."; + } + + identity CLIENT { + base QKD-APP-TYPES; + description "Application working as client."; + } + + identity INTERNAL { + base QKD-APP-TYPES; + description "Internal QKD node application."; + } + + typedef qkd-app-types { + type identityref { + base QKD-APP-TYPES; + } + description "This type represents the application class consuming key from SD-QKD nodes."; + } + + identity PHYS-PERF-TYPES { + description "Physical performance types."; + } + + identity QBER { + base PHYS-PERF-TYPES; + description "Quantum Bit Error Rate."; + } + + identity SNR { + base PHYS-PERF-TYPES; + description "Signal to Noise Ratio."; + } + + typedef phys-perf-types { + type identityref { + base PHYS-PERF-TYPES; + } + description "This type represents physical performance types."; + } + + identity LINK-STATUS-TYPES { + description "Status of the key association QKD link (physical and virtual)."; + } + + identity ACTIVE { + base LINK-STATUS-TYPES; + description "Link actively generating keys."; + } + + identity PASSIVE { + base LINK-STATUS-TYPES; + description "No key generation on key association QKD link but a pool of keys + are still available."; + } + + identity PENDING { + base LINK-STATUS-TYPES; + description "Waiting for activation and no keys are available."; + } + + identity OFF { + base LINK-STATUS-TYPES; + description "No key generation and no keys are available."; + } + + typedef link-status-types { + type identityref { + base LINK-STATUS-TYPES; + } + description "This type represents the status of a key association QKD link, both physical and virtual."; + } + + /// + + identity IFACE-STATUS-TYPES { + description "Interface Status."; + } + + identity ENABLED { + base IFACE-STATUS-TYPES; + description "The interfaces is up."; + } + + identity DISABLED { + base IFACE-STATUS-TYPES; + description "The interfaces is down."; + } + + identity FAILED { + base IFACE-STATUS-TYPES; + description "The interfaces has failed."; + } + + typedef iface-status-types { + type identityref { + base IFACE-STATUS-TYPES; + } + description "This type represents the status of a interface between a SD-QKD node and a SD-QKD module."; + } + + identity APP-STATUS-TYPES { + description "Application types."; + } + + identity ON { + base APP-STATUS-TYPES; + description "The application is on."; + } + + identity DISCONNECTED { + base APP-STATUS-TYPES; + description "The application is disconnected."; + } + + identity OUT-OF-TIME { + base APP-STATUS-TYPES; + description "The application is out of time."; + } + + identity ZOMBIE { + base APP-STATUS-TYPES; + description "The application is in a zombie state."; + } + + typedef app-status-types { + type identityref { + base APP-STATUS-TYPES; + } + description "This type represents the status of an application consuming key from SD-QKD nodes."; + } + + identity SEVERITY-TYPES { + description "Error/Failure severity levels."; + } + + identity MAJOR { + base SEVERITY-TYPES; + description "Major error/failure."; + } + + identity MINOR { + base SEVERITY-TYPES; + description "Minor error/failure."; + } + + typedef severity-types { + type identityref { + base SEVERITY-TYPES; + } + description "This type represents the Error/Failure severity levels."; + } + + typedef wavelength { + type string { + pattern "([1-9][0-9]{0,3})"; + } + description + "A WDM channel number (starting at 1). For example: 20"; + } + + //Pattern from "A Yang Data Model for WSON Optical Networks". + typedef wavelength-range-type { + type string { + pattern "([1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?" + + "(,[1-9][0-9]{0,3}(-[1-9][0-9]{0,3})?)*)"; + } + description + "A list of WDM channel numbers (starting at 1) + in ascending order. For example: 1,12-20,40,50-80"; + } +} diff --git a/src/tests/tools/mock_qkd_nodes/yang/etsi-qkd-sdn-node.yang b/src/tests/tools/mock_qkd_nodes/yang/etsi-qkd-sdn-node.yang new file mode 100644 index 0000000000000000000000000000000000000000..d07004cdc5b558adc5a9c0b6acb32adac0d7cc11 --- /dev/null +++ b/src/tests/tools/mock_qkd_nodes/yang/etsi-qkd-sdn-node.yang @@ -0,0 +1,941 @@ +/* Copyright 2022 ETSI +Licensed under the BSD-3 Clause (https://forge.etsi.org/legal-matters) */ + +module etsi-qkd-sdn-node { + + yang-version "1"; + + namespace "urn:etsi:qkd:yang:etsi-qkd-node"; + + prefix "etsi-qkdn"; + + import ietf-yang-types { prefix "yang"; } + import ietf-inet-types { prefix "inet"; } + import etsi-qkd-node-types { prefix "etsi-qkdn-types"; } + + // meta + organization "ETSI ISG QKD"; + + contact + "https://www.etsi.org/committee/qkd + vicente@fi.upm.es"; + + description + "This module contains the groupings and containers composing + the software-defined QKD node information models + specified in ETSI GS QKD 015 V2.1.1"; + + revision "2022-01-30" { + description + "Refinement of the YANG model to make it compatible with the ETSI ISG QKD 018. Minor fixes."; + reference + "ETSI GS QKD 015 V2.1.1 (2022-01)"; + } + + revision "2020-09-30" { + description + "First definition based on initial requirement analysis."; + reference + "ETSI GS QKD 015 V1.1.1 (2021-03)"; + } + + grouping qkdn_id { + description "Grouping of qkdn_id leaf."; + + leaf qkdn_id { + type yang:uuid; + mandatory true; + description + "This value reflects the unique ID of the SD-QKD node."; + } + } + + grouping qkdn_version { + description "Grouping of qkdn_version leaf."; + + leaf qkdn_version { + type string; + description "Hardware or software version of the SD-QKD node."; + } + } + + grouping qkdn_location_id { + description "Grouping of qkdn_location_id leaf."; + + leaf qkdn_location_id { + type string; + default ""; + description + "This value enables the location of the secure + area that contains the SD-QKD node to be specified."; + } + } + + grouping qkdn_status { + description "Grouping of qkdn_status leaf."; + + leaf qkdn_status { + type etsi-qkdn-types:qkdn-status-types; + config false; + description "Status of the SD-QKD node."; + } + } + + grouping qkdn_capabilities { + description "Grouping of the capabilities of the SD-QKD node."; + + container qkdn_capabilities { + description "Capabilities of the SD-QKD node."; + + leaf link_stats_support { + type boolean; + default true; + description + "If true, this node exposes link-related statistics (secure key + generation rate-SKR, link consumption, status, QBER)."; + } + + leaf application_stats_support { + type boolean; + default true; + description "If true, this node exposes application related + statistics (application consumption, alerts)."; + } + + leaf key_relay_mode_enable { + type boolean; + default true; + description "If true, this node supports key relay (multi-hop) mode services."; + } + } + } + + grouping app_id { + description "Grouping of app_id leaf."; + + leaf app_id { + type yang:uuid; + description + "Unique ID that identifies a QKD application consisting of a set of entities + that are allowed to receive keys shared with each other from the SD-QKD nodes + they connect to. This value is similar to a key ID or key handle."; + } + } + + grouping app_basic { + description "Grouping of app's basic parameters."; + + uses app_id; + + leaf app_status { + type etsi-qkdn-types:app-status-types; + config false; + description "Status of the application."; + } + } + + grouping app_priority { + description "Grouping of app_priority leaf."; + + leaf app_priority { + type uint32; + default 0; + description "Priority of the association/application + might be defined by the user but usually + handled by a network administrator."; + } + } + + grouping app_details { + description "Grouping of app's details parameters."; + + leaf app_type { + type etsi-qkdn-types:qkd-app-types; + description "Type of the registered application. These + values, defined within the types module, can be client + (if an external applications requesting keys) + or internal (application is defined to maintain + the QKD - e.g. multi-hop, authentication or + other encryption operations)."; + } + + leaf server_app_id { + type inet:uri; + description "ID that identifies the entity that initiated the + creation of the QKD application to receive keys shared with one + or more specified target entity identified by client_app_id. + It is a client in the interface to the SD-QKD node and the name + server_app_id reflects that it requested the QKD application to + be initiated."; + } + + leaf-list client_app_id { + type inet:uri; + description "List of IDs that identifies the one or more + entities that are allowed to receive keys from SD-QKD + node(s) under the QKD application in addition to the + initiating entity identified by server_app_id."; + } + + uses app_priority; + } + + grouping local_qkdn_id { + description "Grouping of local_qkdn_id leaf."; + + leaf local_qkdn_id { + type yang:uuid; + description "Unique ID of the local SD-QKD node which + is providing QKD keys to the local application."; + } + } + + grouping app_time { + description "Grouping of app's time parameters."; + + leaf creation_time { + type yang:date-and-time; + config false; + description "Date and time of the service creation."; + } + + leaf expiration_time { + type yang:date-and-time; + description "Date and time of the service expiration."; + } + } + + grouping app_statistics { + description "Grouping of app's statistic parameters."; + + container app_statistics { + description "Statistical information relating to a specific statistic period of time."; + + list statistics { + key "end_time"; + config false; + description "List of statistics."; + + leaf end_time { + type yang:date-and-time; + config false; + description "End time for the statistic period."; + } + + leaf start_time { + type yang:date-and-time; + config false; + description "Start time for the statistic period."; + } + + leaf consumed_bits { + type uint32; + config false; + description "Consumed secret key amount (in bits) for a statistics collection period of time."; + } + } + } + } + + grouping app_qos { + description "Grouping of app's basic qos parameters."; + + container app_qos { + description "Requested Quality of Service."; + + leaf max_bandwidth { + type uint32; + description "Maximum bandwidth (in bits per second) allowed for + this specific application. Exceeding this value will raise an + error from the local key store to the appl. This value might + be internally configured (or by an admin) with a default value."; + } + + leaf min_bandwidth { + type uint32; + description "This value is an optional QoS parameter which + enables to require a minimum key rate (in bits per second) + for the application."; + } + + leaf jitter { + type uint32; + description "This value allows to specify the maximum jitter + (in msec) to be provided by the key delivery API for + applications requiring fast rekeying. This value can be + coordinated with the other QoS to provide a wide enough + QoS definition."; + } + + leaf ttl { + type uint32; + description "This value is used to specify the maximum time + (in seconds) that a key could be kept in the key store for + a given application without being used."; + } + } + } + + grouping augmented_app_qos { + description "Grouping of app's detailed qos parameters."; + + uses app_qos { + augment app_qos { + description "Augmentation of app's basic parameters with app's detailed qos parameters."; + + leaf clients_shared_path_enable { + type boolean; + default false; + description "If true, multiple clients for this + application might share keys to reduce service + impact (consumption)."; + } + + leaf clients_shared_keys_required { + type boolean; + default false; + description "If true, multiple clients for this application + might share keys to reduce service impact (consumption)."; + } + } + } + } + + grouping qkd_applications { + description "Grouping of the list of applications container."; + + container qkd_applications { + description "List of applications container."; + + list qkd_app { + key "app_id"; + description "List of applications that are currently registered + in the SD-QKD node. Any entity consuming QKD-derived keys (either + for internal or external purposes) is considered an application."; + + uses app_basic; + + uses app_details; + + uses app_time; + + uses app_statistics; + + uses augmented_app_qos; + + leaf-list backing_qkdl_id { + type yang:uuid; + description "Unique ID of the key association link which is + providing QKD keys to these applications."; + } + + uses local_qkdn_id; + + leaf remote_qkdn_id { + type yang:uuid; + description "Unique ID of the remote SD-QKD node which + is providing QKD keys to the remote application. + While unknown, the local SD-QKD will not be able to + provide keys to the local application."; + } + } + } + } + + grouping qkdi_status { + description "Grouping of qkdi_status leaf."; + + leaf qkdi_status { + type etsi-qkdn-types:iface-status-types; + config false; + description "Status of a QKD interface of the SD-QKD node."; + } + } + + grouping qkdi_model { + description "Grouping of qkdi_model leaf."; + + leaf qkdi_model { + type string; + description "Device model (vendor/device)."; + } + } + + grouping qkdi_type { + description "Grouping of qkdi_type leaf."; + + leaf qkdi_type { + type etsi-qkdn-types:qkd-technology-types; + description "Interface type (QKD technology)."; + } + } + + grouping qkdi_att_point { + description "Grouping of the interface attachment points to an optical switch."; + + container qkdi_att_point { + description "Interface attachment point to an optical switch."; + + leaf device { + type string; + description "Unique ID of the optical switch (or + passive component) to which the interface is connected."; + } + + leaf port { + type uint32; + description "Port ID of the device to which the interface + is connected."; + } + } + } + + grouping qkdi_id { + description "Grouping of qkdi_id leaf."; + + leaf qkdi_id { + type uint32; + description "Interface id. It is described as a locally unique number, + which is globally unique when combined with the SD-QKD node ID."; + } + } + + grouping qkd_interface_item { + description "Grouping of the interface parameters."; + + uses qkdi_id; + + uses qkdi_model; + + uses qkdi_type; + + uses qkdi_att_point; + + container qkdi_capabilities { + description "Capabilities of the QKD system (interface)."; + + leaf role_support { + type etsi-qkdn-types:qkd-role-types; + description "QKD node support for key relay mode services."; + } + + leaf wavelength_range { + type etsi-qkdn-types:wavelength-range-type; + description "Range of supported wavelengths (nm) (multiple + if it contains a tunable laser)."; + } + + leaf max_absorption { + type decimal64 { + fraction-digits 3; + } + description "Maximum absorption supported (in dB)."; + } + } + } + + grouping qkd_interfaces { + description "Grouping of the list of interfaces."; + + container qkd_interfaces { + description "List of interfaces container."; + + list qkd_interface { + key "qkdi_id"; + description "List of physical QKD modules in a secure location, + abstracted as interfaces of the SD-QKD node."; + + uses qkd_interface_item; + + uses qkdi_status; + + } + } + } + + grouping qkdl_id { + description "Grouping of qkdl_id leaf."; + + leaf qkdl_id { + type yang:uuid; + description "Unique ID of the QKD link (key association)."; + } + } + + grouping qkdl_status { + description "Grouping of qkdl_status leaf."; + + leaf qkdl_status { + type etsi-qkdn-types:link-status-types; + description "Status of the QKD key association link."; + } + } + + grouping common_performance { + description "Grouping of common performance parameters."; + + leaf expected_consumption { + type uint32; + config false; + description "Sum of all the application's bandwidth (in bits per + second) on this particular key association link."; + } + + leaf skr { + type uint32; + config false; + description "Secret key rate generation (in bits per second) + of the key association link."; + } + + leaf eskr { + type uint32; + config false; + description "Effective secret key rate (in bits per second) generation + of the key association link available after internal consumption."; + } + } + + grouping physical_link_perf { + description "Grouping of the list of physical performance parameters."; + + list phys_perf { + key "perf_type"; + config false; + description "List of physical performance parameters."; + + leaf perf_type { + type etsi-qkdn-types:phys-perf-types; + config false; + description "Type of the physical performance value to be + exposed to the controller."; + } + + leaf value { + type decimal64 { + fraction-digits 3; + } + config false; + description "Numerical value for the performance parameter + type specified above."; + } + } + } + + grouping virtual_link_spec { + description "Grouping of the virtual link's parameters."; + + leaf virt_prev_hop { + type yang:uuid; + description "Previous hop in a multi-hop/virtual key + association link config."; + } + + leaf-list virt_next_hop { + type yang:uuid; + description "Next hop(s) in a multihop/virtual key + association link config. Defined as a list for multicast + over shared sub-paths."; + } + + leaf virt_bandwidth { + type uint32; + description "Required bandwidth (in bits per second) for that key association link. + Used to reserve bandwidth from the physical QKD links to support the virtual key + association link as an internal application."; + } + } + + grouping physical_link_spec { + description "Grouping of the physical link's parameters."; + + leaf phys_channel_att { + type decimal64 { + fraction-digits 3; + } + description "Expected attenuation on the quantum channel (in dB) + between the Source/qkd_node and Destination/qkd_node."; + + } + + leaf phys_wavelength { + type etsi-qkdn-types:wavelength; + description "Wavelength (in nm) to be used for the quantum channel. + If the interface is not tunable, this configuration could be bypassed"; + } + + leaf phys_qkd_role { + type etsi-qkdn-types:qkd-role-types; + description "Transmitter/receiver mode for the QKD module. + If there is no multi-role support, this could be ignored."; + } + } + + grouping qkd_links { + description "Grouping of the list of links."; + + container qkd_links { + description "List of links container"; + + list qkd_link { + key "qkdl_id"; + description "List of (key association) links to other SD-QKD nodes in the network. + The links can be physical (direct quantum channel) or virtual multi-hop + connection doing key-relay through several nodes."; + + uses qkdl_id; + + uses qkdl_status; + + leaf qkdl_enable { + type boolean; + default true; + description "This value allows to enable of disable the key generation + process for a given link."; + + } + + container qkdl_local { + description "Source (local) node of the SD-QKD link."; + + leaf qkdn_id { + type yang:uuid; + description "Unique ID of the local SD-QKD node."; + } + + leaf qkdi_id { + type uint32; + description "Interface used to create the key association link."; + } + } + + container qkdl_remote { + description "Destination (remote) unique SD-QKD node."; + + leaf qkdn_id { + type yang:uuid; + description "Unique ID of the remote SD-QKD node. This value is + provided by the SDN controller when the key association link + request arrives."; + } + + leaf qkdi_id { + type uint32; + description "Interface used to create the link."; + } + } + + leaf qkdl_type { + type etsi-qkdn-types:qkd-link-types; + description "Key Association Link type: Virtual (multi-hop) or Direct."; + } + + leaf-list qkdl_applications { + type yang:uuid; + description "Applications which are consuming keys from + this key association link."; + } + + uses virtual_link_spec { + when "qkdl_type = 'etsi-qkd-node-types:VIRT'" { + description "Virtual key association link specific configuration."; + } + } + + uses physical_link_spec { + when "qkdl_type = 'etsi-qkd-node-types:PHYS'" { + description "Physical key association link specific configuration."; + } + } + + container qkdl_performance { + description "Container of link's performace parameters."; + + uses common_performance; + + uses physical_link_perf { + when "../qkdl_type = 'PHYS'" { + description "Performance of the specific physical link."; + } + } + } + } + } + } + + container qkd_node { + description + "Top module describing a software-defined QKD node (SD-QKD node)."; + + uses qkdn_id; + + uses qkdn_status; + + uses qkdn_version; + + uses qkdn_location_id; + + uses qkdn_capabilities; + + uses qkd_applications; + + uses qkd_interfaces; + + uses qkd_links; + } + + grouping message { + description "Grouping of message leaf."; + + leaf message { + type string; + description "Placeholder for the message."; + } + } + + grouping severity { + description "Grouping of severity leaf."; + + leaf severity { + type etsi-qkdn-types:severity-types; + description "Placeholder for the severity."; + } + } + + grouping reason { + description "Grouping of reason leaf."; + + leaf reason { + type string; + description "Auxiliary parameter to include additional + information about the reason for link failure."; + } + } + + notification sdqkdn_application_new { + description "Defined for the controller to detect new applications + requesting keys from a QKD node. This maps with the workflow shown + in clause 5.2 'QKD Application Registration'. Parameters such as + client and server app IDs, local QKD node identifier, priority and + QoS are sent in the notification."; + + container qkd_application { + description "'sdqkdn_application_new' notification's qkd_application parameters."; + + uses app_details; + + uses local_qkdn_id; + + uses augmented_app_qos; + + } + } + + notification sdqkdn_application_qos_update { + description "Notification that includes information about priority or + QoS changes on an existing and already registered application."; + + container qkd_application { + description "'sdqkdn_application_qos_update' notification's qkd_application parameters."; + + uses app_id; + + uses augmented_app_qos; + + uses app_priority; + + } + } + + notification sdqkdn_application_disconnected { + description "Includes the application identifier to inform that the + application is no longer registered and active in the QKD node."; + + container qkd_application { + description "'sdqkdn_application_disconnected' notification's qkd_application parameters."; + + uses app_id; + + } + } + + notification sdqkdn_interface_new { + description "Includes all the information about the new QKD system + installed in the secure location of a given QKD node."; + + container qkd_interface { + description "'sdqkdn_interface_new' notification's qkd_interface parameters."; + + uses qkd_interface_item; + + } + } + + notification sdqkdn_interface_down { + description "Identifies an interface within a QKD node which is not + working as expected, allowing additional information to be included + in a 'reason' string field."; + + container qkd_interface { + description "'sdqkdn_interface_down' notification's qkd_interface parameters."; + + uses qkdi_id; + + uses reason; + + } + } + + notification sdqkdn_interface_out { + description "Contains the ID of an interface which is switch off and + uninstall from a QKD node. This information can be gathered from this + notification or from regular polling from the controller's side."; + + container qkd_interface { + description "'sdqkdn_interface_out' notification's qkd_interface parameters."; + + uses qkdi_id; + + } + } + + notification sdqkdn_link_down { + description "As in the interface down event, this notification contains + the identifier of a given link which has gone down unexpectedly. + In addition, further information can be sent in the 'reason' field."; + + container qkd_link { + description "'sdqkdn_link_down' notification's qkd_link parameters."; + + uses qkdl_id; + + uses reason; + + } + } + + notification sdqkdn_link_perf_update { + description "This notification allows to inform of any mayor + modification in the performance of an active link. The identifier + of the link is sent together with the performance parameters of the link."; + + container qkd_link { + description "'sdqkdn_link_perf_update' notification's qkd_link parameters."; + + uses qkdl_id; + + container performance { + description "'sdqkdn_link_perf_update' notification's performance parameters."; + + uses common_performance; + + uses physical_link_perf; + + } + } + } + + notification sdqkdn_link_overloaded { + description "This notification is sent when the link cannot cope with the + demand. The link identifier is sent with the expected consumption and + general performance parameters."; + + container qkd_link { + description "'sdqkdn_link_overloaded' notification's qkd_link parameters."; + + uses qkdl_id; + + container performance { + description "'sdqkdn_link_overloaded' notification's performance parameters."; + + uses common_performance; + + } + } + } + + notification alarm { + description "'alarm' notification."; + + container link { + description "'alarm' notification's link parameters."; + + uses qkdl_id; + + uses qkdl_status; + + uses message; + + uses severity; + + } + + container interface { + description "'alarm' notification's interface parameters."; + + uses qkdi_id; + + uses qkdi_status; + + uses message; + + uses severity; + + } + + container application { + description "'alarm' notification's application parameters."; + + uses app_basic; + + uses message; + + uses severity; + + } + + } + + notification event { + description "'event' notification."; + + container link { + description "'alarm' notification's link parameters."; + + uses qkdl_id; + + uses qkdl_status; + + uses message; + + uses severity; + + } + + container interface { + description "'alarm' notification's interface parameters."; + + uses qkdi_id; + + uses qkdi_status; + + uses message; + + uses severity; + + } + + container application { + description "'alarm' notification's application parameters."; + + uses app_basic; + + uses message; + + uses severity; + + } + + } + +} diff --git a/src/tests/tools/mock_qkd_nodes/yang/ietf-inet-types.yang b/src/tests/tools/mock_qkd_nodes/yang/ietf-inet-types.yang new file mode 100644 index 0000000000000000000000000000000000000000..eacefb6363de1beb543567a0fa705571b7dc57a2 --- /dev/null +++ b/src/tests/tools/mock_qkd_nodes/yang/ietf-inet-types.yang @@ -0,0 +1,458 @@ +module ietf-inet-types { + + namespace "urn:ietf:params:xml:ns:yang:ietf-inet-types"; + prefix "inet"; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: David Kessens + <mailto:david.kessens@nsn.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This module contains a collection of generally useful derived + YANG data types for Internet addresses and related things. + + Copyright (c) 2013 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6991; see + the RFC itself for full legal notices."; + + revision 2013-07-15 { + description + "This revision adds the following new data types: + - ip-address-no-zone + - ipv4-address-no-zone + - ipv6-address-no-zone"; + reference + "RFC 6991: Common YANG Data Types"; + } + + revision 2010-09-24 { + description + "Initial revision."; + reference + "RFC 6021: Common YANG Data Types"; + } + + /*** collection of types related to protocol fields ***/ + + typedef ip-version { + type enumeration { + enum unknown { + value "0"; + description + "An unknown or unspecified version of the Internet + protocol."; + } + enum ipv4 { + value "1"; + description + "The IPv4 protocol as defined in RFC 791."; + } + enum ipv6 { + value "2"; + description + "The IPv6 protocol as defined in RFC 2460."; + } + } + description + "This value represents the version of the IP protocol. + + In the value set and its semantics, this type is equivalent + to the InetVersion textual convention of the SMIv2."; + reference + "RFC 791: Internet Protocol + RFC 2460: Internet Protocol, Version 6 (IPv6) Specification + RFC 4001: Textual Conventions for Internet Network Addresses"; + } + + typedef dscp { + type uint8 { + range "0..63"; + } + description + "The dscp type represents a Differentiated Services Code Point + that may be used for marking packets in a traffic stream. + In the value set and its semantics, this type is equivalent + to the Dscp textual convention of the SMIv2."; + reference + "RFC 3289: Management Information Base for the Differentiated + Services Architecture + RFC 2474: Definition of the Differentiated Services Field + (DS Field) in the IPv4 and IPv6 Headers + RFC 2780: IANA Allocation Guidelines For Values In + the Internet Protocol and Related Headers"; + } + + typedef ipv6-flow-label { + type uint32 { + range "0..1048575"; + } + description + "The ipv6-flow-label type represents the flow identifier or Flow + Label in an IPv6 packet header that may be used to + discriminate traffic flows. + + In the value set and its semantics, this type is equivalent + to the IPv6FlowLabel textual convention of the SMIv2."; + reference + "RFC 3595: Textual Conventions for IPv6 Flow Label + RFC 2460: Internet Protocol, Version 6 (IPv6) Specification"; + } + + typedef port-number { + type uint16 { + range "0..65535"; + } + description + "The port-number type represents a 16-bit port number of an + Internet transport-layer protocol such as UDP, TCP, DCCP, or + SCTP. Port numbers are assigned by IANA. A current list of + all assignments is available from <http://www.iana.org/>. + + Note that the port number value zero is reserved by IANA. In + situations where the value zero does not make sense, it can + be excluded by subtyping the port-number type. + In the value set and its semantics, this type is equivalent + to the InetPortNumber textual convention of the SMIv2."; + reference + "RFC 768: User Datagram Protocol + RFC 793: Transmission Control Protocol + RFC 4960: Stream Control Transmission Protocol + RFC 4340: Datagram Congestion Control Protocol (DCCP) + RFC 4001: Textual Conventions for Internet Network Addresses"; + } + + /*** collection of types related to autonomous systems ***/ + + typedef as-number { + type uint32; + description + "The as-number type represents autonomous system numbers + which identify an Autonomous System (AS). An AS is a set + of routers under a single technical administration, using + an interior gateway protocol and common metrics to route + packets within the AS, and using an exterior gateway + protocol to route packets to other ASes. IANA maintains + the AS number space and has delegated large parts to the + regional registries. + + Autonomous system numbers were originally limited to 16 + bits. BGP extensions have enlarged the autonomous system + number space to 32 bits. This type therefore uses an uint32 + base type without a range restriction in order to support + a larger autonomous system number space. + + In the value set and its semantics, this type is equivalent + to the InetAutonomousSystemNumber textual convention of + the SMIv2."; + reference + "RFC 1930: Guidelines for creation, selection, and registration + of an Autonomous System (AS) + RFC 4271: A Border Gateway Protocol 4 (BGP-4) + RFC 4001: Textual Conventions for Internet Network Addresses + RFC 6793: BGP Support for Four-Octet Autonomous System (AS) + Number Space"; + } + + /*** collection of types related to IP addresses and hostnames ***/ + + typedef ip-address { + type union { + type inet:ipv4-address; + type inet:ipv6-address; + } + description + "The ip-address type represents an IP address and is IP + version neutral. The format of the textual representation + implies the IP version. This type supports scoped addresses + by allowing zone identifiers in the address format."; + reference + "RFC 4007: IPv6 Scoped Address Architecture"; + } + + typedef ipv4-address { + type string { + pattern + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])' + + '(%[\p{N}\p{L}]+)?'; + } + description + "The ipv4-address type represents an IPv4 address in + dotted-quad notation. The IPv4 address may include a zone + index, separated by a % sign. + + The zone index is used to disambiguate identical address + values. For link-local addresses, the zone index will + typically be the interface index number or the name of an + interface. If the zone index is not present, the default + zone of the device will be used. + + The canonical format for the zone index is the numerical + format"; + } + + typedef ipv6-address { + type string { + pattern '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' + + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' + + '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))' + + '(%[\p{N}\p{L}]+)?'; + pattern '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)' + + '(%.+)?'; + } + description + "The ipv6-address type represents an IPv6 address in full, + mixed, shortened, and shortened-mixed notation. The IPv6 + address may include a zone index, separated by a % sign. + + The zone index is used to disambiguate identical address + values. For link-local addresses, the zone index will + typically be the interface index number or the name of an + interface. If the zone index is not present, the default + zone of the device will be used. + + The canonical format of IPv6 addresses uses the textual + representation defined in Section 4 of RFC 5952. The + canonical format for the zone index is the numerical + format as described in Section 11.2 of RFC 4007."; + reference + "RFC 4291: IP Version 6 Addressing Architecture + RFC 4007: IPv6 Scoped Address Architecture + RFC 5952: A Recommendation for IPv6 Address Text + Representation"; + } + + typedef ip-address-no-zone { + type union { + type inet:ipv4-address-no-zone; + type inet:ipv6-address-no-zone; + } + description + "The ip-address-no-zone type represents an IP address and is + IP version neutral. The format of the textual representation + implies the IP version. This type does not support scoped + addresses since it does not allow zone identifiers in the + address format."; + reference + "RFC 4007: IPv6 Scoped Address Architecture"; + } + + typedef ipv4-address-no-zone { + type inet:ipv4-address { + pattern '[0-9\.]*'; + } + description + "An IPv4 address without a zone index. This type, derived from + ipv4-address, may be used in situations where the zone is + known from the context and hence no zone index is needed."; + } + + typedef ipv6-address-no-zone { + type inet:ipv6-address { + pattern '[0-9a-fA-F:\.]*'; + } + description + "An IPv6 address without a zone index. This type, derived from + ipv6-address, may be used in situations where the zone is + known from the context and hence no zone index is needed."; + reference + "RFC 4291: IP Version 6 Addressing Architecture + RFC 4007: IPv6 Scoped Address Architecture + RFC 5952: A Recommendation for IPv6 Address Text + Representation"; + } + + typedef ip-prefix { + type union { + type inet:ipv4-prefix; + type inet:ipv6-prefix; + } + description + "The ip-prefix type represents an IP prefix and is IP + version neutral. The format of the textual representations + implies the IP version."; + } + + typedef ipv4-prefix { + type string { + pattern + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])' + + '/(([0-9])|([1-2][0-9])|(3[0-2]))'; + } + description + "The ipv4-prefix type represents an IPv4 address prefix. + The prefix length is given by the number following the + slash character and must be less than or equal to 32. + + A prefix length value of n corresponds to an IP address + mask that has n contiguous 1-bits from the most + significant bit (MSB) and all other bits set to 0. + + The canonical format of an IPv4 prefix has all bits of + the IPv4 address set to zero that are not part of the + IPv4 prefix."; + } + + typedef ipv6-prefix { + type string { + pattern '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}' + + '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|' + + '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}' + + '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))' + + '(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8])))'; + pattern '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|' + + '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)' + + '(/.+)'; + } + + description + "The ipv6-prefix type represents an IPv6 address prefix. + The prefix length is given by the number following the + slash character and must be less than or equal to 128. + + A prefix length value of n corresponds to an IP address + mask that has n contiguous 1-bits from the most + significant bit (MSB) and all other bits set to 0. + + The IPv6 address should have all bits that do not belong + to the prefix set to zero. + + The canonical format of an IPv6 prefix has all bits of + the IPv6 address set to zero that are not part of the + IPv6 prefix. Furthermore, the IPv6 address is represented + as defined in Section 4 of RFC 5952."; + reference + "RFC 5952: A Recommendation for IPv6 Address Text + Representation"; + } + + /*** collection of domain name and URI types ***/ + + typedef domain-name { + type string { + pattern + '((([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.)*' + + '([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.?)' + + '|\.'; + length "1..253"; + } + description + "The domain-name type represents a DNS domain name. The + name SHOULD be fully qualified whenever possible. + + Internet domain names are only loosely specified. Section + 3.5 of RFC 1034 recommends a syntax (modified in Section + 2.1 of RFC 1123). The pattern above is intended to allow + for current practice in domain name use, and some possible + future expansion. It is designed to hold various types of + domain names, including names used for A or AAAA records + (host names) and other records, such as SRV records. Note + that Internet host names have a stricter syntax (described + in RFC 952) than the DNS recommendations in RFCs 1034 and + 1123, and that systems that want to store host names in + schema nodes using the domain-name type are recommended to + adhere to this stricter standard to ensure interoperability. + + The encoding of DNS names in the DNS protocol is limited + to 255 characters. Since the encoding consists of labels + prefixed by a length bytes and there is a trailing NULL + byte, only 253 characters can appear in the textual dotted + notation. + + The description clause of schema nodes using the domain-name + type MUST describe when and how these names are resolved to + IP addresses. Note that the resolution of a domain-name value + may require to query multiple DNS records (e.g., A for IPv4 + and AAAA for IPv6). The order of the resolution process and + which DNS record takes precedence can either be defined + explicitly or may depend on the configuration of the + resolver. + + Domain-name values use the US-ASCII encoding. Their canonical + format uses lowercase US-ASCII characters. Internationalized + domain names MUST be A-labels as per RFC 5890."; + reference + "RFC 952: DoD Internet Host Table Specification + RFC 1034: Domain Names - Concepts and Facilities + RFC 1123: Requirements for Internet Hosts -- Application + and Support + RFC 2782: A DNS RR for specifying the location of services + (DNS SRV) + RFC 5890: Internationalized Domain Names in Applications + (IDNA): Definitions and Document Framework"; + } + + typedef host { + type union { + type inet:ip-address; + type inet:domain-name; + } + description + "The host type represents either an IP address or a DNS + domain name."; + } + + typedef uri { + type string; + description + "The uri type represents a Uniform Resource Identifier + (URI) as defined by STD 66. + + Objects using the uri type MUST be in US-ASCII encoding, + and MUST be normalized as described by RFC 3986 Sections + 6.2.1, 6.2.2.1, and 6.2.2.2. All unnecessary + percent-encoding is removed, and all case-insensitive + characters are set to lowercase except for hexadecimal + digits, which are normalized to uppercase as described in + Section 6.2.2.1. + + The purpose of this normalization is to help provide + unique URIs. Note that this normalization is not + sufficient to provide uniqueness. Two URIs that are + textually distinct after this normalization may still be + equivalent. + + Objects using the uri type may restrict the schemes that + they permit. For example, 'data:' and 'urn:' schemes + might not be appropriate. + + A zero-length URI is not a valid URI. This can be used to + express 'URI absent' where required. + + In the value set and its semantics, this type is equivalent + to the Uri SMIv2 textual convention defined in RFC 5017."; + reference + "RFC 3986: Uniform Resource Identifier (URI): Generic Syntax + RFC 3305: Report from the Joint W3C/IETF URI Planning Interest + Group: Uniform Resource Identifiers (URIs), URLs, + and Uniform Resource Names (URNs): Clarifications + and Recommendations + RFC 5017: MIB Textual Conventions for Uniform Resource + Identifiers (URIs)"; + } + +} diff --git a/src/tests/tools/mock_qkd_nodes/yang/ietf-yang-types.yang b/src/tests/tools/mock_qkd_nodes/yang/ietf-yang-types.yang new file mode 100644 index 0000000000000000000000000000000000000000..ee58fa3ab0042120d5607b8713d21fa0ba845895 --- /dev/null +++ b/src/tests/tools/mock_qkd_nodes/yang/ietf-yang-types.yang @@ -0,0 +1,474 @@ +module ietf-yang-types { + + namespace "urn:ietf:params:xml:ns:yang:ietf-yang-types"; + prefix "yang"; + + organization + "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; + + contact + "WG Web: <http://tools.ietf.org/wg/netmod/> + WG List: <mailto:netmod@ietf.org> + + WG Chair: David Kessens + <mailto:david.kessens@nsn.com> + + WG Chair: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de> + + Editor: Juergen Schoenwaelder + <mailto:j.schoenwaelder@jacobs-university.de>"; + + description + "This module contains a collection of generally useful derived + YANG data types. + + Copyright (c) 2013 IETF Trust and the persons identified as + authors of the code. All rights reserved. + + Redistribution and use in source and binary forms, with or + without modification, is permitted pursuant to, and subject + to the license terms contained in, the Simplified BSD License + set forth in Section 4.c of the IETF Trust's Legal Provisions + Relating to IETF Documents + (http://trustee.ietf.org/license-info). + + This version of this YANG module is part of RFC 6991; see + the RFC itself for full legal notices."; + + revision 2013-07-15 { + description + "This revision adds the following new data types: + - yang-identifier + - hex-string + - uuid + - dotted-quad"; + reference + "RFC 6991: Common YANG Data Types"; + } + + revision 2010-09-24 { + description + "Initial revision."; + reference + "RFC 6021: Common YANG Data Types"; + } + + /*** collection of counter and gauge types ***/ + + typedef counter32 { + type uint32; + description + "The counter32 type represents a non-negative integer + that monotonically increases until it reaches a + maximum value of 2^32-1 (4294967295 decimal), when it + wraps around and starts increasing again from zero. + + Counters have no defined 'initial' value, and thus, a + single value of a counter has (in general) no information + content. Discontinuities in the monotonically increasing + value normally occur at re-initialization of the + management system, and at other times as specified in the + description of a schema node using this type. If such + other times can occur, for example, the creation of + a schema node of type counter32 at times other than + re-initialization, then a corresponding schema node + should be defined, with an appropriate type, to indicate + the last discontinuity. + + The counter32 type should not be used for configuration + schema nodes. A default statement SHOULD NOT be used in + combination with the type counter32. + + In the value set and its semantics, this type is equivalent + to the Counter32 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef zero-based-counter32 { + type yang:counter32; + default "0"; + description + "The zero-based-counter32 type represents a counter32 + that has the defined 'initial' value zero. + + A schema node of this type will be set to zero (0) on creation + and will thereafter increase monotonically until it reaches + a maximum value of 2^32-1 (4294967295 decimal), when it + wraps around and starts increasing again from zero. + + Provided that an application discovers a new schema node + of this type within the minimum time to wrap, it can use the + 'initial' value as a delta. It is important for a management + station to be aware of this minimum time and the actual time + between polls, and to discard data if the actual time is too + long or there is no defined minimum time. + + In the value set and its semantics, this type is equivalent + to the ZeroBasedCounter32 textual convention of the SMIv2."; + reference + "RFC 4502: Remote Network Monitoring Management Information + Base Version 2"; + } + + typedef counter64 { + type uint64; + description + "The counter64 type represents a non-negative integer + that monotonically increases until it reaches a + maximum value of 2^64-1 (18446744073709551615 decimal), + when it wraps around and starts increasing again from zero. + + Counters have no defined 'initial' value, and thus, a + single value of a counter has (in general) no information + content. Discontinuities in the monotonically increasing + value normally occur at re-initialization of the + management system, and at other times as specified in the + description of a schema node using this type. If such + other times can occur, for example, the creation of + a schema node of type counter64 at times other than + re-initialization, then a corresponding schema node + should be defined, with an appropriate type, to indicate + the last discontinuity. + + The counter64 type should not be used for configuration + schema nodes. A default statement SHOULD NOT be used in + combination with the type counter64. + + In the value set and its semantics, this type is equivalent + to the Counter64 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef zero-based-counter64 { + type yang:counter64; + default "0"; + description + "The zero-based-counter64 type represents a counter64 that + has the defined 'initial' value zero. + + A schema node of this type will be set to zero (0) on creation + and will thereafter increase monotonically until it reaches + a maximum value of 2^64-1 (18446744073709551615 decimal), + when it wraps around and starts increasing again from zero. + + Provided that an application discovers a new schema node + of this type within the minimum time to wrap, it can use the + 'initial' value as a delta. It is important for a management + station to be aware of this minimum time and the actual time + between polls, and to discard data if the actual time is too + long or there is no defined minimum time. + + In the value set and its semantics, this type is equivalent + to the ZeroBasedCounter64 textual convention of the SMIv2."; + reference + "RFC 2856: Textual Conventions for Additional High Capacity + Data Types"; + } + + typedef gauge32 { + type uint32; + description + "The gauge32 type represents a non-negative integer, which + may increase or decrease, but shall never exceed a maximum + value, nor fall below a minimum value. The maximum value + cannot be greater than 2^32-1 (4294967295 decimal), and + the minimum value cannot be smaller than 0. The value of + a gauge32 has its maximum value whenever the information + being modeled is greater than or equal to its maximum + value, and has its minimum value whenever the information + being modeled is smaller than or equal to its minimum value. + If the information being modeled subsequently decreases + below (increases above) the maximum (minimum) value, the + gauge32 also decreases (increases). + + In the value set and its semantics, this type is equivalent + to the Gauge32 type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef gauge64 { + type uint64; + description + "The gauge64 type represents a non-negative integer, which + may increase or decrease, but shall never exceed a maximum + value, nor fall below a minimum value. The maximum value + cannot be greater than 2^64-1 (18446744073709551615), and + the minimum value cannot be smaller than 0. The value of + a gauge64 has its maximum value whenever the information + being modeled is greater than or equal to its maximum + value, and has its minimum value whenever the information + being modeled is smaller than or equal to its minimum value. + If the information being modeled subsequently decreases + below (increases above) the maximum (minimum) value, the + gauge64 also decreases (increases). + + In the value set and its semantics, this type is equivalent + to the CounterBasedGauge64 SMIv2 textual convention defined + in RFC 2856"; + reference + "RFC 2856: Textual Conventions for Additional High Capacity + Data Types"; + } + + /*** collection of identifier-related types ***/ + + typedef object-identifier { + type string { + pattern '(([0-1](\.[1-3]?[0-9]))|(2\.(0|([1-9]\d*))))' + + '(\.(0|([1-9]\d*)))*'; + } + description + "The object-identifier type represents administratively + assigned names in a registration-hierarchical-name tree. + + Values of this type are denoted as a sequence of numerical + non-negative sub-identifier values. Each sub-identifier + value MUST NOT exceed 2^32-1 (4294967295). Sub-identifiers + are separated by single dots and without any intermediate + whitespace. + + The ASN.1 standard restricts the value space of the first + sub-identifier to 0, 1, or 2. Furthermore, the value space + of the second sub-identifier is restricted to the range + 0 to 39 if the first sub-identifier is 0 or 1. Finally, + the ASN.1 standard requires that an object identifier + has always at least two sub-identifiers. The pattern + captures these restrictions. + + Although the number of sub-identifiers is not limited, + module designers should realize that there may be + implementations that stick with the SMIv2 limit of 128 + sub-identifiers. + + This type is a superset of the SMIv2 OBJECT IDENTIFIER type + since it is not restricted to 128 sub-identifiers. Hence, + this type SHOULD NOT be used to represent the SMIv2 OBJECT + IDENTIFIER type; the object-identifier-128 type SHOULD be + used instead."; + reference + "ISO9834-1: Information technology -- Open Systems + Interconnection -- Procedures for the operation of OSI + Registration Authorities: General procedures and top + arcs of the ASN.1 Object Identifier tree"; + } + + typedef object-identifier-128 { + type object-identifier { + pattern '\d*(\.\d*){1,127}'; + } + description + "This type represents object-identifiers restricted to 128 + sub-identifiers. + + In the value set and its semantics, this type is equivalent + to the OBJECT IDENTIFIER type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef yang-identifier { + type string { + length "1..max"; + pattern '[a-zA-Z_][a-zA-Z0-9\-_.]*'; + pattern '.|..|[^xX].*|.[^mM].*|..[^lL].*'; + } + description + "A YANG identifier string as defined by the 'identifier' + rule in Section 12 of RFC 6020. An identifier must + start with an alphabetic character or an underscore + followed by an arbitrary sequence of alphabetic or + numeric characters, underscores, hyphens, or dots. + + A YANG identifier MUST NOT start with any possible + combination of the lowercase or uppercase character + sequence 'xml'."; + reference + "RFC 6020: YANG - A Data Modeling Language for the Network + Configuration Protocol (NETCONF)"; + } + + /*** collection of types related to date and time***/ + + typedef date-and-time { + type string { + pattern '\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?' + + '(Z|[\+\-]\d{2}:\d{2})'; + } + description + "The date-and-time type is a profile of the ISO 8601 + standard for representation of dates and times using the + Gregorian calendar. The profile is defined by the + date-time production in Section 5.6 of RFC 3339. + + The date-and-time type is compatible with the dateTime XML + schema type with the following notable exceptions: + + (a) The date-and-time type does not allow negative years. + + (b) The date-and-time time-offset -00:00 indicates an unknown + time zone (see RFC 3339) while -00:00 and +00:00 and Z + all represent the same time zone in dateTime. + + (c) The canonical format (see below) of data-and-time values + differs from the canonical format used by the dateTime XML + schema type, which requires all times to be in UTC using + the time-offset 'Z'. + + This type is not equivalent to the DateAndTime textual + convention of the SMIv2 since RFC 3339 uses a different + separator between full-date and full-time and provides + higher resolution of time-secfrac. + + The canonical format for date-and-time values with a known time + zone uses a numeric time zone offset that is calculated using + the device's configured known offset to UTC time. A change of + the device's offset to UTC time will cause date-and-time values + to change accordingly. Such changes might happen periodically + in case a server follows automatically daylight saving time + (DST) time zone offset changes. The canonical format for + date-and-time values with an unknown time zone (usually + referring to the notion of local time) uses the time-offset + -00:00."; + reference + "RFC 3339: Date and Time on the Internet: Timestamps + RFC 2579: Textual Conventions for SMIv2 + XSD-TYPES: XML Schema Part 2: Datatypes Second Edition"; + } + + typedef timeticks { + type uint32; + description + "The timeticks type represents a non-negative integer that + represents the time, modulo 2^32 (4294967296 decimal), in + hundredths of a second between two epochs. When a schema + node is defined that uses this type, the description of + the schema node identifies both of the reference epochs. + + In the value set and its semantics, this type is equivalent + to the TimeTicks type of the SMIv2."; + reference + "RFC 2578: Structure of Management Information Version 2 + (SMIv2)"; + } + + typedef timestamp { + type yang:timeticks; + description + "The timestamp type represents the value of an associated + timeticks schema node at which a specific occurrence + happened. The specific occurrence must be defined in the + description of any schema node defined using this type. When + the specific occurrence occurred prior to the last time the + associated timeticks attribute was zero, then the timestamp + value is zero. Note that this requires all timestamp values + to be reset to zero when the value of the associated timeticks + attribute reaches 497+ days and wraps around to zero. + + The associated timeticks schema node must be specified + in the description of any schema node using this type. + + In the value set and its semantics, this type is equivalent + to the TimeStamp textual convention of the SMIv2."; + reference + "RFC 2579: Textual Conventions for SMIv2"; + } + + /*** collection of generic address types ***/ + + typedef phys-address { + type string { + pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'; + } + + description + "Represents media- or physical-level addresses represented + as a sequence octets, each octet represented by two hexadecimal + numbers. Octets are separated by colons. The canonical + representation uses lowercase characters. + + In the value set and its semantics, this type is equivalent + to the PhysAddress textual convention of the SMIv2."; + reference + "RFC 2579: Textual Conventions for SMIv2"; + } + + typedef mac-address { + type string { + pattern '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}'; + } + description + "The mac-address type represents an IEEE 802 MAC address. + The canonical representation uses lowercase characters. + + In the value set and its semantics, this type is equivalent + to the MacAddress textual convention of the SMIv2."; + reference + "IEEE 802: IEEE Standard for Local and Metropolitan Area + Networks: Overview and Architecture + RFC 2579: Textual Conventions for SMIv2"; + } + + /*** collection of XML-specific types ***/ + + typedef xpath1.0 { + type string; + description + "This type represents an XPATH 1.0 expression. + + When a schema node is defined that uses this type, the + description of the schema node MUST specify the XPath + context in which the XPath expression is evaluated."; + reference + "XPATH: XML Path Language (XPath) Version 1.0"; + } + + /*** collection of string types ***/ + + typedef hex-string { + type string { + pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?'; + } + description + "A hexadecimal string with octets represented as hex digits + separated by colons. The canonical representation uses + lowercase characters."; + } + + typedef uuid { + type string { + pattern '[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-' + + '[0-9a-fA-F]{4}-[0-9a-fA-F]{12}'; + } + description + "A Universally Unique IDentifier in the string representation + defined in RFC 4122. The canonical representation uses + lowercase characters. + + The following is an example of a UUID in string representation: + f81d4fae-7dec-11d0-a765-00a0c91e6bf6 + "; + reference + "RFC 4122: A Universally Unique IDentifier (UUID) URN + Namespace"; + } + + typedef dotted-quad { + type string { + pattern + '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}' + + '([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])'; + } + description + "An unsigned 32-bit number expressed in the dotted-quad + notation, i.e., four octets written as decimal numbers + and separated with the '.' (full stop) character."; + } +} diff --git a/src/webui/Dockerfile b/src/webui/Dockerfile index 55e67b670f36812a55cf60e411cf137bc5b8a2ee..8295087667a6a25b209c584fc9627a5457f47f4d 100644 --- a/src/webui/Dockerfile +++ b/src/webui/Dockerfile @@ -84,9 +84,11 @@ COPY --chown=webui:webui src/service/__init__.py service/__init__.py COPY --chown=webui:webui src/service/client/. service/client/ COPY --chown=webui:webui src/slice/__init__.py slice/__init__.py COPY --chown=webui:webui src/slice/client/. slice/client/ -COPY --chown=webui:webui src/webui/. webui/ +COPY --chown=webui:webui src/qkd_app/__init__.py qkd_app/__init__.py +COPY --chown=webui:webui src/qkd_app/client/. qkd_app/client/ COPY --chown=webui:webui src/bgpls_speaker/__init__.py bgpls_speaker/__init__.py COPY --chown=webui:webui src/bgpls_speaker/client/. bgpls_speaker/client/ +COPY --chown=webui:webui src/webui/. webui/ # Start the service ENTRYPOINT ["python", "-m", "webui.service"] diff --git a/src/webui/service/__init__.py b/src/webui/service/__init__.py index b864d3549e051b54e888c80547724da14fec5f67..f137c247e1c4d2f4be5707e72e4140ab75f8e886 100644 --- a/src/webui/service/__init__.py +++ b/src/webui/service/__init__.py @@ -19,6 +19,10 @@ from flask_healthz import healthz, HealthError from common.tools.grpc.Tools import grpc_message_to_json from context.client.ContextClient import ContextClient from device.client.DeviceClient import DeviceClient +from qkd_app.client.QKDAppClient import QKDAppClient +from common.Settings import ( + is_deployed_bgpls, is_deployed_load_gen, is_deployed_policy, is_deployed_qkd_app, is_deployed_slice +) def get_working_context() -> str: return session['context_uuid'] if 'context_uuid' in session else '---' @@ -37,6 +41,10 @@ def readiness(): device_client = DeviceClient() device_client.connect() device_client.close() + # DEPENDENCY QKD + qkd_app_client = QKDAppClient() + qkd_app_client.connect() + qkd_app_client.close() except Exception as e: raise HealthError("Can't connect with the service: {:s}".format(str(e))) from e @@ -78,30 +86,33 @@ def create_app(use_config=None, web_app_root=None): app.register_blueprint(healthz, url_prefix='/healthz') - from webui.service.js.routes import js # pylint: disable=import-outside-toplevel + from webui.service.js.routes import js # pylint: disable=import-outside-toplevel app.register_blueprint(js) - from webui.service.main.routes import main # pylint: disable=import-outside-toplevel + from webui.service.main.routes import main # pylint: disable=import-outside-toplevel app.register_blueprint(main) - from webui.service.load_gen.routes import load_gen # pylint: disable=import-outside-toplevel + from webui.service.load_gen.routes import load_gen # pylint: disable=import-outside-toplevel app.register_blueprint(load_gen) - from webui.service.service.routes import service # pylint: disable=import-outside-toplevel + from webui.service.service.routes import service # pylint: disable=import-outside-toplevel app.register_blueprint(service) - from webui.service.slice.routes import slice # pylint: disable=import-outside-toplevel,redefined-builtin + from webui.service.slice.routes import slice # pylint: disable=import-outside-toplevel,redefined-builtin app.register_blueprint(slice) - from webui.service.device.routes import device # pylint: disable=import-outside-toplevel + from webui.service.device.routes import device # pylint: disable=import-outside-toplevel app.register_blueprint(device) - from webui.service.bgpls.routes import bgpls # pylint: disable=import-outside-toplevel + from webui.service.bgpls.routes import bgpls # pylint: disable=import-outside-toplevel app.register_blueprint(bgpls) - from webui.service.link.routes import link # pylint: disable=import-outside-toplevel + from webui.service.link.routes import link # pylint: disable=import-outside-toplevel app.register_blueprint(link) + from webui.service.qkd_app.routes import qkd_app # pylint: disable=import-outside-toplevel + app.register_blueprint(qkd_app) + from webui.service.policy_rule.routes import policy_rule # pylint: disable=import-outside-toplevel app.register_blueprint(policy_rule) @@ -112,6 +123,12 @@ def create_app(use_config=None, web_app_root=None): 'round' : round, 'get_working_context' : get_working_context, 'get_working_topology': get_working_topology, + + 'is_deployed_bgpls' : is_deployed_bgpls, + 'is_deployed_load_gen': is_deployed_load_gen, + 'is_deployed_policy' : is_deployed_policy, + 'is_deployed_qkd_app' : is_deployed_qkd_app, + 'is_deployed_slice' : is_deployed_slice, }) if web_app_root is not None: diff --git a/src/webui/service/__main__.py b/src/webui/service/__main__.py index e9a906e8a431e287911547abc4065d9d9364ccb4..109c468c7daeda22efedf75a7293c6d8c6f038d8 100644 --- a/src/webui/service/__main__.py +++ b/src/webui/service/__main__.py @@ -33,6 +33,7 @@ def main(): logging.basicConfig(level=log_level) logger = logging.getLogger(__name__) + # DEPENDENCY QKD wait_for_environment_variables([ get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_HOST ), get_env_var_name(ServiceNameEnum.CONTEXT, ENVVAR_SUFIX_SERVICE_PORT_GRPC), @@ -40,8 +41,6 @@ def main(): get_env_var_name(ServiceNameEnum.DEVICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC), get_env_var_name(ServiceNameEnum.SERVICE, ENVVAR_SUFIX_SERVICE_HOST ), get_env_var_name(ServiceNameEnum.SERVICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC), - get_env_var_name(ServiceNameEnum.SLICE, ENVVAR_SUFIX_SERVICE_HOST ), - get_env_var_name(ServiceNameEnum.SLICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC), ]) logger.info('Starting...') diff --git a/src/webui/service/device/forms.py b/src/webui/service/device/forms.py index e4c71d92170dc9fe46996a1c93978647800aa300..eebc06755f204cd270ff8feca21733cb4426493a 100644 --- a/src/webui/service/device/forms.py +++ b/src/webui/service/device/forms.py @@ -33,6 +33,7 @@ class AddDeviceForm(FlaskForm): device_drivers_gnmi_openconfig = BooleanField('GNMI OPENCONFIG') device_drivers_optical_tfs = BooleanField('OPTICAL TFS') device_drivers_ietf_actn = BooleanField('IETF ACTN') + device_drivers_qkd = BooleanField('QKD') device_config_address = StringField('connect/address',default='127.0.0.1',validators=[DataRequired(), Length(min=5)]) device_config_port = StringField('connect/port',default='0',validators=[DataRequired(), Length(min=1)]) @@ -57,3 +58,4 @@ class UpdateDeviceForm(FlaskForm): validators=[NumberRange(min=0)]) submit = SubmitField('Update') + diff --git a/src/webui/service/device/routes.py b/src/webui/service/device/routes.py index b7fdb78e85dc634627de02947c0861a7f13bdae9..429f4a2ea8539b7b12baf5e20eb30760694ede64 100644 --- a/src/webui/service/device/routes.py +++ b/src/webui/service/device/routes.py @@ -129,6 +129,8 @@ def add(): device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_OPTICAL_TFS) if form.device_drivers_ietf_actn.data: device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_IETF_ACTN) + if form.device_drivers_qkd.data: + device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_QKD) device_obj.device_drivers.extend(device_drivers) # pylint: disable=no-member try: diff --git a/src/webui/service/qkd_app/__init__.py b/src/webui/service/qkd_app/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..bbfc943b68af13a11e562abbc8680ade71db8f02 --- /dev/null +++ b/src/webui/service/qkd_app/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. diff --git a/src/webui/service/qkd_app/routes.py b/src/webui/service/qkd_app/routes.py new file mode 100644 index 0000000000000000000000000000000000000000..200d6ebdd17918dbb3d026980c4286212f519b82 --- /dev/null +++ b/src/webui/service/qkd_app/routes.py @@ -0,0 +1,167 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import grpc +import logging +from flask import current_app, render_template, Blueprint, flash, session, redirect, url_for +from common.proto.qkd_app_pb2 import App, AppId, QKDAppStatusEnum, QKDAppTypesEnum +from common.proto.context_pb2 import Uuid, ContextId +from common.tools.context_queries.Context import get_context +from common.tools.context_queries.Device import get_device +from context.client.ContextClient import ContextClient +from qkd_app.client.QKDAppClient import QKDAppClient + +# Set up logging +LOGGER = logging.getLogger(__name__) + +# Blueprint for QKDApp routes +qkd_app = Blueprint('qkd_app', __name__, url_prefix='/qkd_app') + +# Initialize clients +qkd_app_client = QKDAppClient() +context_client = ContextClient() + +@qkd_app.get('/') +def home(): + if 'context_uuid' not in session or 'topology_uuid' not in session: + flash("Please select a context!", "warning") + return redirect(url_for("main.home")) + + context_uuid = session['context_uuid'] + topology_uuid = session['topology_uuid'] + + # Connect to context client + context_client.connect() + device_names = dict() + + try: + + # Fetch context object + context_obj = get_context(context_client, context_uuid, rw_copy=False) + if context_obj is None: + flash('Context({:s}) not found'.format(str(context_uuid)), 'danger') + apps = list() + else: + try: + # Call ListApps using the context_id + apps_response = qkd_app_client.ListApps(context_obj.context_id) + apps = apps_response.apps + except grpc.RpcError as e: + LOGGER.error(f"gRPC error while fetching apps: {e.details()}") + if e.code() != grpc.StatusCode.NOT_FOUND: raise + if e.details() != 'Context({:s}) not found'.format(context_uuid): raise + apps = list() + else: + # Map local and remote device names + for app in apps: + if app.local_device_id.device_uuid.uuid not in device_names: + device = get_device(context_client, app.local_device_id.device_uuid.uuid) + if device: + device_names[app.local_device_id.device_uuid.uuid] = device.name + + if app.remote_device_id.device_uuid.uuid and app.remote_device_id.device_uuid.uuid not in device_names: + device = get_device(context_client, app.remote_device_id.device_uuid.uuid) + if device: + device_names[app.remote_device_id.device_uuid.uuid] = device.name + finally: + context_client.close() + + # Render the template with app list and device names + return render_template( + 'qkd_app/home.html', + apps=apps, + device_names=device_names, + ate=QKDAppTypesEnum, + ase=QKDAppStatusEnum + ) + +@qkd_app.route('detail/<path:app_uuid>', methods=['GET', 'POST']) +def detail(app_uuid: str): + """ + Displays details for a specific QKD app identified by its UUID. + """ + try: + qkd_app_client.connect() + + # Wrap the app_uuid in a Uuid object and fetch details + uuid_message = Uuid(uuid=app_uuid) + app_id = AppId(app_uuid=uuid_message) + app_detail = qkd_app_client.GetApp(app_id) + + if not app_detail: + flash(f"App with UUID {app_uuid} not found", "danger") + return redirect(url_for("qkd_app.home")) + + # Fetch device details + context_client.connect() + device_names = {} + + try: + if app_detail.local_device_id.device_uuid.uuid: + local_device = get_device(context_client, app_detail.local_device_id.device_uuid.uuid) + if local_device: + device_names[app_detail.local_device_id.device_uuid.uuid] = local_device.name + + if app_detail.remote_device_id.device_uuid.uuid: + remote_device = get_device(context_client, app_detail.remote_device_id.device_uuid.uuid) + if remote_device: + device_names[app_detail.remote_device_id.device_uuid.uuid] = remote_device.name + + except grpc.RpcError as e: + LOGGER.error(f"Failed to retrieve device details for app {app_uuid}: {e}") + flash(f"Error retrieving device details: {e.details()}", "danger") + return redirect(url_for("qkd_app.home")) + + finally: + context_client.close() + + return render_template( + 'qkd_app/detail.html', + app=app_detail, + ase=QKDAppStatusEnum, + ate=QKDAppTypesEnum, + device_names=device_names + ) + + except grpc.RpcError as e: + LOGGER.error(f"Failed to retrieve app details for {app_uuid}: {e}") + flash(f"Error retrieving app details: {e.details()}", "danger") + return redirect(url_for("qkd_app.home")) + + finally: + qkd_app_client.close() + +@qkd_app.get('<path:app_uuid>/delete') +def delete(app_uuid: str): + """ + Deletes a specific QKD app identified by its UUID. + """ + try: + request = AppId(app_uuid=Uuid(uuid=app_uuid)) + + qkd_app_client.connect() + qkd_app_client.DeleteApp(request) # Call the DeleteApp method + qkd_app_client.close() + + flash(f'App "{app_uuid}" deleted successfully!', 'success') + + except grpc.RpcError as e: + LOGGER.error(f"Problem deleting app {app_uuid}: {e}") + flash(f"Problem deleting app {app_uuid}: {e.details()}", 'danger') + + except Exception as e: + LOGGER.exception(f"Unexpected error while deleting app {app_uuid}: {e}") + flash(f"Unexpected error: {str(e)}", 'danger') + + return redirect(url_for('qkd_app.home')) diff --git a/src/webui/service/service/__init__.py b/src/webui/service/service/__init__.py index 3ee6f7071f145e06c3aeaefc09a43ccd88e619e3..5cf553eaaec41de7599b6723e31e4ca3f82cbcae 100644 --- a/src/webui/service/service/__init__.py +++ b/src/webui/service/service/__init__.py @@ -12,3 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. + diff --git a/src/webui/service/service/forms.py b/src/webui/service/service/forms.py index f07acf54365b79245583e7f9567b8bc4a5cfd89d..dad15f1c2dbef3a5d1c9a3ecdc6f96c00b883aa2 100644 --- a/src/webui/service/service/forms.py +++ b/src/webui/service/service/forms.py @@ -17,6 +17,11 @@ from flask_wtf import FlaskForm from wtforms import StringField, SelectField, IntegerField, DecimalField from wtforms.validators import InputRequired, Optional, NumberRange, ValidationError, StopValidation +# Custom uuid validator +def validate_uuid_address(form, field): + if not re.match(r'^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$', field.data): + raise ValidationError('Invalid uuid format') + # Custom IPv4 address validator def validate_ipv4_address(form, field): try: @@ -60,7 +65,25 @@ class CustomInputRequired(): raise StopValidation(self.message) class AddServiceForm_1(FlaskForm): - service_type = SelectField('Type of service', choices=[('', 'Select a type of service to add'), ('ACL_L2', 'ACL_L2'), ('ACL_IPV4', 'ACL_IPV4'), ('ACL_IPV6', 'ACL_IPV6'), ('L2VPN', 'L2VPN'), ('L3VPN', 'L3VPN')], validators=[InputRequired()]) + service_type = SelectField('Type of service', choices=[('', 'Select a type of service to add'), ('ACL_L2', 'ACL_L2'), ('ACL_IPV4', 'ACL_IPV4'), ('ACL_IPV6', 'ACL_IPV6'), ('L2VPN', 'L2VPN'), ('L3VPN', 'L3VPN'), ('QKD', 'QKD')], validators=[InputRequired()]) + +class AddServiceForm_QKD(FlaskForm): + #GENERIC SERVICE PARAMETERS (COMMON & MANDATORY) + service_name = StringField('Service Name', validators=[CustomInputRequired()]) + service_type = SelectField('Service Type', choices=[(6, '6 (QKD)')], validators=[CustomInputRequired()]) + service_device_1 = SelectField('Device_1', choices=[('', 'Select a device (Mandatory)')], validators=[CustomInputRequired()]) + service_device_2 = SelectField('Device_2', choices=[('', 'Select a device (Mandatory)')], validators=[CustomInputRequired()]) + service_endpoint_1 = StringField('Device_1 Endpoint', validators=[CustomInputRequired()]) + service_endpoint_2 = StringField('Device_2 Endpoint', validators=[CustomInputRequired()]) + + #GENERIC SERVICE CONSTRAINT PARAMETERS (ALL OPTIONAL) + service_capacity = DecimalField('Service Capacity', places=2, default=10.00, validators=[Optional(), NumberRange(min=0)]) + service_latency = DecimalField('Service Latency', places=2, default=15.20, validators=[Optional(), NumberRange(min=0)]) + service_availability= DecimalField('Service Availability', places=2, validators=[Optional(), NumberRange(min=0)]) + service_isolation = SelectField('Service Isolation', choices=[('', 'Select (Optional)'), ('NO_ISOLATION', 'NO_ISOLATION'), ('PHYSICAL_ISOLATION', 'PHYSICAL_ISOLATION'), + ('LOGICAL_ISOLATION', 'LOGICAL_ISOLATION'), ('PROCESS_ISOLATION', 'PROCESS_ISOLATION'), ('PHYSICAL_MEMORY_ISOLATION', 'PHYSICAL_MEMORY_ISOLATION'), + ('PHYSICAL_NETWORK_ISOLATION', 'PHYSICAL_NETWORK_ISOLATION'), ('VIRTUAL_RESOURCE_ISOLATION', 'VIRTUAL_RESOURCE_ISOLATION'), + ('NETWORK_FUNCTIONS_ISOLATION', 'NETWORK_FUNCTIONS_ISOLATION'), ('SERVICE_ISOLATION', 'SERVICE_ISOLATION')], validators=[Optional()]) class AddServiceForm_ACL_L2(FlaskForm): #GENERIC SERVICE PARAMETERS (COMMON & MANDATORY) @@ -259,3 +282,4 @@ class AddServiceForm_L3VPN(FlaskForm): Device_2_IF_address_ip = StringField('Device_2 IP Address', validators=[CustomInputRequired(), validate_ipv4_address]) Device_2_IF_address_prefix = IntegerField('Device_2 IP Prefix length', validators=[CustomInputRequired(), validate_uint32]) Device_2_IF_description = StringField ('Device_2 SubIF Description', validators=[Optional()]) + diff --git a/src/webui/service/service/routes.py b/src/webui/service/service/routes.py index 92025b2bec4f7c70b446a8c422e2cdb166c95466..c164b41773e15ac4e9746753e1fdc3b56a51b0d2 100644 --- a/src/webui/service/service/routes.py +++ b/src/webui/service/service/routes.py @@ -35,14 +35,14 @@ from common.tools.object_factory.Constraint import ( from common.tools.object_factory.Context import json_context_id from common.tools.object_factory.Device import json_device_id from common.tools.object_factory.EndPoint import json_endpoint_id -from common.tools.object_factory.Service import json_service_l2nm_planned, json_service_l3nm_planned +from common.tools.object_factory.Service import json_service_l2nm_planned, json_service_l3nm_planned, json_service_qkd_planned from common.tools.object_factory.Topology import json_topology_id from context.client.ContextClient import ContextClient from device.client.DeviceClient import DeviceClient from service.client.ServiceClient import ServiceClient from webui.service.service.forms import ( AddServiceForm_1, AddServiceForm_ACL_L2, AddServiceForm_ACL_IPV4, AddServiceForm_ACL_IPV6, - AddServiceForm_L2VPN, AddServiceForm_L3VPN + AddServiceForm_L2VPN, AddServiceForm_L3VPN, AddServiceForm_QKD ) LOGGER = logging.getLogger(__name__) @@ -329,10 +329,83 @@ def add_configure(): form_1 = AddServiceForm_1() if form_1.validate_on_submit(): service_type = str(form_1.service_type.data) - if service_type in {'ACL_L2', 'ACL_IPV4', 'ACL_IPV6', 'L2VPN', 'L3VPN'}: + if service_type in {'ACL_L2', 'ACL_IPV4', 'ACL_IPV6', 'L2VPN', 'L3VPN', 'QKD'}: return redirect(url_for('service.add_configure_{:s}'.format(service_type))) return render_template('service/add.html', form_1=form_1, submit_text='Continue to configuraton') +@service.route('add/configure/QKD', methods=['GET', 'POST']) +def add_configure_QKD(): + form_qkd = AddServiceForm_QKD() + service_obj = Service() + + context_uuid, topology_uuid = get_context_and_topology_uuids() + if context_uuid and topology_uuid: + context_client.connect() + grpc_topology = get_topology(context_client, topology_uuid, context_uuid=context_uuid, rw_copy=False) + if grpc_topology: + topo_device_uuids = {device_id.device_uuid.uuid for device_id in grpc_topology.device_ids} + devices = get_filtered_devices(context_client, topo_device_uuids) + grpc_devices = context_client.ListDevices(Empty()) + devices = [ + device for device in grpc_devices.devices + if device.device_id.device_uuid.uuid in topo_device_uuids and DeviceDriverEnum.DEVICEDRIVER_QKD in device.device_drivers + ] + choices = get_device_choices(devices) + add_device_choices_to_form(choices, form_qkd.service_device_1) + add_device_choices_to_form(choices, form_qkd.service_device_2) + else: + flash('Context({:s})/Topology({:s}) not found'.format(str(context_uuid), str(topology_uuid)), 'danger') + else: + flash('Missing context or topology UUID', 'danger') + + if form_qkd.validate_on_submit(): + try: + [selected_device_1, selected_device_2, selected_endpoint_1, selected_endpoint_2] = validate_selected_devices_and_endpoints(form_qkd, devices) + except Exception as e: + flash('{:s}'.format(str(e.args[0])), 'danger') + current_app.logger.exception(e) + return render_template('service/configure_QKD.html', form_qkd=form_qkd, submit_text='Add New Service') + + service_uuid, service_type, endpoint_ids = set_service_parameters(service_obj, form_qkd, selected_device_1, selected_device_2, selected_endpoint_1, selected_endpoint_2) + constraints = add_constraints(form_qkd) + params_device_1_with_data = get_device_params(form_qkd, 1, service_type) + params_device_2_with_data = get_device_params(form_qkd, 2, service_type) + print(params_device_1_with_data) + print(params_device_2_with_data) + params_settings = {} + config_rules = [ + json_config_rule_set( + '/settings', params_settings + ), + json_config_rule_set( + '/device[{:s}]/endpoint[{:s}]/settings'.format(str(selected_device_1.name), str(selected_endpoint_1)), params_device_1_with_data + ), + json_config_rule_set( + '/device[{:s}]/endpoint[{:s}]/settings'.format(str(selected_device_2.name), str(selected_endpoint_2)), params_device_2_with_data + ) + ] + + service_client.connect() + context_client.connect() + device_client.connect() + descriptor_json = json_service_qkd_planned(service_uuid = service_uuid, endpoint_ids = endpoint_ids, constraints = constraints, config_rules = config_rules, context_uuid= context_uuid) + descriptor_json = {"services": [descriptor_json]} + try: + process_descriptors(descriptor_json) + flash('Service "{:s}" added successfully!'.format(service_obj.service_id.service_uuid.uuid), 'success') + return redirect(url_for('service.home', service_uuid=service_obj.service_id.service_uuid.uuid)) + except Exception as e: + flash('Problem adding service: {:s}'.format((str(e.args[0]))), 'danger') + current_app.logger.exception(e) + finally: + context_client.close() + device_client.close() + service_client.close() + + + return render_template('service/configure_QKD.html', form_qkd=form_qkd, submit_text='Add New Service') + + @service.route('add/configure/ACL_L2', methods=['GET', 'POST']) def add_configure_ACL_L2(): form_acl = AddServiceForm_ACL_L2() @@ -666,6 +739,9 @@ def get_device_params(form, device_num, form_type): 'ni_description': str(getattr(form, 'NI_description').data), 'subif_description': str(getattr(form, f'Device_{device_num}_IF_description').data), } + elif form_type == 6: + device_params = { + } else: raise ValueError(f'Unsupported form type: {form_type}') diff --git a/src/webui/service/static/topology_icons/emu-qkd-node.png b/src/webui/service/static/topology_icons/emu-qkd-node.png new file mode 100644 index 0000000000000000000000000000000000000000..d4dc1abaf42a56ff07d1f4a2c5d250b56486584d Binary files /dev/null and b/src/webui/service/static/topology_icons/emu-qkd-node.png differ diff --git a/src/webui/service/static/topology_icons/qkd-node.png b/src/webui/service/static/topology_icons/qkd-node.png new file mode 100644 index 0000000000000000000000000000000000000000..79f40d2a600bd7f9e55d0360a132800c09a8ac85 Binary files /dev/null and b/src/webui/service/static/topology_icons/qkd-node.png differ diff --git a/src/webui/service/templates/base.html b/src/webui/service/templates/base.html index c154346204a4ad59eec54a7e9ae3956a7f3db655..432f1a095be1a682624a45decf2355310e58238b 100644 --- a/src/webui/service/templates/base.html +++ b/src/webui/service/templates/base.html @@ -55,6 +55,7 @@ <a class="nav-link" href="{{ url_for('main.home') }}">Home</a> {% endif %} </li> + <li class="nav-item"> {% if '/device/' in request.path %} <a class="nav-link active" aria-current="page" href="{{ url_for('device.home') }}">Device</a> @@ -62,6 +63,7 @@ <a class="nav-link" href="{{ url_for('device.home') }}">Device</a> {% endif %} </li> + <li class="nav-item"> {% if '/link/' in request.path %} <a class="nav-link active" aria-current="page" href="{{ url_for('link.home') }}">Link</a> @@ -69,6 +71,7 @@ <a class="nav-link" href="{{ url_for('link.home') }}">Link</a> {% endif %} </li> + <li class="nav-item"> {% if '/service/' in request.path %} <a class="nav-link active" aria-current="page" href="{{ url_for('service.home') }}">Service</a> @@ -76,40 +79,63 @@ <a class="nav-link" href="{{ url_for('service.home') }}">Service</a> {% endif %} </li> - <li class="nav-item"> - {% if '/slice/' in request.path %} - <a class="nav-link active" aria-current="page" href="{{ url_for('slice.home') }}">Slice</a> - {% else %} - <a class="nav-link" href="{{ url_for('slice.home') }}">Slice</a> - {% endif %} - </li> - <li class="nav-item"> - {% if '/policy_rule/' in request.path %} - <a class="nav-link active" aria-current="page" href="{{ url_for('policy_rule.home') }}">Policy Rules</a> - {% else %} - <a class="nav-link" href="{{ url_for('policy_rule.home') }}">Policy Rules</a> - {% endif %} - </li> + + {% if is_deployed_slice() %} + <li class="nav-item"> + {% if '/slice/' in request.path %} + <a class="nav-link active" aria-current="page" href="{{ url_for('slice.home') }}">Slice</a> + {% else %} + <a class="nav-link" href="{{ url_for('slice.home') }}">Slice</a> + {% endif %} + </li> + {% endif %} + + {% if is_deployed_policy() %} + <li class="nav-item"> + {% if '/policy_rule/' in request.path %} + <a class="nav-link active" aria-current="page" href="{{ url_for('policy_rule.home') }}">Policy Rules</a> + {% else %} + <a class="nav-link" href="{{ url_for('policy_rule.home') }}">Policy Rules</a> + {% endif %} + </li> + {% endif %} + + {% if is_deployed_qkd_app() %} + <li class="nav-item"> + {% if '/qkd_app/' in request.path %} + <a class="nav-link active" aria-current="page" href="{{ url_for('qkd_app.home') }}">QKD Apps</a> + {% else %} + <a class="nav-link" href="{{ url_for('qkd_app.home') }}">QKD Apps</a> + {% endif %} + </li> + {% endif %} + + {% if is_deployed_bgpls() %} + <li class="nav-item"> + {% if '/bgpls/' in request.path %} + <a class="nav-link active" aria-current="page" href="{{ url_for('bgpls.home') }}">BGPLS</a> + {% else %} + <a class="nav-link" href="{{ url_for('bgpls.home') }}">BGPLS</a> + {% endif %} + </li> + {% endif %} + + {% if is_deployed_load_gen() %} + <li class="nav-item"> + {% if '/load-gen/' in request.path %} + <a class="nav-link active" aria-current="page" href="{{ url_for('load_gen.home') }}">Load Generator</a> + {% else %} + <a class="nav-link" href="{{ url_for('load_gen.home') }}">Load Generator</a> + {% endif %} + </li> + {% endif %} + <li class="nav-item"> <a class="nav-link" href="/grafana" id="grafana_link" target="grafana">Grafana</a> </li> <li class="nav-item"> <a class="nav-link" href="{{ url_for('main.debug') }}">Debug</a> </li> - <li class="nav-item"> - {% if '/load-gen/' in request.path %} - <a class="nav-link active" aria-current="page" href="{{ url_for('load_gen.home') }}">Load Generator</a> - {% else %} - <a class="nav-link" href="{{ url_for('load_gen.home') }}">Load Generator</a> - {% endif %} - </li> - <li class="nav-item"> - {% if '/bgpls/' in request.path %} - <a class="nav-link active" aria-current="page" href="{{ url_for('bgpls.home') }}">BGPLS</a> - {% else %} - <a class="nav-link" href="{{ url_for('bgpls.home') }}">BGPLS</a> - {% endif %} - </li> <!-- <li class="nav-item"> <a class="nav-link" href="#">Context</a> diff --git a/src/webui/service/templates/device/add.html b/src/webui/service/templates/device/add.html index 3bea6ae719a75c91835ceb35f50b5bbeba2c7940..e11c37688c09b96849c63a5d51cd7e546468d558 100644 --- a/src/webui/service/templates/device/add.html +++ b/src/webui/service/templates/device/add.html @@ -95,6 +95,7 @@ <br /> {{ form.device_drivers_optical_tfs }} {{ form.device_drivers_optical_tfs.label(class="col-sm-3 col-form-label") }} {{ form.device_drivers_ietf_actn }} {{ form.device_drivers_ietf_actn.label(class="col-sm-3 col-form-label") }} + {{ form.device_drivers_qkd }} {{ form.device_drivers_qkd.label(class="col-sm-3 col-form-label") }} {% endif %} </div> </div> diff --git a/src/webui/service/templates/qkd_app/detail.html b/src/webui/service/templates/qkd_app/detail.html new file mode 100644 index 0000000000000000000000000000000000000000..078895cec81b4680715f9d027beac3158afdc4a4 --- /dev/null +++ b/src/webui/service/templates/qkd_app/detail.html @@ -0,0 +1,126 @@ +{% extends 'base.html' %} + +{% block content %} +<h1>App {{ app.app_id.app_uuid.uuid }}</h1> + +<!-- Action Buttons --> +<div class="row mb-3"> + <div class="col-sm-3"> + <button type="button" class="btn btn-success" onclick="window.location.href='{{ url_for('qkd_app.home') }}';"> + <i class="bi bi-box-arrow-in-left"></i> Back to app list + </button> + </div> + <div class="col-sm-3"> + <button type="button" class="btn btn-danger" data-bs-toggle="modal" data-bs-target="#deleteModal"> + <i class="bi bi-x-square"></i> Delete app + </button> + </div> +</div> + +<!-- App Basic Info --> +<div class="row mb-3"> + <div class="col-sm-4"> + <b>UUID: </b>{{ app.app_id.app_uuid.uuid }}<br> + <b>Status: </b>{{ ase.Name(app.app_status).replace('QKDAPPSTATUS_', '') }}<br> + <b>Type: </b>{{ ate.Name(app.app_type).replace('QKDAPPTYPES_', '').replace('CLIENT', 'EXTERNAL') }}<br> + </div> + + <!-- Associated Devices --> + <div class="col-sm-8"> + <h5>Associated Devices</h5> + <table class="table table-striped table-hover"> + <thead> + <tr> + <th scope="col">Device</th> + <th scope="col">Endpoint Type</th> + </tr> + </thead> + <tbody> + <tr> + <td> + <a href="{{ url_for('device.detail', device_uuid=app.local_device_id.device_uuid.uuid) }}"> + {{ device_names.get(app.local_device_id.device_uuid.uuid, app.local_device_id.device_uuid.uuid) }} + <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16"> + <path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8z"/> + <path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5z"/> + <path d="M4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/> + </svg> + </a> + </td> + <td>Local Device</td> + </tr> + {% if app.remote_device_id.device_uuid.uuid %} + <tr> + <td> + <a href="{{ url_for('device.detail', device_uuid=app.remote_device_id.device_uuid.uuid) }}"> + {{ device_names.get(app.remote_device_id.device_uuid.uuid, app.remote_device_id.device_uuid.uuid) }} + <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16"> + <path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8z"/> + <path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5z"/> + <path d="M4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/> + </svg> + </a> + </td> + <td>Remote Device</td> + </tr> + {% endif %} + </tbody> + </table> + </div> +</div> + +<!-- QoS --> +<div class="row mb-3"> + <div class="col-sm-12"> + <h5>App QoS</h5> + <table class="table table-striped"> + <thead> + <tr> + <th scope="col">QoS Parameter</th> + <th scope="col">Value</th> + </tr> + </thead> + <tbody> + <tr> + <td>Max Bandwidth</td> + <td>{{ app.qos.max_bandwidth }} bps</td> + </tr> + <tr> + <td>Min Bandwidth</td> + <td>{{ app.qos.min_bandwidth or 'N/A' }} bps</td> + </tr> + <tr> + <td>Jitter</td> + <td>{{ app.qos.jitter or 'N/A' }} ms</td> + </tr> + <tr> + <td>TTL</td> + <td>{{ app.qos.ttl or 'N/A' }} seconds</td> + </tr> + </tbody> + </table> + </div> +</div> + +<!-- Modal for Deleting App --> +<div class="modal fade" id="deleteModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <h5 class="modal-title" id="staticBackdropLabel">Delete app?</h5> + <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> + </div> + <div class="modal-body"> + Are you sure you want to delete the app "{{ app.app_id.app_uuid.uuid }}"? + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">No</button> + <a type="button" class="btn btn-danger" href="{{ url_for('qkd_app.delete', app_uuid=app.app_id.app_uuid.uuid) }}"> + <i class="bi bi-exclamation-diamond"></i>Yes + </a> + </div> + </div> + </div> +</div> + +{% endblock %} diff --git a/src/webui/service/templates/qkd_app/home.html b/src/webui/service/templates/qkd_app/home.html new file mode 100644 index 0000000000000000000000000000000000000000..39b43ecc4b9b71e03d27bf080ae6c7be2bf1a90d --- /dev/null +++ b/src/webui/service/templates/qkd_app/home.html @@ -0,0 +1,94 @@ +<!-- + Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +{% extends 'base.html' %} + +{% block content %} + <h1>Apps</h1> + + <div class="row"> + <div class="col"> + {{ apps | length }} apps found in context <i>{{ session['context_uuid'] }}</i> + </div> + </div> + + <table class="table table-striped table-hover"> + <thead> + <tr> + <th scope="col">UUID</th> + <th scope="col">Status</th> + <th scope="col">Type</th> + <th scope="col">Device 1</th> + <th scope="col">Device 2</th> + <th scope="col"></th> + </tr> + </thead> + <tbody> + {% if apps %} + {% for app in apps %} + <tr> + <td> + {{ app.app_id.app_uuid.uuid }} + </td> + <td> + {{ ase.Name(app.app_status).replace('QKDAPPSTATUS_', '') }} + </td> + <td> + {{ ate.Name(app.app_type).replace('QKDAPPTYPES_', '').replace('CLIENT', 'EXTERNAL') }} + </td> + <td> + <li> + <a href="{{ url_for('device.detail', device_uuid=app.local_device_id.device_uuid.uuid) }}"> + {{ device_names.get(app.local_device_id.device_uuid.uuid, app.local_device_id.device_uuid.uuid) }} + <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16"> + <path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/> + <path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/> + </svg> + </a> + </li> + </td> + <td> + {% if app.remote_device_id.device_uuid.uuid %} + <li> + <a href="{{ url_for('device.detail', device_uuid=app.remote_device_id.device_uuid.uuid) }}"> + {{ device_names.get(app.remote_device_id.device_uuid.uuid, app.remote_device_id.device_uuid.uuid) }} + <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16"> + <path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/> + <path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/> + </svg> + </a> + </li> + {% endif %} + </td> + <td> + <a href="{{ url_for('qkd_app.detail', app_uuid=app.app_id.app_uuid.uuid) }}"> + <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16"> + <path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/> + <path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/> + </svg> + </a> + </td> + </tr> + {% endfor %} + {% else %} + <tr> + <td colspan="7">No apps found</td> + </tr> + {% endif %} + </tbody> + </table> + +{% endblock %} diff --git a/src/webui/service/templates/service/configure_QKD.html b/src/webui/service/templates/service/configure_QKD.html new file mode 100644 index 0000000000000000000000000000000000000000..a01f4519d7f4b09732fba6d24db034f143be9943 --- /dev/null +++ b/src/webui/service/templates/service/configure_QKD.html @@ -0,0 +1,188 @@ +<!-- + Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +{% extends 'base.html' %} + +{% block content %} +<h1>Add New Service [QKD]</h1> +<form method="POST" action="{{ url_for('service.add_configure_QKD') }}"> + <fieldset> + <div class="row mb-3"> + {{ form_qkd.hidden_tag() }} + </div> + <h3>Generic Service Parameters</h3> + {% if form_qkd.qkd_params is not none %} + <div class="row mb-3"> + {{ form_qkd.service_name.label(class="col-sm-2 col-form-label") }} + <div class="col-sm-10"> + {% if form_qkd.service_name.errors %} + {{ form_qkd.service_name(class="form-control is-invalid", placeholder="Mandatory") }} + <div class="invalid-feedback"> + {% for error in form_qkd.service_name.errors %} + <span>{{ error }}</span> + {% endfor %} + </div> + {% else %} + {{ form_qkd.service_name(class="form-control", placeholder="Mandatory") }} + {% endif %} + </div> + </div> + <div class="row mb-3"> + {{ form_qkd.service_type.label(class="col-sm-2 col-form-label") }} + <div class="col-sm-10"> + {% if form_qkd.service_type.errors %} + {{ form_qkd.service_type(class="form-control is-invalid", placeholder="Mandatory") }} + <div class="invalid-feedback"> + {% for error in form_qkd.service_type.errors %} + <span>{{ error }}</span> + {% endfor %} + </div> + {% else %} + {{ form_qkd.service_type(class="form-control", placeholder="Mandatory") }} + {% endif %} + </div> + </div> + <div class="row mb-3"> + {{ form_qkd.service_device_1.label(class="col-sm-2 col-form-label") }} + <div class="col-sm-4"> + {% if form_qkd.service_device_1.errors %} + {{ form_qkd.service_device_1(class="form-control is-invalid", placeholder="Mandatory") }} + <div class="invalid-feedback"> + {% for error in form_qkd.service_device_1.errors %} + <span>{{ error }}</span> + {% endfor %} + </div> + {% else %} + {{ form_qkd.service_device_1(class="form-control", placeholder="Mandatory") }} + {% endif %} + </div> + {{ form_qkd.service_device_2.label(class="col-sm-2 col-form-label") }} + <div class="col-sm-4"> + {% if form_qkd.service_device_2.errors %} + {{ form_qkd.service_device_2(class="form-control is-invalid", placeholder="Mandatory") }} + <div class="invalid-feedback"> + {% for error in form_qkd.service_device_2.errors %} + <span>{{ error }}</span> + {% endfor %} + </div> + {% else %} + {{ form_qkd.service_device_2(class="form-control", placeholder="Mandatory") }} + {% endif %} + </div> + </div> + <div class="row mb-3"> + {{ form_qkd.service_endpoint_1.label(class="col-sm-2 col-form-label") }} + <div class="col-sm-4"> + {% if form_qkd.service_endpoint_1.errors %} + {{ form_qkd.service_endpoint_1(class="form-control is-invalid", placeholder="Mandatory") }} + <div class="invalid-feedback"> + {% for error in form_qkd.service_endpoint_1.errors %} + <span>{{ error }}</span> + {% endfor %} + </div> + {% else %} + {{ form_qkd.service_endpoint_1(class="form-control", placeholder="Mandatory") }} + {% endif %} + </div> + {{ form_qkd.service_endpoint_2.label(class="col-sm-2 col-form-label") }} + <div class="col-sm-4"> + {% if form_qkd.service_endpoint_2.errors %} + {{ form_qkd.service_endpoint_2(class="form-control is-invalid", placeholder="Mandatory") }} + <div class="invalid-feedback"> + {% for error in form_qkd.service_endpoint_2.errors %} + <span>{{ error }}</span> + {% endfor %} + </div> + {% else %} + {{ form_qkd.service_endpoint_2(class="form-control", placeholder="Mandatory") }} + {% endif %} + </div> + </div> + </br> + <h3>Generic Service Constraints</h3> + <div class="row mb-3"> + {{ form_qkd.service_capacity.label(class="col-sm-2 col-form-label") }} + <div class="col-sm-10"> + {% if form_qkd.service_capacity.errors %} + {{ form_qkd.service_capacity(class="form-control is-invalid") }} + <div class="invalid-feedback"> + {% for error in form_qkd.service_capacity.errors %} + <span>{{ error }}</span> + {% endfor %} + </div> + {% else %} + {{ form_qkd.service_capacity(class="form-control") }} + {% endif %} + </div> + </div> + <div class="row mb-3"> + {{ form_qkd.service_latency.label(class="col-sm-2 col-form-label") }} + <div class="col-sm-10"> + {% if form_qkd.service_latency.errors %} + {{ form_qkd.service_latency(class="form-control is-invalid") }} + <div class="invalid-feedback"> + {% for error in form_qkd.service_latency.errors %} + <span>{{ error }}</span> + {% endfor %} + </div> + {% else %} + {{ form_qkd.service_latency(class="form-control") }} + {% endif %} + </div> + </div> + <div class="row mb-3"> + {{ form_qkd.service_availability.label(class="col-sm-2 col-form-label") }} + <div class="col-sm-10"> + {% if form_qkd.service_availability.errors %} + {{ form_qkd.service_availability(class="form-control is-invalid") }} + <div class="invalid-feedback"> + {% for error in form_qkd.service_availability.errors %} + <span>{{ error }}</span> + {% endfor %} + </div> + {% else %} + {{ form_qkd.service_availability(class="form-control") }} + {% endif %} + </div> + </div> + <div class="row mb-3"> + {{ form_qkd.service_isolation.label(class="col-sm-2 col-form-label") }} + <div class="col-sm-10"> + {% if form_qkd.service_isolation.errors %} + {{ form_qkd.service_isolation(class="form-control is-invalid") }} + <div class="invalid-feedback"> + {% for error in form_qkd.service_isolation.errors %} + <span>{{ error }}</span> + {% endfor %} + </div> + {% else %} + {{ form_qkd.service_isolation(class="form-control") }} + {% endif %} + </div> + </div> + {% endif %} + <button type="submit" class="btn btn-primary"> + <i class="bi bi-plus-circle-fill"></i> + {{ submit_text }} + </button> + <button type="button" class="btn btn-block btn-secondary" onclick="javascript: history.back()"> + <i class="bi bi-box-arrow-in-left"></i> + Cancel + </button> + </fieldset> + </form> + {% endblock %} +