diff --git a/.gitignore b/.gitignore index a89b99da7a00cc350eed2ba7ebdbfdf52ec9fdd1..db47387c8c8ff9900a59107642221960134aa1f1 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 cb6ea273b144535bb3bbb425df601f77ad117cc5..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' @@ -50,5 +51,7 @@ include: - 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..42b49fe984d08c8fb2cae14e68f0a6d2a7a726dd 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,21 @@ 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' ' ' + echo + + 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 +361,23 @@ 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' ' ' + echo + + 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 +389,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 +399,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/tfs.sh b/deploy/tfs.sh index 65c1e8de28f2045b2ac78938b84d3c33e282025e..6c0ddcb63e71abd2e713e4809aeb7795b43053fa 100755 --- a/deploy/tfs.sh +++ b/deploy/tfs.sh @@ -344,11 +344,10 @@ for COMPONENT in $TFS_COMPONENTS; do VERSION=$(grep -i "${GITLAB_REPO_URL}/${COMPONENT}-gateway:" "$MANIFEST" | cut -d ":" -f4) sed -E -i "s#image: $GITLAB_REPO_URL/$COMPONENT-gateway:${VERSION}#image: $IMAGE_URL#g" "$MANIFEST" else + VERSION=$(grep -i "${GITLAB_REPO_URL}/${COMPONENT}:" "$MANIFEST" | cut -d ":" -f4) if [ "$TFS_SKIP_BUILD" != "YES" ]; then IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$COMPONENT:$TFS_IMAGE_TAG" | sed 's,//,/,g' | sed 's,http:/,,g') - VERSION=$(grep -i "${GITLAB_REPO_URL}/${COMPONENT}:" "$MANIFEST" | cut -d ":" -f4) else - VERSION=$(grep -i "${GITLAB_REPO_URL}/${COMPONENT}:" "$MANIFEST" | cut -d ":" -f4) IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$COMPONENT:$VERSION" | sed 's,//,/,g' | sed 's,http:/,,g') fi sed -E -i "s#image: $GITLAB_REPO_URL/$COMPONENT:${VERSION}#image: $IMAGE_URL#g" "$MANIFEST" diff --git a/manifests/analyticsservice.yaml b/manifests/analyticsservice.yaml index 61666ead951c73e4034110b00a51743d33bd4ce2..536bb185286ba5444ad22d17d00706a066172e4c 100644 --- a/manifests/analyticsservice.yaml +++ b/manifests/analyticsservice.yaml @@ -98,11 +98,11 @@ spec: selector: app: analyticsservice ports: - - name: frontend-grpc + - name: grpc protocol: TCP port: 30080 targetPort: 30080 - - name: backend-grpc + - name: grpc-backend protocol: TCP port: 30090 targetPort: 30090 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/kpi_managerservice.yaml b/manifests/kpi_managerservice.yaml index 31eaf1284a08961adc6fe97d5e54eeaa7a98edae..f8ee8ff821ec1acb689cbe8d0bb8f8f407c971e3 100644 --- a/manifests/kpi_managerservice.yaml +++ b/manifests/kpi_managerservice.yaml @@ -40,7 +40,7 @@ spec: - name: LOG_LEVEL value: "INFO" - name: CRDB_DATABASE - value: "tfs_kpi" + value: "tfs_kpi_mgmt" envFrom: - secretRef: name: crdb-data 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 ed713bf29ad8228ab3f5b051af24519c2fb9ef09..619d85f7a82af48c71464038bf14a833903d1a58 100644 --- a/manifests/nginx_ingress_http.yaml +++ b/manifests/nginx_ingress_http.yaml @@ -66,6 +66,6 @@ spec: pathType: Prefix backend: service: - name: qkd-appservice + name: nbiservice port: - number: 8005 + number: 8080 diff --git a/manifests/qkd_appservice.yaml b/manifests/qkd_appservice.yaml index 4f89d6c6f8400b509dc595f551e8f181e70b2f51..ba02e2e1da34ac670f68e17c28e9847603401d3a 100644 --- a/manifests/qkd_appservice.yaml +++ b/manifests/qkd_appservice.yaml @@ -28,36 +28,35 @@ spec: spec: terminationGracePeriodSeconds: 5 containers: - - name: server - image: labs.etsi.org:5050/tfs/controller/qkd_app:latest - imagePullPolicy: Always - ports: - - containerPort: 10060 - - containerPort: 9192 - - containerPort: 8005 - env: - - name: LOG_LEVEL - value: "DEBUG" - - name: CRDB_DATABASE_APP - 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 + - 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 @@ -70,14 +69,11 @@ spec: selector: app: qkd-appservice ports: - - name: grpc - protocol: TCP - port: 10060 - targetPort: 10060 - - name: metrics - protocol: TCP - port: 9192 - targetPort: 9192 - - name: http - port: 8005 - targetPort: 8005 + - 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/telemetryservice.yaml b/manifests/telemetryservice.yaml index c3763d6a91756c2592ec819d60bc649584ef3ca9..86d864157838513dd68f10679d44d11b074c422c 100644 --- a/manifests/telemetryservice.yaml +++ b/manifests/telemetryservice.yaml @@ -38,7 +38,7 @@ spec: - name: LOG_LEVEL value: "INFO" - name: CRDB_DATABASE - value: "tfs_kpi" + value: "tfs_telemetry" - name: METRICS_PORT value: "9192" envFrom: @@ -98,11 +98,11 @@ spec: selector: app: telemetryservice ports: - - name: frontend-grpc + - name: grpc protocol: TCP port: 30050 targetPort: 30050 - - name: backend-grpc + - name: grpc-backend protocol: TCP port: 30060 targetPort: 30060 diff --git a/my_deploy.sh b/my_deploy.sh index 68b6bb044f25f7bdc4091327ade6850b5d6db565..41d8219f50db8b9e24e502ee340454c9ad92b092 100755 --- a/my_deploy.sh +++ b/my_deploy.sh @@ -20,13 +20,16 @@ export TFS_REGISTRY_IMAGES="http://localhost:32000/tfs/" # Set the list of components, separated by spaces, you want to build images for, and deploy. -export TFS_COMPONENTS="context device pathcomp opticalcontroller qkd_app service slice webui nbi " +export TFS_COMPONENTS="context device pathcomp service slice nbi webui" # Uncomment to activate Monitoring (old) #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" @@ -80,6 +83,9 @@ export TFS_COMPONENTS="context device pathcomp opticalcontroller qkd_app service # export TFS_COMPONENTS="${BEFORE} qkd_app service ${AFTER}" #fi +# Uncomment to activate Load Generator +#export TFS_COMPONENTS="${TFS_COMPONENTS} load_generator" + # 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 03ecd459a22ad31042ce6524ce3ac6be83e6840c..6e531902103fb60536400e614ea49a7d8fa1bb78 100644 --- a/proto/context.proto +++ b/proto/context.proto @@ -547,7 +547,7 @@ message Constraint_Custom { } message Constraint_Schedule { - float start_timestamp = 1; + double start_timestamp = 1; float duration_days = 2; } @@ -610,6 +610,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 { @@ -622,6 +632,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 index 7b6c47330833849b889e770aac43844ec6e6072c..b22948d6cd3040146677d378a080283786d44f96 100644 --- a/proto/qkd_app.proto +++ b/proto/qkd_app.proto @@ -1,11 +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. + syntax = "proto3"; package qkd_app; import "context.proto"; -// Optare: Change this if you want to change App's structure or enums. -// Optare: If a message (structure) is changed it must be changed in src/app/service/database +// 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; @@ -13,16 +28,26 @@ enum QKDAppStatusEnum { 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; @@ -32,22 +57,24 @@ message App { 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 ListApps(context.ContextId) returns (AppList) {} + rpc GetApp(AppId) returns (App) {} + rpc DeleteApp (AppId) returns (Empty) {} // Use locally defined Empty +} - message AppList { +// 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-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 85cb8664a7e93b63363b0bad51b52449e57d80b1..b9f86a208aab3fddbf243ba986de153775f30c2c 100755 --- a/scripts/run_tests_locally-telemetry-DB.sh +++ b/scripts/run_tests_locally-telemetry-DB.sh @@ -21,7 +21,7 @@ cd $PROJECTDIR/src # 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_kpi_mgmt?sslmode=require" +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 97a06a0d6c16daf94e3e6b30bfc70eca3e7ce3a3..f711282401d8fff9b6c98cea7c9240482f1ba24b 100755 --- a/scripts/run_tests_locally-telemetry-backend.sh +++ b/scripts/run_tests_locally-telemetry-backend.sh @@ -19,7 +19,12 @@ 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 diff --git a/scripts/run_tests_locally-telemetry-frontend.sh b/scripts/run_tests_locally-telemetry-frontend.sh index 7506be5e0750b44e37368e86dbbfd00131c0d270..4bb7bc3fa8e198ead54224148f60044e079ccdf3 100755 --- a/scripts/run_tests_locally-telemetry-frontend.sh +++ b/scripts/run_tests_locally-telemetry-frontend.sh @@ -18,9 +18,10 @@ PROJECTDIR=`pwd` cd $PROJECTDIR/src -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 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_automation.sh b/scripts/show_logs_automation.sh index 8a0e417d9a7ddf1ffe0b4e4529606683ae600ecd..26684298091403f4dc737fc0d1ca5b05d82ad374 100755 --- a/scripts/show_logs_automation.sh +++ b/scripts/show_logs_automation.sh @@ -24,4 +24,4 @@ export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"} # Automated steps start here ######################################################################################################################## -kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/ztpservice +kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/automationservice 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/frontend/client/AnalyticsFrontendClient.py b/src/analytics/frontend/client/AnalyticsFrontendClient.py index 90e95d661d46f24ae5ffaeb7bcfa19b7e1f36526..809c957ea48a07a657fe1edc244c9c0f125e9058 100644 --- a/src/analytics/frontend/client/AnalyticsFrontendClient.py +++ b/src/analytics/frontend/client/AnalyticsFrontendClient.py @@ -28,8 +28,8 @@ RETRY_DECORATOR = retry(max_retries=MAX_RETRIES, delay_function=DELAY_FUNCTION, class AnalyticsFrontendClient: def __init__(self, host=None, port=None): - if not host: host = get_service_host(ServiceNameEnum.ANALYTICSFRONTEND) - if not port: port = get_service_port_grpc(ServiceNameEnum.ANALYTICSFRONTEND) + if not host: host = get_service_host(ServiceNameEnum.ANALYTICS) + if not port: port = get_service_port_grpc(ServiceNameEnum.ANALYTICS) self.endpoint = '{:s}:{:s}'.format(str(host), str(port)) LOGGER.debug('Creating channel to {:s}...'.format(str(self.endpoint))) self.channel = None 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/AnalyticsFrontendService.py b/src/analytics/frontend/service/AnalyticsFrontendService.py index 42a7fc9b60418c1c0fc5af6f320ae5c330ce8871..8d2536fe091459d6026941f4eae52f58f7cd3f3a 100644 --- a/src/analytics/frontend/service/AnalyticsFrontendService.py +++ b/src/analytics/frontend/service/AnalyticsFrontendService.py @@ -20,7 +20,7 @@ from analytics.frontend.service.AnalyticsFrontendServiceServicerImpl import Anal class AnalyticsFrontendService(GenericGrpcService): def __init__(self, cls_name: str = __name__): - port = get_service_port_grpc(ServiceNameEnum.ANALYTICSFRONTEND) + port = get_service_port_grpc(ServiceNameEnum.ANALYTICS) super().__init__(port, cls_name=cls_name) self.analytics_frontend_servicer = AnalyticsFrontendServiceServicerImpl() diff --git a/src/analytics/frontend/service/AnalyticsFrontendServiceServicerImpl.py b/src/analytics/frontend/service/AnalyticsFrontendServiceServicerImpl.py index a7fc8d49248ff01a860accac1b64a29d5533069f..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 @@ -102,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: @@ -135,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}") @@ -207,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)) + # 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 delivered to topic {:}'.format(msg.topic())) 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 44e84e4683bcdcec72e572b8e4deea903bf0de65..74fef6c79cc2328b65671b392220ae86106e9d5d 100644 --- a/src/analytics/frontend/tests/test_frontend.py +++ b/src/analytics/frontend/tests/test_frontend.py @@ -41,9 +41,9 @@ from apscheduler.triggers.interval import IntervalTrigger LOCAL_HOST = '127.0.0.1' -ANALYTICS_FRONTEND_PORT = str(get_service_port_grpc(ServiceNameEnum.ANALYTICSFRONTEND)) -os.environ[get_env_var_name(ServiceNameEnum.ANALYTICSFRONTEND, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST) -os.environ[get_env_var_name(ServiceNameEnum.ANALYTICSFRONTEND, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(ANALYTICS_FRONTEND_PORT) +ANALYTICS_FRONTEND_PORT = str(get_service_port_grpc(ServiceNameEnum.ANALYTICS)) +os.environ[get_env_var_name(ServiceNameEnum.ANALYTICS, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST) +os.environ[get_env_var_name(ServiceNameEnum.ANALYTICS, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(ANALYTICS_FRONTEND_PORT) LOGGER = logging.getLogger(__name__) @@ -84,10 +84,10 @@ def analyticsFrontend_client(analyticsFrontend_service : AnalyticsFrontendServic ########################### # --- "test_validate_kafka_topics" should be executed before the functionality tests --- -# def test_validate_kafka_topics(): -# LOGGER.debug(" >>> test_validate_kafka_topics: START <<< ") -# response = KafkaTopic.create_all_topics() -# assert isinstance(response, bool) +def test_validate_kafka_topics(): + LOGGER.debug(" >>> test_validate_kafka_topics: START <<< ") + response = KafkaTopic.create_all_topics() + assert isinstance(response, bool) # ----- core funtionality test ----- # def test_StartAnalytics(analyticsFrontend_client): @@ -97,24 +97,31 @@ def analyticsFrontend_client(analyticsFrontend_service : AnalyticsFrontendServic # 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)) - assert isinstance(added_analyzer_id, AnalyzerId) - -def test_StopAnalytic(analyticsFrontend_client): - LOGGER.info(' >>> test_StopAnalytic START: <<< ') - response = analyticsFrontend_client.StopAnalyzer(create_analyzer_id()) + LOGGER.info(' --> Calling StartResponseListener... ') + class_obj = AnalyticsFrontendServiceServicerImpl() + response = class_obj.StartResponseListener(added_analyzer_id.analyzer_id.uuid) + LOGGER.debug(response) + LOGGER.info("waiting for timer to comlete ...") + time.sleep(3) + LOGGER.info('--> StopAnalyzer') + response = analyticsFrontend_client.StopAnalyzer(added_analyzer_id) LOGGER.debug(str(response)) - assert isinstance(response, Empty) -def test_SelectAnalytics(analyticsFrontend_client): - LOGGER.info(' >>> test_SelectAnalytics START: <<< ') - response = analyticsFrontend_client.SelectAnalyzers(create_analyzer_filter()) - LOGGER.debug(str(response)) - assert isinstance(response, AnalyzerList) +# def test_SelectAnalytics(analyticsFrontend_client): +# LOGGER.info(' >>> test_SelectAnalytics START: <<< ') +# response = analyticsFrontend_client.SelectAnalyzers(create_analyzer_filter()) +# LOGGER.debug(str(response)) +# assert isinstance(response, AnalyzerList) + +# def test_StopAnalytic(analyticsFrontend_client): +# LOGGER.info(' >>> test_StopAnalytic START: <<< ') +# response = analyticsFrontend_client.StopAnalyzer(create_analyzer_id()) +# LOGGER.debug(str(response)) +# assert isinstance(response, Empty) # def test_ResponseListener(): # LOGGER.info(' >>> test_ResponseListener START <<< ') 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/qkd_app/service/rest_server/RestServer.py b/src/automation/Config.py similarity index 56% rename from src/qkd_app/service/rest_server/RestServer.py rename to src/automation/Config.py index e21531c5bcf0e1cf15a8f08952d6325a8349f398..7c7568fdb6e3b1446aa9412ad32a0a5948ba949b 100644 --- a/src/qkd_app/service/rest_server/RestServer.py +++ b/src/automation/Config.py @@ -12,12 +12,3 @@ # 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_baseurl_http, get_service_port_http -from common.tools.service.GenericRestServer import GenericRestServer - -class RestServer(GenericRestServer): - def __init__(self, cls_name: str = __name__) -> None: - bind_port = get_service_port_http(ServiceNameEnum.QKD_APP) - base_url = get_service_baseurl_http(ServiceNameEnum.QKD_APP) - super().__init__(bind_port, base_url, cls_name=cls_name) 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/qkd_app/service/rest_server/__init__.py b/src/automation/__init__.py similarity index 99% rename from src/qkd_app/service/rest_server/__init__.py rename to src/automation/__init__.py index 07d08814021ef82220611ee21c01ba01806682e9..7c7568fdb6e3b1446aa9412ad32a0a5948ba949b 100644 --- a/src/qkd_app/service/rest_server/__init__.py +++ b/src/automation/__init__.py @@ -11,3 +11,4 @@ # WITHOUT 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/EventEngine.py b/src/automation/service/EventEngine.py new file mode 100644 index 0000000000000000000000000000000000000000..26c2b28cbe35230beec90dd9df4112d4ad131876 --- /dev/null +++ b/src/automation/service/EventEngine.py @@ -0,0 +1,169 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, queue, threading +from typing import Dict, Optional +from automation.service.Tools import create_kpi_descriptor, start_collector +from common.proto.context_pb2 import ( + ConfigActionEnum, DeviceEvent, DeviceOperationalStatusEnum, Empty, ServiceEvent +) +from common.proto.kpi_sample_types_pb2 import KpiSampleType +from common.tools.grpc.BaseEventCollector import BaseEventCollector +from common.tools.grpc.BaseEventDispatcher import BaseEventDispatcher +from common.tools.grpc.Tools import grpc_message_to_json_string +from context.client.ContextClient import ContextClient +from kpi_manager.client.KpiManagerClient import KpiManagerClient +from telemetry.frontend.client.TelemetryFrontendClient import TelemetryFrontendClient + +LOGGER = logging.getLogger(__name__) + +DEVICE_OP_STATUS_UNDEFINED = DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_UNDEFINED +DEVICE_OP_STATUS_DISABLED = DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_DISABLED +DEVICE_OP_STATUS_ENABLED = DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_ENABLED +DEVICE_OP_STATUS_NOT_ENABLED = {DEVICE_OP_STATUS_UNDEFINED, DEVICE_OP_STATUS_DISABLED} + +KPISAMPLETYPE_UNKNOWN = KpiSampleType.KPISAMPLETYPE_UNKNOWN + +class EventCollector(BaseEventCollector): + pass + +class EventDispatcher(BaseEventDispatcher): + def __init__( + self, events_queue : queue.PriorityQueue, + terminate : Optional[threading.Event] = None + ) -> None: + super().__init__(events_queue, terminate) + self._context_client = ContextClient() + self._kpi_manager_client = KpiManagerClient() + self._telemetry_client = TelemetryFrontendClient() + self._device_endpoint_monitored : Dict[str, Dict[str, bool]] = dict() + + def dispatch_device_create(self, device_event : DeviceEvent) -> None: + MSG = 'Processing Device Create: {:s}' + LOGGER.info(MSG.format(grpc_message_to_json_string(device_event))) + self._device_activate_monitoring(device_event) + + def dispatch_device_update(self, device_event : DeviceEvent) -> None: + MSG = 'Processing Device Update: {:s}' + LOGGER.info(MSG.format(grpc_message_to_json_string(device_event))) + self._device_activate_monitoring(device_event) + + def dispatch_device_remove(self, device_event : DeviceEvent) -> None: + MSG = 'Processing Device Remove: {:s}' + LOGGER.info(MSG.format(grpc_message_to_json_string(device_event))) + + def dispatch_service_create(self, service_event : ServiceEvent) -> None: + MSG = 'Processing Service Create: {:s}' + LOGGER.info(MSG.format(grpc_message_to_json_string(service_event))) + + def dispatch_service_update(self, service_event : ServiceEvent) -> None: + MSG = 'Processing Service Update: {:s}' + LOGGER.info(MSG.format(grpc_message_to_json_string(service_event))) + + def dispatch_service_remove(self, service_event : ServiceEvent) -> None: + MSG = 'Processing Service Remove: {:s}' + LOGGER.info(MSG.format(grpc_message_to_json_string(service_event))) + + def _device_activate_monitoring(self, device_event : DeviceEvent) -> None: + device_id = device_event.device_id + device_uuid = device_id.device_uuid.uuid + device = self._context_client.GetDevice(device_id) + + device_op_status = device.device_operational_status + if device_op_status != DEVICE_OP_STATUS_ENABLED: + LOGGER.debug('Ignoring Device not enabled: {:s}'.format(grpc_message_to_json_string(device))) + return + + enabled_endpoint_names = set() + for config_rule in device.device_config.config_rules: + if config_rule.action != ConfigActionEnum.CONFIGACTION_SET: continue + if config_rule.WhichOneof('config_rule') != 'custom': continue + str_resource_key = str(config_rule.custom.resource_key) + if not str_resource_key.startswith('/interface['): continue + json_resource_value = json.loads(config_rule.custom.resource_value) + if 'name' not in json_resource_value: continue + if 'enabled' not in json_resource_value: continue + if not json_resource_value['enabled']: continue + enabled_endpoint_names.add(json_resource_value['name']) + + endpoints_monitored = self._device_endpoint_monitored.setdefault(device_uuid, dict()) + for endpoint in device.device_endpoints: + endpoint_uuid = endpoint.endpoint_id.endpoint_uuid.uuid + endpoint_name_or_uuid = endpoint.name + if endpoint_name_or_uuid is None or len(endpoint_name_or_uuid) == 0: + endpoint_name_or_uuid = endpoint_uuid + + endpoint_was_monitored = endpoints_monitored.get(endpoint_uuid, False) + endpoint_is_enabled = (endpoint_name_or_uuid in enabled_endpoint_names) + + if not endpoint_was_monitored and endpoint_is_enabled: + # activate + for kpi_sample_type in endpoint.kpi_sample_types: + if kpi_sample_type == KPISAMPLETYPE_UNKNOWN: continue + + kpi_id = create_kpi_descriptor( + self._kpi_manager_client, kpi_sample_type, + device_id=device.device_id, + endpoint_id=endpoint.endpoint_id, + ) + + duration_seconds = 86400 + interval_seconds = 10 + collector_id = start_collector( + self._telemetry_client, kpi_id, + duration_seconds, interval_seconds + ) + + endpoints_monitored[endpoint_uuid] = True + else: + MSG = 'Not implemented condition: event={:s} device={:s} endpoint={:s}' + \ + ' endpoint_was_monitored={:s} endpoint_is_enabled={:s}' + LOGGER.warning(MSG.format( + grpc_message_to_json_string(device_event), grpc_message_to_json_string(device), + grpc_message_to_json_string(endpoint), str(endpoint_was_monitored), + str(endpoint_is_enabled) + )) + +class EventEngine: + def __init__( + self, terminate : Optional[threading.Event] = None + ) -> None: + self._terminate = threading.Event() if terminate is None else terminate + + self._context_client = ContextClient() + self._event_collector = EventCollector(terminate=self._terminate) + self._event_collector.install_collector( + self._context_client.GetDeviceEvents, Empty(), + log_events_received=True + ) + self._event_collector.install_collector( + self._context_client.GetServiceEvents, Empty(), + log_events_received=True + ) + + self._event_dispatcher = EventDispatcher( + self._event_collector.get_events_queue(), + terminate=self._terminate + ) + + def start(self) -> None: + self._context_client.connect() + self._event_collector.start() + self._event_dispatcher.start() + + def stop(self) -> None: + self._terminate.set() + self._event_dispatcher.stop() + self._event_collector.stop() + self._context_client.close() diff --git a/src/automation/service/Tools.py b/src/automation/service/Tools.py new file mode 100644 index 0000000000000000000000000000000000000000..6a63475ca23c576a6fe946d6d149b70465ff1e1f --- /dev/null +++ b/src/automation/service/Tools.py @@ -0,0 +1,64 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT 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, uuid +from typing import Optional +from common.proto.context_pb2 import ConnectionId, DeviceId, EndPointId, LinkId, ServiceId, SliceId +from common.proto.kpi_manager_pb2 import KpiDescriptor, KpiId +from common.proto.kpi_sample_types_pb2 import KpiSampleType +from common.proto.telemetry_frontend_pb2 import Collector, CollectorId +from kpi_manager.client.KpiManagerClient import KpiManagerClient +from telemetry.frontend.client.TelemetryFrontendClient import TelemetryFrontendClient + +LOGGER = logging.getLogger(__name__) + +def create_kpi_descriptor( + kpi_manager_client : KpiManagerClient, + kpi_sample_type : KpiSampleType, + device_id : Optional[DeviceId ] = None, + endpoint_id : Optional[EndPointId ] = None, + service_id : Optional[ServiceId ] = None, + slice_id : Optional[SliceId ] = None, + connection_id : Optional[ConnectionId] = None, + link_id : Optional[LinkId ] = None, +) -> KpiId: + kpi_descriptor = KpiDescriptor() + kpi_descriptor.kpi_id.kpi_id.uuid = str(uuid.uuid4()) + kpi_descriptor.kpi_description = '' + kpi_descriptor.kpi_sample_type = kpi_sample_type + + if device_id is not None: kpi_descriptor.device_id .CopyFrom(device_id ) + if endpoint_id is not None: kpi_descriptor.endpoint_id .CopyFrom(endpoint_id ) + if service_id is not None: kpi_descriptor.service_id .CopyFrom(service_id ) + if slice_id is not None: kpi_descriptor.slice_id .CopyFrom(slice_id ) + if connection_id is not None: kpi_descriptor.connection_id.CopyFrom(connection_id) + if link_id is not None: kpi_descriptor.link_id .CopyFrom(link_id ) + + kpi_id : KpiId = kpi_manager_client.SetKpiDescriptor(kpi_descriptor) + return kpi_id + +def start_collector( + telemetry_client : TelemetryFrontendClient, + kpi_id : KpiId, + duration_seconds : float, + interval_seconds : float +) -> CollectorId: + collector = Collector() + collector.collector_id.collector_id.uuid = str(uuid.uuid4()) + collector.kpi_id.CopyFrom(kpi_id) + collector.duration_s = duration_seconds + collector.interval_s = interval_seconds + collector_id : CollectorId = telemetry_client.StartCollector(collector) + return collector_id 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..3baa0bd30b19fb624c5dcf0b236642704e42ab9f --- /dev/null +++ b/src/automation/service/__main__.py @@ -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. + +import logging, signal, sys, threading +from prometheus_client import start_http_server +from automation.service.EventEngine import EventEngine +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 .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...') + + 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.DEVICE, ENVVAR_SUFIX_SERVICE_HOST ), + get_env_var_name(ServiceNameEnum.DEVICE, ENVVAR_SUFIX_SERVICE_PORT_GRPC), + get_env_var_name(ServiceNameEnum.KPIMANAGER, ENVVAR_SUFIX_SERVICE_HOST ), + get_env_var_name(ServiceNameEnum.KPIMANAGER, ENVVAR_SUFIX_SERVICE_PORT_GRPC), + get_env_var_name(ServiceNameEnum.TELEMETRY, ENVVAR_SUFIX_SERVICE_HOST ), + get_env_var_name(ServiceNameEnum.TELEMETRY, ENVVAR_SUFIX_SERVICE_PORT_GRPC), + get_env_var_name(ServiceNameEnum.ANALYTICS, ENVVAR_SUFIX_SERVICE_HOST ), + get_env_var_name(ServiceNameEnum.ANALYTICS, ENVVAR_SUFIX_SERVICE_PORT_GRPC), + get_env_var_name(ServiceNameEnum.POLICY, ENVVAR_SUFIX_SERVICE_HOST ), + get_env_var_name(ServiceNameEnum.POLICY, ENVVAR_SUFIX_SERVICE_PORT_GRPC), + ]) + + 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) + + # Start Event Collection+Dispatching Engine + event_engine = EventEngine(terminate=terminate) + event_engine.start() + + # Starting Automation 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() + event_engine.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 8b2e215a0ee669726430d12ea4ebac334f69c1ce..bd4b9031fb1f33a5ad6c46e537961796bd3e2dae 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' @@ -65,10 +66,11 @@ class ServiceNameEnum(Enum): KPIMANAGER = 'kpi-manager' KPIVALUEAPI = 'kpi-value-api' KPIVALUEWRITER = 'kpi-value-writer' - TELEMETRYFRONTEND = 'telemetry-frontend' + TELEMETRY = 'telemetry' TELEMETRYBACKEND = 'telemetry-backend' - ANALYTICSFRONTEND = 'analytics-frontend' + ANALYTICS = 'analytics' ANALYTICSBACKEND = 'analytics-backend' + QOSPROFILE = 'qos-profile' # Used for test and debugging only DLT_GATEWAY = 'dltgateway' @@ -99,13 +101,15 @@ DEFAULT_SERVICE_GRPC_PORTS = { 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, - ServiceNameEnum.TELEMETRYFRONTEND .value : 30050, + ServiceNameEnum.TELEMETRY .value : 30050, ServiceNameEnum.TELEMETRYBACKEND .value : 30060, - ServiceNameEnum.ANALYTICSFRONTEND .value : 30080, + ServiceNameEnum.ANALYTICS .value : 30080, ServiceNameEnum.ANALYTICSBACKEND .value : 30090, + ServiceNameEnum.AUTOMATION .value : 30200, # Used for test and debugging only ServiceNameEnum.DLT_GATEWAY .value : 50051, @@ -114,15 +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.QKD_APP .value : 8005, + 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.QKD_APP .value : None, + ServiceNameEnum.NBI .value : None, + ServiceNameEnum.WEBUI.value : None, } diff --git a/src/common/Settings.py b/src/common/Settings.py index 13fcfc76966301599b0f5f39f2b188aea4e4d52a..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__) diff --git a/src/common/tools/descriptor/Loader.py b/src/common/tools/descriptor/Loader.py index ecae5cd6c251737c7dc085080eb481bd1135e587..ca93ef5f456bb4f8f0fd24638e53fa60c15d99c2 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 , OpticalLink) + Connection, Context, ContextId, Device, DeviceId, Empty, + Link, LinkId, Service, ServiceId, Slice, SliceId, + Topology, TopologyId , OpticalLink +) 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,6 +135,7 @@ 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', []) #--------------- Experimental Optical Link -------------- @@ -114,6 +144,50 @@ class DescriptorLoader: + 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 @@ -242,7 +316,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/grpc/BaseEventCollector.py b/src/common/tools/grpc/BaseEventCollector.py new file mode 100644 index 0000000000000000000000000000000000000000..04dfb654963da1ae4f83a8a14feaaa8c17d1f128 --- /dev/null +++ b/src/common/tools/grpc/BaseEventCollector.py @@ -0,0 +1,136 @@ +# Copyright 2022-2024 ETSI OSG/SDG TeraFlowSDN (TFS) (https://tfs.etsi.org/) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# See usage example below + +import grpc, logging, queue, threading, time +from typing import Any, Callable, List, Optional +from common.proto.context_pb2 import Empty +from common.tools.grpc.Tools import grpc_message_to_json_string +from context.client.ContextClient import ContextClient + +LOGGER = logging.getLogger(__name__) +LOGGER.setLevel(logging.DEBUG) + +class CollectorThread(threading.Thread): + def __init__( + self, subscription_func : Callable, events_queue = queue.PriorityQueue, + terminate = threading.Event, log_events_received: bool = False + ) -> None: + super().__init__(daemon=False) + self._subscription_func = subscription_func + self._events_queue = events_queue + self._terminate = terminate + self._log_events_received = log_events_received + self._stream = None + + def cancel(self) -> None: + if self._stream is None: return + self._stream.cancel() + + def run(self) -> None: + while not self._terminate.is_set(): + self._stream = self._subscription_func() + try: + for event in self._stream: + if self._log_events_received: + str_event = grpc_message_to_json_string(event) + LOGGER.info('[_collect] event: {:s}'.format(str_event)) + timestamp = event.event.timestamp.timestamp + self._events_queue.put_nowait((timestamp, event)) + except grpc.RpcError as e: + if e.code() == grpc.StatusCode.UNAVAILABLE: # pylint: disable=no-member + LOGGER.info('[_collect] UNAVAILABLE... retrying...') + time.sleep(0.5) + continue + elif e.code() == grpc.StatusCode.CANCELLED: # pylint: disable=no-member + break + else: + raise # pragma: no cover + +class BaseEventCollector: + def __init__( + self, terminate : Optional[threading.Event] = None + ) -> None: + self._events_queue = queue.PriorityQueue() + self._terminate = threading.Event() if terminate is None else terminate + self._collector_threads : List[CollectorThread] = list() + + def install_collector( + self, subscription_method : Callable, request_message : Any, + log_events_received : bool = False + ) -> None: + self._collector_threads.append(CollectorThread( + lambda: subscription_method(request_message), + self._events_queue, self._terminate, log_events_received + )) + + def start(self): + self._terminate.clear() + for collector_thread in self._collector_threads: + collector_thread.start() + + def stop(self): + self._terminate.set() + + for collector_thread in self._collector_threads: + collector_thread.cancel() + + for collector_thread in self._collector_threads: + collector_thread.join() + + def get_events_queue(self) -> queue.PriorityQueue: + return self._events_queue + + def get_event(self, block : bool = True, timeout : float = 0.1): + try: + _,event = self._events_queue.get(block=block, timeout=timeout) + return event + except queue.Empty: # pylint: disable=catching-non-exception + return None + + def get_events(self, block : bool = True, timeout : float = 0.1, count : int = None): + events = [] + if count is None: + while not self._terminate.is_set(): + event = self.get_event(block=block, timeout=timeout) + if event is None: break + events.append(event) + else: + while len(events) < count: + if self._terminate.is_set(): break + event = self.get_event(block=block, timeout=timeout) + if event is None: continue + events.append(event) + return sorted(events, key=lambda e: e.event.timestamp.timestamp) + +def main() -> None: + logging.basicConfig(level=logging.INFO) + + context_client = ContextClient() + context_client.connect() + + event_collector = BaseEventCollector() + event_collector.install_collector(context_client.GetDeviceEvents, Empty(), log_events_received=True) + event_collector.install_collector(context_client.GetLinkEvents, Empty(), log_events_received=True) + event_collector.install_collector(context_client.GetServiceEvents, Empty(), log_events_received=True) + event_collector.start() + + time.sleep(60) + + event_collector.stop() + context_client.close() + +if __name__ == '__main__': + main() diff --git a/src/common/tools/grpc/BaseEventDispatcher.py b/src/common/tools/grpc/BaseEventDispatcher.py new file mode 100644 index 0000000000000000000000000000000000000000..c9ec292c994bb4728043bf3bfed73e176f4f748a --- /dev/null +++ b/src/common/tools/grpc/BaseEventDispatcher.py @@ -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. + +# See usage example below + +import logging, queue, threading, time +from typing import Any, Callable, Optional +from common.proto.context_pb2 import DeviceEvent, Empty, EventTypeEnum, LinkEvent +from common.tools.grpc.BaseEventCollector import BaseEventCollector +from common.tools.grpc.Tools import grpc_message_to_json_string +from context.client.ContextClient import ContextClient + +LOGGER = logging.getLogger(__name__) + +class BaseEventDispatcher(threading.Thread): + def __init__( + self, events_queue : queue.PriorityQueue, + terminate : Optional[threading.Event] = None + ) -> None: + super().__init__(daemon=True) + self._events_queue = events_queue + self._terminate = threading.Event() if terminate is None else terminate + + def stop(self): + self._terminate.set() + + def _get_event(self, block : bool = True, timeout : Optional[float] = 0.5) -> Optional[Any]: + try: + _, event = self._events_queue.get(block=block, timeout=timeout) + return event + except queue.Empty: + return None + + def _get_dispatcher(self, event : Any) -> Optional[Callable]: + object_name = str(event.__class__.__name__).lower().replace('event', '') + event_type = EventTypeEnum.Name(event.event.event_type).lower().replace('eventtype_', '') + + method_name = 'dispatch_{:s}_{:s}'.format(object_name, event_type) + dispatcher = getattr(self, method_name, None) + if dispatcher is not None: return dispatcher + + method_name = 'dispatch_{:s}'.format(object_name) + dispatcher = getattr(self, method_name, None) + if dispatcher is not None: return dispatcher + + method_name = 'dispatch' + dispatcher = getattr(self, method_name, None) + if dispatcher is not None: return dispatcher + + return None + + def run(self) -> None: + while not self._terminate.is_set(): + event = self._get_event() + if event is None: continue + + dispatcher = self._get_dispatcher(event) + if dispatcher is None: + MSG = 'No dispatcher available for Event({:s})' + LOGGER.warning(MSG.format(grpc_message_to_json_string(event))) + continue + + dispatcher(event) + +class MyEventDispatcher(BaseEventDispatcher): + def dispatch_device_create(self, device_event : DeviceEvent) -> None: + MSG = 'Processing Device Create: {:s}' + LOGGER.info(MSG.format(grpc_message_to_json_string(device_event))) + + def dispatch_device_update(self, device_event : DeviceEvent) -> None: + MSG = 'Processing Device Update: {:s}' + LOGGER.info(MSG.format(grpc_message_to_json_string(device_event))) + + def dispatch_device_remove(self, device_event : DeviceEvent) -> None: + MSG = 'Processing Device Remove: {:s}' + LOGGER.info(MSG.format(grpc_message_to_json_string(device_event))) + + def dispatch_link(self, link_event : LinkEvent) -> None: + MSG = 'Processing Link Create/Update/Remove: {:s}' + LOGGER.info(MSG.format(grpc_message_to_json_string(link_event))) + + def dispatch(self, event : Any) -> None: + MSG = 'Processing any other Event: {:s}' + LOGGER.info(MSG.format(grpc_message_to_json_string(event))) + +def main() -> None: + logging.basicConfig(level=logging.INFO) + + context_client = ContextClient() + context_client.connect() + + event_collector = BaseEventCollector() + event_collector.install_collector(context_client.GetDeviceEvents, Empty(), log_events_received=True) + event_collector.install_collector(context_client.GetLinkEvents, Empty(), log_events_received=True) + event_collector.install_collector(context_client.GetServiceEvents, Empty(), log_events_received=True) + event_collector.start() + + event_dispatcher = MyEventDispatcher(event_collector.get_events_queue()) + event_dispatcher.start() + + time.sleep(60) + + event_dispatcher.stop() + event_collector.stop() + context_client.close() + +if __name__ == '__main__': + main() diff --git a/src/common/tools/grpc/ExampleEventEngine.py b/src/common/tools/grpc/ExampleEventEngine.py new file mode 100644 index 0000000000000000000000000000000000000000..f27792497db09467c0225f07d036adc8c5b5ed84 --- /dev/null +++ b/src/common/tools/grpc/ExampleEventEngine.py @@ -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. + +import logging, threading, time +from typing import Optional +from common.proto.context_pb2 import DeviceEvent, Empty, ServiceEvent +from common.tools.grpc.BaseEventCollector import BaseEventCollector +from common.tools.grpc.BaseEventDispatcher import BaseEventDispatcher +from common.tools.grpc.Tools import grpc_message_to_json_string +from context.client.ContextClient import ContextClient + +LOGGER = logging.getLogger(__name__) + +class EventCollector(BaseEventCollector): + pass + +class EventDispatcher(BaseEventDispatcher): + def dispatch_device_create(self, device_event : DeviceEvent) -> None: + MSG = 'Processing Device Create: {:s}' + LOGGER.info(MSG.format(grpc_message_to_json_string(device_event))) + + def dispatch_device_update(self, device_event : DeviceEvent) -> None: + MSG = 'Processing Device Update: {:s}' + LOGGER.info(MSG.format(grpc_message_to_json_string(device_event))) + + def dispatch_device_remove(self, device_event : DeviceEvent) -> None: + MSG = 'Processing Device Remove: {:s}' + LOGGER.info(MSG.format(grpc_message_to_json_string(device_event))) + + def dispatch_service_create(self, service_event : ServiceEvent) -> None: + MSG = 'Processing Service Create: {:s}' + LOGGER.info(MSG.format(grpc_message_to_json_string(service_event))) + + def dispatch_service_update(self, service_event : ServiceEvent) -> None: + MSG = 'Processing Service Update: {:s}' + LOGGER.info(MSG.format(grpc_message_to_json_string(service_event))) + + def dispatch_service_remove(self, service_event : ServiceEvent) -> None: + MSG = 'Processing Service Remove: {:s}' + LOGGER.info(MSG.format(grpc_message_to_json_string(service_event))) + +class ExampleEventEngine: + def __init__( + self, terminate : Optional[threading.Event] = None + ) -> None: + self._terminate = threading.Event() if terminate is None else terminate + + self._context_client = ContextClient() + self._event_collector = EventCollector(terminate=self._terminate) + self._event_collector.install_collector( + self._context_client.GetDeviceEvents, Empty(), + log_events_received=True + ) + self._event_collector.install_collector( + self._context_client.GetLinkEvents, Empty(), + log_events_received=True + ) + self._event_collector.install_collector( + self._context_client.GetServiceEvents, Empty(), + log_events_received=True + ) + + self._event_dispatcher = EventDispatcher( + self._event_collector.get_events_queue(), + terminate=self._terminate + ) + + def start(self) -> None: + self._context_client.connect() + self._event_collector.start() + self._event_dispatcher.start() + + def stop(self) -> None: + self._terminate.set() + self._event_dispatcher.stop() + self._event_collector.stop() + self._context_client.close() + +def main() -> None: + logging.basicConfig(level=logging.INFO) + + event_engine = ExampleEventEngine() + event_engine.start() + + time.sleep(60) + + event_engine.stop() + +if __name__ == '__main__': + main() diff --git a/src/common/tools/kafka/Variables.py b/src/common/tools/kafka/Variables.py index 73b633e23cd55aefeed9b8075f2ad35348fc83ef..8ff6447f7784fd9e6846c1b73bc176b0a49f25e1 100644 --- a/src/common/tools/kafka/Variables.py +++ b/src/common/tools/kafka/Variables.py @@ -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/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/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/service/DeviceServiceServicerImpl.py b/src/device/service/DeviceServiceServicerImpl.py index 687c46ef2a45eb812514a446528cc32ccd1102e5..347bbcdbb8d4a5cf95e73a845d9a6c9f697d8a29 100644 --- a/src/device/service/DeviceServiceServicerImpl.py +++ b/src/device/service/DeviceServiceServicerImpl.py @@ -262,8 +262,15 @@ class DeviceServiceServicerImpl(DeviceServiceServicer): device_id = context_client.SetDevice(device) device = context_client.GetDevice(device_id) - if request.device_operational_status != DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_UNDEFINED: - device.device_operational_status = request.device_operational_status + ztp_service_host = get_env_var_name(ServiceNameEnum.ZTP, ENVVAR_SUFIX_SERVICE_HOST) + environment_variables = set(os.environ.keys()) + if ztp_service_host in environment_variables: + # ZTP component is deployed; accept status updates + if request.device_operational_status != DeviceOperationalStatusEnum.DEVICEOPERATIONALSTATUS_UNDEFINED: + device.device_operational_status = request.device_operational_status + else: + # ZTP is not deployed; activated during AddDevice and not modified + pass t4 = time.time() # TODO: use of datastores (might be virtual ones) to enable rollbacks 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/tests/test_kpi_db.py b/src/kpi_manager/tests/test_kpi_db.py index b1513a83f7c6122a34553d5933aea8d8c438e2a6..b731ba385e54ed3ccb3c7a2e589977188ceb0e3c 100644 --- a/src/kpi_manager/tests/test_kpi_db.py +++ b/src/kpi_manager/tests/test_kpi_db.py @@ -14,39 +14,16 @@ import logging -# from kpi_manager.database.Kpi_DB import KpiDB -from common.proto.kpi_manager_pb2 import KpiDescriptorList -from .test_messages import create_kpi_filter_request -from kpi_manager.database.KpiModel import Kpi as KpiModel from kpi_manager.database.KpiDB import KpiDB -# from common.tools.database.GenericDatabase import Database +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() kpiDBobj.create_tables() kpiDBobj.verify_tables() - -# def test_generic_DB_select_method(): -# LOGGER.info("--> STARTED-test_generic_DB_select_method") -# kpi_obj = KpiDB() -# _filter = create_kpi_filter_request() -# # response = KpiDescriptorList() -# try: -# kpi_obj.select_with_filter(KpiModel, _filter) -# except Exception as e: -# LOGGER.error('Unable to apply filter on kpi descriptor. {:}'.format(e)) -# LOGGER.info("--> FINISHED-test_generic_DB_select_method") -# # try: -# # for row in rows: -# # kpiDescriptor_obj = KpiModel.convert_row_to_KpiDescriptor(row) -# # response.kpi_descriptor_list.append(kpiDescriptor_obj) -# # return response -# # except Exception as e: -# # LOGGER.info('Unable to process filter response {:}'.format(e)) -# # assert isinstance(r) diff --git a/src/kpi_manager/tests/test_kpi_manager.py b/src/kpi_manager/tests/test_kpi_manager.py index 06e836b70963768b375ab04e29a640591b283108..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..ad111c2834586e0a949ea0396afb80124c7ed2d7 100644 --- a/src/nbi/Dockerfile +++ b/src/nbi/Dockerfile @@ -16,9 +16,24 @@ FROM python:3.9-slim # Install dependencies RUN apt-get --yes --quiet --quiet update && \ - apt-get --yes --quiet --quiet install wget g++ git && \ + apt-get --yes --quiet --quiet install wget g++ git build-essential cmake libpcre2-dev python3-dev python3-cffi && \ rm -rf /var/lib/apt/lists/* +# Download, build and install libyang. Note that APT package is outdated +# - Ref: https://github.com/CESNET/libyang +# - Ref: https://github.com/CESNET/libyang-python/ +RUN mkdir -p /var/libyang +RUN git clone https://github.com/CESNET/libyang.git /var/libyang +WORKDIR /var/libyang +RUN git fetch +RUN git checkout v2.1.148 +RUN mkdir -p /var/libyang/build +WORKDIR /var/libyang/build +RUN cmake -D CMAKE_BUILD_TYPE:String="Release" .. +RUN make +RUN make install +RUN ldconfig + # Set Python to show logs as they occur ENV PYTHONUNBUFFERED=0 @@ -53,24 +68,6 @@ 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' {} \; -# Download, build and install libyang. Note that APT package is outdated -# - Ref: https://github.com/CESNET/libyang -# - Ref: https://github.com/CESNET/libyang-python/ -RUN apt-get --yes --quiet --quiet update && \ - apt-get --yes --quiet --quiet install build-essential cmake libpcre2-dev python3-dev python3-cffi && \ - rm -rf /var/lib/apt/lists/* -RUN mkdir -p /var/libyang -RUN git clone https://github.com/CESNET/libyang.git /var/libyang -WORKDIR /var/libyang -RUN git fetch -RUN git checkout v2.1.148 -RUN mkdir -p /var/libyang/build -WORKDIR /var/libyang/build -RUN cmake -D CMAKE_BUILD_TYPE:String="Release" .. -RUN make -RUN make install -RUN ldconfig - # Create component sub-folders, get specific Python packages RUN mkdir -p /var/teraflow/nbi WORKDIR /var/teraflow/nbi @@ -89,6 +86,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/qkd_app/service/rest_server/qkd_app/Resources.py b/src/nbi/service/rest_server/nbi_plugins/qkd_app/Resources.py similarity index 57% rename from src/qkd_app/service/rest_server/qkd_app/Resources.py rename to src/nbi/service/rest_server/nbi_plugins/qkd_app/Resources.py index 6ba79d3940da91dfebc1a1c666893548caccbe6c..d14fe9575b21319a0fa597a7746510a11e102903 100644 --- a/src/qkd_app/service/rest_server/qkd_app/Resources.py +++ b/src/nbi/service/rest_server/nbi_plugins/qkd_app/Resources.py @@ -12,7 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import uuid, json +import uuid +import json from flask import request from flask_restful import Resource from common.proto.context_pb2 import Empty @@ -21,7 +22,6 @@ 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__() @@ -32,18 +32,56 @@ 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): - # Optare: Post request for the QKD Node to call the TeraflowSDN. Example of requests below def post(self): app = request.get_json()['app'] - - devices = self.context_client.ListDevices(Empty()) - devices = devices.devices - + devices = self.context_client.ListDevices(Empty()).devices local_device = None - - # This for-loop won't be necessary if we can garantee Device ID is the same as QKDN Id + # 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__': @@ -53,15 +91,6 @@ class CreateQKDApp(_Resource): local_device = device break - # Optare: Todo: Verify that a service is present for this app - ''' - requests.post('http://10.211.36.220/app/create_qkd_app', json={'app': {'server_app_id':'1', 'client_app_id':[], 'app_status':'ON', 'local_qkdn_id':'00000001-0000-0000-0000-000000000000', 'backing_qkdl_id':['00000003-0002-0000-0000-000000000000']}}) - - - requests.post('http://10.211.36.220/app/create_qkd_app', json={'app': {'server_app_id':'1', 'client_app_id':[], 'app_status':'ON', 'local_qkdn_id':'00000003-0000-0000-0000-000000000000', 'backing_qkdl_id':['00000003-0002-0000-0000-000000000000']}}) - ''' - - if local_device is None: return {"status": "fail"} @@ -76,11 +105,7 @@ class CreateQKDApp(_Resource): 'remote_device_id': {'device_uuid': {'uuid': ''}}, } - - # Optare: This will call our internal RegisterApp which supports the creation of both internal and external app. - # Optare the verification for knowing if two parties are requesting the same app is done inside RegisterApp's function self.qkd_app_client.RegisterApp(App(**external_app_src_dst)) - # Optare: Todo: Communicate by SBI with both Nodes of the new App - return {"status": "success"} + diff --git a/src/qkd_app/service/rest_server/qkd_app/__init__.py b/src/nbi/service/rest_server/nbi_plugins/qkd_app/__init__.py similarity index 67% rename from src/qkd_app/service/rest_server/qkd_app/__init__.py rename to src/nbi/service/rest_server/nbi_plugins/qkd_app/__init__.py index 6fc23b371414dcb2bac4afde63524febf71e5337..30982f104e189eb4af5b3f49b1abe2b0e5fb2d85 100644 --- a/src/qkd_app/service/rest_server/qkd_app/__init__.py +++ b/src/nbi/service/rest_server/nbi_plugins/qkd_app/__init__.py @@ -4,7 +4,7 @@ # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -12,19 +12,18 @@ # See the License for the specific language governing permissions and # limitations under the License. -from qkd_app.service.rest_server.RestServer import RestServer -from .Resources import ( - CreateQKDApp, Index) +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'), + ('api.index', Index, '/'), + ('api.register_qkd_app', CreateQKDApp, '/create_qkd_app'), ] -def register_qkd_app(app_server : RestServer): +def register_qkd_app(rest_server : RestServer): for endpoint_name, resource_class, resource_url in RESOURCES: - app_server.add_resource(resource_class, URL_PREFIX + resource_url, endpoint=endpoint_name) + 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/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/client/QKDAppClient.py b/src/qkd_app/client/QKDAppClient.py index 1a174df6adc69ab9ce88b0d8878c92b9b9e7820e..a35b18f1d9f380ae4f95f1a643716075642e31d6 100644 --- a/src/qkd_app/client/QKDAppClient.py +++ b/src/qkd_app/client/QKDAppClient.py @@ -12,53 +12,92 @@ # See the License for the specific language governing permissions and # limitations under the License. -import grpc, logging +import grpc +import logging from common.Constants import ServiceNameEnum from common.Settings import get_service_host, get_service_port_grpc -from common.proto.context_pb2 import Empty, ContextId 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) -RETRY_DECORATOR = retry(max_retries=MAX_RETRIES, delay_function=DELAY_FUNCTION, prepare_method_name='connect') class QKDAppClient: def __init__(self, host=None, port=None): - if not host: host = get_service_host(ServiceNameEnum.QKD_APP) - if not port: port = get_service_port_grpc(ServiceNameEnum.QKD_APP) - self.endpoint = '{:s}:{:s}'.format(str(host), str(port)) - LOGGER.debug('Creating channel to {:s}...'.format(self.endpoint)) + 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() - LOGGER.debug('Channel created') def connect(self): - self.channel = grpc.insecure_channel(self.endpoint) - self.stub = AppServiceStub(self.channel) + 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 is not None: self.channel.close() + 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_DECORATOR - def RegisterApp(self, request : App) -> Empty: - LOGGER.debug('RegisterApp request: {:s}'.format(grpc_message_to_json_string(request))) - response = self.stub.RegisterApp(request) - LOGGER.debug('RegisterApp result: {:s}'.format(grpc_message_to_json_string(response))) + @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_DECORATOR - def ListApps(self, request: ContextId) -> AppList: - LOGGER.debug('ListApps request: {:s}'.format(grpc_message_to_json_string(request))) - response = self.stub.ListApps(request) - LOGGER.debug('ListApps result: {:s}'.format(grpc_message_to_json_string(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/service/QKDAppService.py b/src/qkd_app/service/QKDAppService.py index a6c93cd811a72594804fe8e8e86a9586533a1317..b9b34ed9b8239ea119c5af1364bbc53914b42c51 100644 --- a/src/qkd_app/service/QKDAppService.py +++ b/src/qkd_app/service/QKDAppService.py @@ -12,7 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging, sqlalchemy +import logging +import sqlalchemy from common.Constants import ServiceNameEnum from common.Settings import get_service_port_grpc from common.message_broker.MessageBroker import MessageBroker @@ -20,18 +21,38 @@ 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 -# Custom gRPC settings -GRPC_MAX_WORKERS = 200 # multiple clients might keep connections alive for Get*Events() RPC methods +# 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__ + 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 index df7a885c47eda9d7a6137c9905388da49c698e7e..3ef13b75e5510a95b91a9a67fa65ed06c32a3526 100644 --- a/src/qkd_app/service/QKDAppServiceServicerImpl.py +++ b/src/qkd_app/service/QKDAppServiceServicerImpl.py @@ -12,62 +12,175 @@ # See the License for the specific language governing permissions and # limitations under the License. -import grpc, logging, sqlalchemy -#from typing import Iterator, Optional +import grpc +import logging +import sqlalchemy +import uuid from common.message_broker.MessageBroker import MessageBroker -import grpc, json, logging #, deepdiff -from common.proto.context_pb2 import ( - Empty, Service, ServiceId, ServiceStatusEnum, ServiceTypeEnum, ContextId) -from common.proto.qkd_app_pb2 import (App, AppId, AppList, QKDAppTypesEnum) +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 common.tools.context_queries.InterDomain import is_inter_domain #, is_multi_domain -#from common.tools.grpc.ConfigRules import copy_config_rules -#from common.tools.grpc.Constraints import copy_constraints -#from common.tools.grpc.EndPointIds import copy_endpoint_ids -#from common.tools.grpc.ServiceIds import update_service_ids -#from common.tools.grpc.Tools import grpc_message_to_json_string -#from context.client.ContextClient import ContextClient -#from qkd_app.client.QKDAppClient import QKDAppClient -from .database.QKDApp import app_set, app_list_objs, app_get, app_get_by_server -from common.method_wrappers.ServiceExceptions import NotFoundException +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') -# Optare: This file must be edited based on app's logic - class AppServiceServicerImpl(AppServiceServicer): - def __init__(self, db_engine : sqlalchemy.engine.Engine, messagebroker : MessageBroker): - LOGGER.debug('Creating Servicer...') + def __init__(self, db_engine: sqlalchemy.engine.Engine, messagebroker: MessageBroker): + LOGGER.debug('Initializing AppServiceServicer...') self.db_engine = db_engine self.messagebroker = messagebroker - LOGGER.debug('Servicer Created') + LOGGER.debug('AppServiceServicer initialized') @safe_and_metered_rpc_method(METRICS_POOL, LOGGER) - def RegisterApp(self, request : App, context : grpc.ServicerContext) -> Empty: - # Optare: This is the main function required for the project. - # Optare: If it's an internal it will save it directly. If it's an external one it will save it as pending by not providing the remote until the other party requests it too - # Optare: Ideally, the only thing needed to change is the code inside the try block. Currently it just searches by a pending app with the same server_id but you can put more restrictions or different search and raise the NotFoundException + 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)}") - if request.app_type == QKDAppTypesEnum.QKDAPPTYPES_INTERNAL: - app_set(self.db_engine, self.messagebroker, request) + try: + # Validate QoS parameters as per ETSI 015 requirements + self._validate_qos(request.qos) - else: - try: - app = app_get_by_server(self.db_engine, request.server_app_id) - except NotFoundException: - app = request - app_set(self.db_engine, self.messagebroker, app) + # 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: - app.remote_device_id.device_uuid.uuid = request.local_device_id.device_uuid.uuid - app_set(self.db_engine, self.messagebroker, app) - - - return Empty() - + # 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 ListApps(self, request: ContextId, context : grpc.ServicerContext) -> AppList: - return app_list_objs(self.db_engine) + 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/__main__.py b/src/qkd_app/service/__main__.py index ed7e554728eb2de6240dd4facb7f084337a026a4..17f3ac240c33b28454e2df43862dd66a50eb5c45 100644 --- a/src/qkd_app/service/__main__.py +++ b/src/qkd_app/service/__main__.py @@ -4,7 +4,7 @@ # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, @@ -12,82 +12,82 @@ # See the License for the specific language governing permissions and # limitations under the License. -import logging, signal, sys, threading +import logging +import signal +import sys +import 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) +from common.Settings import get_log_level, get_metrics_port from qkd_app.service.QKDAppService import AppService -from qkd_app.service.rest_server.RestServer import RestServer -from qkd_app.service.rest_server.qkd_app import register_qkd_app -#from common.message_broker.Factory import get_messagebroker_backend -#from common.message_broker.MessageBroker import MessageBroker 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() -LOGGER : logging.Logger = None -def signal_handler(signal, frame): # pylint: disable=redefined-outer-name - LOGGER.warning('Terminate signal received') +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(): - global LOGGER # pylint: disable=global-statement - - log_level = get_log_level() - logging.basicConfig(level=log_level, format="[%(asctime)s] %(levelname)s:%(name)s:%(message)s") - LOGGER = logging.getLogger(__name__) - - 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), - ]) - + LOGGER.info('Starting...') + # Register signal handlers for graceful shutdown signal.signal(signal.SIGINT, signal_handler) signal.signal(signal.SIGTERM, signal_handler) - LOGGER.info('Starting...') - - # Start metrics server + # Start Prometheus metrics server metrics_port = get_metrics_port() start_http_server(metrics_port) + LOGGER.info(f'Metrics server started on port {metrics_port}') - # Get Database Engine instance and initialize database, if needed + # 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...') + 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: # pylint: disable=bare-except # pragma: no cover - LOGGER.exception('Failed to check/create the database: {:s}'.format(str(db_engine.url))) + 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) - # Get message broker instance - messagebroker = None #MessageBroker(get_messagebroker_backend()) + # Initialize the message broker (if needed) + messagebroker = None # Disabled until further notice, can be re-enabled when necessary + # messagebroker = MessageBroker(get_messagebroker_backend()) - # Starting context service + # Start the gRPC App Service grpc_service = AppService(db_engine, messagebroker) grpc_service.start() - rest_server = RestServer() - register_qkd_app(rest_server) - rest_server.start() + LOGGER.info('Services started. Waiting for termination signal...') # Wait for Ctrl+C or termination signal - while not terminate.wait(timeout=1.0): pass + # Keep the process running until a termination signal is received + while not terminate.wait(timeout=1.0): + pass - LOGGER.info('Terminating...') + # Shutdown services gracefully on termination + LOGGER.info('Terminating services...') grpc_service.stop() - rest_server.shutdown() - rest_server.join() - LOGGER.info('Bye') + LOGGER.info('Shutdown complete. Exiting...') return 0 if __name__ == '__main__': diff --git a/src/qkd_app/service/database/Engine.py b/src/qkd_app/service/database/Engine.py index 8f528f9a1b3cacca2ea260901ab808461dd3183d..ec86618218cc396dea31404b88d33e46d320ed58 100644 --- a/src/qkd_app/service/database/Engine.py +++ b/src/qkd_app/service/database/Engine.py @@ -28,7 +28,7 @@ class Engine: if crdb_uri is None: CRDB_NAMESPACE = get_setting('CRDB_NAMESPACE') CRDB_SQL_PORT = get_setting('CRDB_SQL_PORT') - CRDB_DATABASE = get_setting('CRDB_DATABASE_APP') + 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/qkd_app/service/database/QKDApp.py b/src/qkd_app/service/database/QKDApp.py index b1fb90d4efcd0770bcc4c48c1f00deb0e95687ad..539555a4dac055d56158298ed7db6dceec39f446 100644 --- a/src/qkd_app/service/database/QKDApp.py +++ b/src/qkd_app/service/database/QKDApp.py @@ -12,174 +12,162 @@ # See the License for the specific language governing permissions and # limitations under the License. -import datetime, logging, uuid +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, selectinload, sessionmaker +from sqlalchemy.orm import Session, sessionmaker from sqlalchemy_cockroachdb import run_transaction -from typing import Dict, List, Optional, Set, Tuple -from common.method_wrappers.ServiceExceptions import InvalidArgumentException, NotFoundException + +from common.method_wrappers.ServiceExceptions import NotFoundException from common.message_broker.MessageBroker import MessageBroker -from common.proto.context_pb2 import Empty -from common.proto.qkd_app_pb2 import ( - AppList, App, AppId) -from common.tools.grpc.Tools import grpc_message_to_json_string +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 .models.enums.QKDAppStatus import grpc_to_enum__qkd_app_status -from .models.enums.QKDAppTypes import grpc_to_enum__qkd_app_types from .uuids.QKDApp import app_get_uuid -from common.tools.object_factory.Context import json_context_id -from common.tools.object_factory.QKDApp import json_app_id 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__) -#from .Events import notify_event_context, notify_event_device, notify_event_topology +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. -LOGGER = logging.getLogger(__name__) + :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()] -def app_list_objs(db_engine : Engine) -> AppList: - def callback(session : Session) -> List[Dict]: - obj_list : List[AppModel] = session.query(AppModel)\ - .all() - return [obj.dump() for obj in obj_list] apps = run_transaction(sessionmaker(bind=db_engine), callback) return AppList(apps=apps) -def app_get(db_engine : Engine, request : AppId) -> App: + +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 : Optional[AppModel] = session.query(AppModel)\ - .filter_by(app_uuid=app_uuid).one_or_none() - return None if obj is None else obj.dump() + + 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 obj is None: - raw_app_uuid = request.app_uuid.uuid - raise NotFoundException('App', raw_app_uuid, extra_details=[ - 'app_uuid generated was: {:s}'.format(app_uuid) + + 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: - context_uuid = context_get_uuid(request.app_id.context_id, allow_random=False) - raw_app_uuid = request.app_id.app_uuid.uuid - app_uuid = app_get_uuid(request.app_id, allow_random=True) - app_type = request.app_type - app_status = grpc_to_enum__qkd_app_status(request.app_status) - app_type = grpc_to_enum__qkd_app_types(request.app_type) +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. - now = datetime.datetime.utcnow() + :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) - - app_data = [{ - 'context_uuid' : context_uuid, - 'app_uuid' : app_uuid, - 'app_status' : app_status, - 'app_type' : app_type, - 'server_app_id' : request.server_app_id, - 'client_app_id' : request.client_app_id, - 'backing_qkdl_uuid' : [qkdl_id.qkdl_uuid.uuid for qkdl_id 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 or None, - 'created_at' : now, - 'updated_at' : now, - }] - - - def callback(session : Session) -> Tuple[bool, List[Dict]]: + # 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, + 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 ) ) - stmt = stmt.returning(AppModel.created_at, AppModel.updated_at) - created_at,updated_at = session.execute(stmt).fetchone() - updated = updated_at > created_at - - return updated - - updated = run_transaction(sessionmaker(bind=db_engine), callback) - context_id = json_context_id(context_uuid) - app_id = json_app_id(app_uuid, context_id=context_id) - #event_type = EventTypeEnum.EVENTTYPE_UPDATE if updated else EventTypeEnum.EVENTTYPE_CREATE - #notify_event_app(messagebroker, event_type, app_id) - #notify_event_context(messagebroker, EventTypeEnum.EVENTTYPE_UPDATE, context_id) + 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 -def app_get_by_server(db_engine : Engine, request : str) -> App: - def callback(session : Session) -> Optional[Dict]: - obj : Optional[AppModel] = session.query(AppModel)\ - .filter_by(server_app_id=request).one_or_none() - return None if obj is None else obj.dump() obj = run_transaction(sessionmaker(bind=db_engine), callback) - if obj is None: - raise NotFoundException('No app match found for', request) + + 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 -""" -def device_delete(db_engine : Engine, messagebroker : MessageBroker, request : DeviceId) -> Empty: - device_uuid = device_get_uuid(request, allow_random=False) - def callback(session : Session) -> Tuple[bool, List[Dict]]: - query = session.query(TopologyDeviceModel) - query = query.filter_by(device_uuid=device_uuid) - topology_device_list : List[TopologyDeviceModel] = query.all() - topology_ids = [obj.topology.dump_id() for obj in topology_device_list] - num_deleted = session.query(DeviceModel).filter_by(device_uuid=device_uuid).delete() - return num_deleted > 0, topology_ids - deleted, updated_topology_ids = run_transaction(sessionmaker(bind=db_engine), callback) - device_id = json_device_id(device_uuid) - if deleted: - notify_event_device(messagebroker, EventTypeEnum.EVENTTYPE_REMOVE, device_id) - - context_ids : Dict[str, Dict] = dict() - topology_ids : Dict[str, Dict] = dict() - for topology_id in updated_topology_ids: - topology_uuid = topology_id['topology_uuid']['uuid'] - topology_ids[topology_uuid] = topology_id - context_id = topology_id['context_id'] - context_uuid = context_id['context_uuid']['uuid'] - context_ids[context_uuid] = context_id - - for topology_id in topology_ids.values(): - notify_event_topology(messagebroker, EventTypeEnum.EVENTTYPE_UPDATE, topology_id) - - for context_id in context_ids.values(): - notify_event_context(messagebroker, EventTypeEnum.EVENTTYPE_UPDATE, context_id) - - return Empty() - -def device_select(db_engine : Engine, request : DeviceFilter) -> DeviceList: - device_uuids = [ - device_get_uuid(device_id, allow_random=False) - for device_id in request.device_ids.device_ids - ] - dump_params = dict( - include_endpoints =request.include_endpoints, - include_config_rules=request.include_config_rules, - include_components =request.include_components, - ) - def callback(session : Session) -> List[Dict]: - query = session.query(DeviceModel) - if request.include_endpoints : query = query.options(selectinload(DeviceModel.endpoints)) - if request.include_config_rules: query = query.options(selectinload(DeviceModel.config_rules)) - #if request.include_components : query = query.options(selectinload(DeviceModel.components)) - obj_list : List[DeviceModel] = query.filter(DeviceModel.device_uuid.in_(device_uuids)).all() - return [obj.dump(**dump_params) for obj in obj_list] - devices = run_transaction(sessionmaker(bind=db_engine), callback) - return DeviceList(devices=devices) -""" + run_transaction(sessionmaker(bind=db_engine), callback) diff --git a/src/qkd_app/service/database/models/QKDAppModel.py b/src/qkd_app/service/database/models/QKDAppModel.py index c32b4e28c95105d8659cb52790f51b330764c2cf..d9797d73c9c168efee5810014a70e0425f67e051 100644 --- a/src/qkd_app/service/database/models/QKDAppModel.py +++ b/src/qkd_app/service/database/models/QKDAppModel.py @@ -12,52 +12,70 @@ # See the License for the specific language governing permissions and # limitations under the License. -import operator -from sqlalchemy import CheckConstraint, Column, DateTime, Float, Enum, ForeignKey, Integer, String -from sqlalchemy.dialects.postgresql import UUID, ARRAY -from sqlalchemy.orm import relationship +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' - app_uuid = Column(UUID(as_uuid=False), primary_key=True) - context_uuid = Column(UUID(as_uuid=False), nullable=False) # Supposed to be Foreign Key - app_status = Column(Enum(ORM_QKDAppStatusEnum), nullable=False) - app_type = Column(Enum(ORM_QKDAppTypesEnum), nullable=False) - server_app_id = Column(String, nullable=False) - client_app_id = Column(ARRAY(String), nullable=False) - backing_qkdl_uuid = Column(ARRAY(UUID(as_uuid=False)), nullable=False) - local_device_uuid = Column(UUID(as_uuid=False), nullable=False) - remote_device_uuid = Column(UUID(as_uuid=False), nullable=True) + # 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).") - # Optare: Created_at and Updated_at are only used to know if an app was updated later on the code. Don't change it + # 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.") - created_at = Column(DateTime, nullable=False) - updated_at = Column(DateTime, nullable=False) + # 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).") - #__table_args__ = ( - # CheckConstraint(... >= 0, name='name_value_...'), - #) + # 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: - result = { - '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}}, + """ + 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, } - return result diff --git a/src/qkd_app/service/database/models/_Base.py b/src/qkd_app/service/database/models/_Base.py index 51863e1d5c06a875c298eab726cfdc3b7fcb75ca..f17fb9a56dcd120ad1dc95ceee720aa942f6ae6c 100644 --- a/src/qkd_app/service/database/models/_Base.py +++ b/src/qkd_app/service/database/models/_Base.py @@ -13,32 +13,17 @@ # limitations under the License. import sqlalchemy -from typing import Any, List -from sqlalchemy.orm import Session, sessionmaker, declarative_base -from sqlalchemy.sql import text -from sqlalchemy_cockroachdb import run_transaction +from sqlalchemy.orm import declarative_base _Base = declarative_base() -''' -def create_performance_enhancers(db_engine : sqlalchemy.engine.Engine) -> None: - def index_storing( - index_name : str, table_name : str, index_fields : List[str], storing_fields : List[str] - ) -> Any: - str_index_fields = ','.join(['"{:s}"'.format(index_field) for index_field in index_fields]) - str_storing_fields = ','.join(['"{:s}"'.format(storing_field) for storing_field in storing_fields]) - INDEX_STORING = 'CREATE INDEX IF NOT EXISTS {:s} ON "{:s}" ({:s}) STORING ({:s});' - return text(INDEX_STORING.format(index_name, table_name, str_index_fields, str_storing_fields)) - - statements = [ - # In case of relations - ] - def callback(session : Session) -> bool: - for stmt in statements: session.execute(stmt) - run_transaction(sessionmaker(bind=db_engine), callback) -''' - -def rebuild_database(db_engine : sqlalchemy.engine.Engine, drop_if_exists : bool = False): - if drop_if_exists: _Base.metadata.drop_all(db_engine) +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) - #create_performance_enhancers(db_engine) diff --git a/src/qkd_app/service/database/models/enums/QKDAppStatus.py b/src/qkd_app/service/database/models/enums/QKDAppStatus.py index d3063ef56704ce1bdd48d15ea8c6486ed7c8cfae..980a8b14adca8c69eaf567037dc09872f33622f9 100644 --- a/src/qkd_app/service/database/models/enums/QKDAppStatus.py +++ b/src/qkd_app/service/database/models/enums/QKDAppStatus.py @@ -12,16 +12,19 @@ # See the License for the specific language governing permissions and # limitations under the License. -import enum, functools +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 + ON = QKDAppStatusEnum.QKDAPPSTATUS_ON DISCONNECTED = QKDAppStatusEnum.QKDAPPSTATUS_DISCONNECTED - OUT_OF_TIME = QKDAppStatusEnum.QKDAPPSTATUS_OUT_OF_TIME - ZOMBIE = QKDAppStatusEnum.QKDAPPSTATUS_ZOMBIE - + 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) + 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 index f50b8982d80c0af97c2cbd96d336f450afc50f9b..fdd318cec49b7b7ec8e1a0347c8b0f8c1aeb3a5c 100644 --- a/src/qkd_app/service/database/models/enums/QKDAppTypes.py +++ b/src/qkd_app/service/database/models/enums/QKDAppTypes.py @@ -12,14 +12,17 @@ # See the License for the specific language governing permissions and # limitations under the License. -import enum, functools +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 - + 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) + grpc_to_enum, QKDAppTypesEnum, ORM_QKDAppTypesEnum +) diff --git a/src/qkd_app/service/database/uuids/QKDApp.py b/src/qkd_app/service/database/uuids/QKDApp.py index 175f1d5f3cf4ceda12a022b4afadb376e11ae5a5..f6c0e1e12d591e747adf9497c77177e0fdd4dc51 100644 --- a/src/qkd_app/service/database/uuids/QKDApp.py +++ b/src/qkd_app/service/database/uuids/QKDApp.py @@ -16,15 +16,22 @@ 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: +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 len(app_uuid) > 0: + if app_uuid: return get_uuid_from_string(app_uuid) - if allow_random: return get_uuid_random() + + if allow_random: + return get_uuid_random() raise InvalidArgumentsException([ ('app_id.app_uuid.uuid', app_uuid), - ], extra_details=['At least one is required to produce a 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 index 39c98de69d577ce2722693e57c4ee678124f9e30..c5996b0f9d2cced27fd05e3966c3a60fa9bae24d 100644 --- a/src/qkd_app/service/database/uuids/_Builder.py +++ b/src/qkd_app/service/database/uuids/_Builder.py @@ -15,30 +15,37 @@ from typing import Optional, Union from uuid import UUID, uuid4, uuid5 -# Generate a UUIDv5-like from the SHA-1 of "TFS" and no namespace to be used as the NAMESPACE for all -# the context UUIDs generated. For efficiency purposes, the UUID is hardcoded; however, it is produced -# using the following code: -# from hashlib import sha1 -# from uuid import UUID -# hash = sha1(bytes('TFS', 'utf-8')).digest() -# NAMESPACE_TFS = UUID(bytes=hash[:16], version=5) +# 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: - # if UUID given, assume it is already a valid UUID - if isinstance(str_uuid_or_name, UUID): return str_uuid_or_name +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): - MSG = 'Parameter({:s}) cannot be used to produce a UUID' - raise Exception(MSG.format(str(repr(str_uuid_or_name)))) + raise ValueError(f"Invalid parameter ({repr(str_uuid_or_name)}). Expected a string or UUID to produce a valid UUID.") + try: - # try to parse as UUID + # Try to interpret the input as a UUID return str(UUID(str_uuid_or_name)) - except: # pylint: disable=bare-except - # produce a UUID within TFS namespace from parameter - if prefix_for_name is not None: - str_uuid_or_name = '{:s}/{:s}'.format(prefix_for_name, 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 random UUID. No need to use namespace since "namespace + random = random". + """ + 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/qos_profile/service/database/Engine.py b/src/qos_profile/service/database/Engine.py new file mode 100644 index 0000000000000000000000000000000000000000..6ba1a82d0b5790deded242ecde682020a0c785f8 --- /dev/null +++ b/src/qos_profile/service/database/Engine.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 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}@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 = 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, 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 + + 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/service/service_handlers/qkd/qkd_service_handler.py b/src/service/service/service_handlers/qkd/qkd_service_handler.py index 64c2b3c314c10860a2bfe291d88ce98690d03e2a..bf874e4849e20edd694dea256be2676356b4fc80 100644 --- a/src/service/service/service_handlers/qkd/qkd_service_handler.py +++ b/src/service/service/service_handlers/qkd/qkd_service_handler.py @@ -17,7 +17,8 @@ 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, QKDAppStatusEnum, QKDAppTypesEnum +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 @@ -41,6 +42,7 @@ class QKDServiceHandler(_ServiceHandler): 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 @@ -88,14 +90,9 @@ class QKDServiceHandler(_ServiceHandler): 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 @@ -271,7 +268,7 @@ class QKDServiceHandler(_ServiceHandler): 'remote_device_id': dst_device.device_id, } - self.__task_executor.register_app(App(**internal_app_src_dst)) + self.__task_executor.register_qkd_app(App(**internal_app_src_dst)) # Register App @@ -286,7 +283,7 @@ class QKDServiceHandler(_ServiceHandler): 'remote_device_id': src_device.device_id, } - self.__task_executor.register_app(App(**internal_app_dst_src)) + self.__task_executor.register_qkd_app(App(**internal_app_dst_src)) results.append(True) except Exception as e: # pylint: disable=broad-except @@ -297,31 +294,127 @@ class QKDServiceHandler(_ServiceHandler): # Optare: This will be to delete a service def DeleteEndpoint( - self, endpoints : List[Tuple[str, str, Optional[str]]], - connection_uuid : Optional[str] = None + self, endpoints: List[Tuple[str, str, Optional[str]]], connection_uuid: Optional[str] = None ) -> List[Union[bool, Exception]]: - """ Delete service endpoints form a list. - Parameters: - endpoints: List[Tuple[str, str, Optional[str]]] - List of tuples, each containing a device_uuid, - endpoint_uuid, and the topology_uuid of the endpoint - to be removed. - connection_uuid : Optional[str] - If specified, is the UUID of the connection this endpoint is associated to. - Returns: - results: List[Union[bool, Exception]] - List of results for endpoint deletions requested. - Return values must be in the same order as the requested - endpoints. If an endpoint is properly deleted, True must be - returned; otherwise, the Exception that is raised during - the processing must be returned. - """ - raise NotImplementedError() + 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]]: + def SetConstraint(self, constraints: List[Tuple[str, Any]]) -> List[Union[bool, Exception]]: """ Create/Update service constraints. Parameters: constraints: List[Tuple[str, Any]] @@ -335,10 +428,30 @@ class QKDServiceHandler(_ServiceHandler): returned; otherwise, the Exception that is raised during the processing must be returned. """ - raise NotImplementedError() + 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) - def DeleteConstraint(self, constraints: List[Tuple[str, Any]]) \ - -> List[Union[bool, Exception]]: + # 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]] @@ -354,16 +467,37 @@ class QKDServiceHandler(_ServiceHandler): be returned; otherwise, the Exception that is raised during the processing must be returned. """ - raise NotImplementedError() + 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) - def SetConfig(self, resources: List[Tuple[str, Any]]) \ - -> List[Union[bool, Exception]]: + 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. + 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. @@ -372,10 +506,28 @@ class QKDServiceHandler(_ServiceHandler): returned; otherwise, the Exception that is raised during the processing must be returned. """ - raise NotImplementedError() + 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]]: + 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]] @@ -391,4 +543,25 @@ class QKDServiceHandler(_ServiceHandler): be returned; otherwise, the Exception that is raised during the processing must be returned. """ - raise NotImplementedError() + 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 d7b9a7495d470d710f8d9d9825b4e5c716c150e0..aed827816c0fa6fdc574c87bf72a32595c522ab2 100644 --- a/src/service/service/task_scheduler/TaskExecutor.py +++ b/src/service/service/task_scheduler/TaskExecutor.py @@ -16,11 +16,14 @@ import json, logging from enum import Enum from typing import TYPE_CHECKING, Any, Dict, Optional, Union 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,ConnectionList,ServiceConfigRule ) -from common.proto.qkd_app_pb2 import App +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 @@ -33,7 +36,7 @@ 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 from service.service.tools.object_uuid import opticalconfig_get_uuid from common.DeviceTypes import DeviceTypeEnum @@ -336,8 +339,56 @@ class TaskExecutor: # ----- QkdApp-related methods ------------------------------------------------------------------------------------- - def register_app(self, app: App) -> None: - app_key = get_app_key(app.app_id) + 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("reg registered") - self._store_grpc_object(CacheableObjectType.QKD_APP, app_key, 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 940633eb978d60d01638075499d447a30667ba96..f69f781ee9936ecc496451c0c589e78e227c1ef3 100644 --- a/src/service/service/tools/ObjectKeys.py +++ b/src/service/service/tools/ObjectKeys.py @@ -27,6 +27,6 @@ def get_service_key(service_id : ServiceId) -> str: service_uuid = service_id.service_uuid.uuid return '{:s}/{:s}'.format(context_uuid, service_uuid) -def get_app_key(app_id : AppId) -> str: +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..81ef24481cffc70c6b33bbfbf19d57b062729891 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: {:s}".format(str(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.error('Message delivery failed: {:}'.format(err)) + # print(f'Message delivery failed: {err}') + #else: + # LOGGER.debug('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/frontend/client/TelemetryFrontendClient.py b/src/telemetry/frontend/client/TelemetryFrontendClient.py index cd36ecd45933ad10758e408cf03c1bf834d27ba6..afcf241530a41f1f4ab1729379a4e5196c25d04f 100644 --- a/src/telemetry/frontend/client/TelemetryFrontendClient.py +++ b/src/telemetry/frontend/client/TelemetryFrontendClient.py @@ -29,8 +29,8 @@ RETRY_DECORATOR = retry(max_retries=MAX_RETRIES, delay_function=DELAY_FUNCTION, class TelemetryFrontendClient: def __init__(self, host=None, port=None): - if not host: host = get_service_host(ServiceNameEnum.TELEMETRYFRONTEND) - if not port: port = get_service_port_grpc(ServiceNameEnum.TELEMETRYFRONTEND) + if not host: host = get_service_host(ServiceNameEnum.TELEMETRY) + if not port: port = get_service_port_grpc(ServiceNameEnum.TELEMETRY) self.endpoint = '{:s}:{:s}'.format(str(host), str(port)) LOGGER.debug('Creating channel to {:s}...'.format(str(self.endpoint))) self.channel = None diff --git a/src/telemetry/frontend/service/TelemetryFrontendService.py b/src/telemetry/frontend/service/TelemetryFrontendService.py index abd361aa0082e2de1d1f5fa7e81a336f3091af9a..49def20a1ce3cee1062d1e582fd8ec28308652b7 100644 --- a/src/telemetry/frontend/service/TelemetryFrontendService.py +++ b/src/telemetry/frontend/service/TelemetryFrontendService.py @@ -21,7 +21,7 @@ from telemetry.frontend.service.TelemetryFrontendServiceServicerImpl import Tele class TelemetryFrontendService(GenericGrpcService): def __init__(self, cls_name: str = __name__) -> None: - port = get_service_port_grpc(ServiceNameEnum.TELEMETRYFRONTEND) + port = get_service_port_grpc(ServiceNameEnum.TELEMETRY) super().__init__(port, cls_name=cls_name) self.telemetry_frontend_servicer = TelemetryFrontendServiceServicerImpl() diff --git a/src/telemetry/frontend/service/TelemetryFrontendServiceServicerImpl.py b/src/telemetry/frontend/service/TelemetryFrontendServiceServicerImpl.py index c72e66bdd53f165ebae131e07f51d23e609dd8be..5c569e2ddd1d75dd89f88fe9ae08517330470254 100644 --- a/src/telemetry/frontend/service/TelemetryFrontendServiceServicerImpl.py +++ b/src/telemetry/frontend/service/TelemetryFrontendServiceServicerImpl.py @@ -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/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..988d76af0380302cd6351d46eccf6159bf1dc5ab 100644 --- a/src/telemetry/frontend/tests/test_frontend.py +++ b/src/telemetry/frontend/tests/test_frontend.py @@ -36,9 +36,9 @@ from telemetry.frontend.service.TelemetryFrontendServiceServicerImpl import Tele LOCAL_HOST = '127.0.0.1' -TELEMETRY_FRONTEND_PORT = str(get_service_port_grpc(ServiceNameEnum.TELEMETRYFRONTEND)) -os.environ[get_env_var_name(ServiceNameEnum.TELEMETRYFRONTEND, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST) -os.environ[get_env_var_name(ServiceNameEnum.TELEMETRYFRONTEND, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(TELEMETRY_FRONTEND_PORT) +TELEMETRY_FRONTEND_PORT = str(get_service_port_grpc(ServiceNameEnum.TELEMETRY)) +os.environ[get_env_var_name(ServiceNameEnum.TELEMETRY, ENVVAR_SUFIX_SERVICE_HOST )] = str(LOCAL_HOST) +os.environ[get_env_var_name(ServiceNameEnum.TELEMETRY, ENVVAR_SUFIX_SERVICE_PORT_GRPC)] = str(TELEMETRY_FRONTEND_PORT) LOGGER = logging.getLogger(__name__) @@ -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 1b122e4bca266018c01044e2eb8a1ab277b3e3c3..bbc02a2a22fbbae3a1064fc5f9606ec8b29ff0f9 100644 --- a/src/telemetry/tests/test_telemetryDB.py +++ b/src/telemetry/tests/test_telemetryDB.py @@ -15,12 +15,13 @@ 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 = TelemetryDB(CollectorModel) # TelemetryDBobj.drop_database() # TelemetryDBobj.verify_tables() TelemetryDBobj.create_database() 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/start.sh b/src/tests/tools/mock_qkd_nodes/start.sh index faf2f84baf61f16565b497b53bf5f41f45007c00..89797b9c9496cdf58061c406ad2886be0d9c47f6 100755 --- a/src/tests/tools/mock_qkd_nodes/start.sh +++ b/src/tests/tools/mock_qkd_nodes/start.sh @@ -13,18 +13,30 @@ # 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 + 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 + +flask run --host 0.0.0.0 --port 33333 & +pids+=($!) + +# Wait for all background processes to finish +wait + diff --git a/src/webui/service/__main__.py b/src/webui/service/__main__.py index bb6b8bfc7187dec41cda3e8bcf7b5a1b9f8a601d..109c468c7daeda22efedf75a7293c6d8c6f038d8 100644 --- a/src/webui/service/__main__.py +++ b/src/webui/service/__main__.py @@ -41,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/qkd_app/routes.py b/src/webui/service/qkd_app/routes.py index 71243fb75e552ec5568eedacdcadabbc39516b4e..200d6ebdd17918dbb3d026980c4286212f519b82 100644 --- a/src/webui/service/qkd_app/routes.py +++ b/src/webui/service/qkd_app/routes.py @@ -12,21 +12,23 @@ # See the License for the specific language governing permissions and # limitations under the License. -import grpc, json, logging - +import grpc +import logging from flask import current_app, render_template, Blueprint, flash, session, redirect, url_for -from common.proto.context_pb2 import Empty, Link, LinkId, LinkList -from common.proto.qkd_app_pb2 import App, QKDAppStatusEnum, QKDAppTypesEnum +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 common.tools.context_queries.Topology import get_topology 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() @@ -35,79 +37,131 @@ 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() - 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: - apps = qkd_app_client.ListApps(context_obj.context_id) - apps = apps.apps - except grpc.RpcError as e: - if e.code() != grpc.StatusCode.NOT_FOUND: raise - if e.details() != 'Context({:s}) not found'.format(context_uuid): raise + 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: - # Too many requests to context_client if it has too many apps (update in the future) - 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 is not None: - 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 is not None: - device_names[app.remote_device_id.device_uuid.uuid] = device.name - - context_client.close() - return render_template( - 'qkd_app/home.html', apps=apps, device_names=device_names, ate=QKDAppTypesEnum, ase=QKDAppStatusEnum) + 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')) +@qkd_app.route('detail/<path:app_uuid>', methods=['GET', 'POST']) def detail(app_uuid: str): - ''' - context_client.connect() - link_obj = get_link(context_client, link_uuid, rw_copy=False) - if link_obj is None: - flash('Link({:s}) not found'.format(str(link_uuid)), 'danger') - link_obj = Link() - device_names, endpoints_data = dict(), dict() - else: - device_names, endpoints_data = get_endpoint_names(context_client, link_obj.link_endpoint_ids) - context_client.close() - return render_template('link/detail.html',link=link_obj, device_names=device_names, endpoints_data=endpoints_data) - ''' - pass + """ + 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): - ''' +def delete(app_uuid: str): + """ + Deletes a specific QKD app identified by its UUID. + """ try: + request = AppId(app_uuid=Uuid(uuid=app_uuid)) - # first, check if link exists! - # request: LinkId = LinkId() - # request.link_uuid.uuid = link_uuid - # response: Link = client.GetLink(request) - # TODO: finalize implementation + qkd_app_client.connect() + qkd_app_client.DeleteApp(request) # Call the DeleteApp method + qkd_app_client.close() - request = LinkId() - request.link_uuid.uuid = link_uuid # pylint: disable=no-member - context_client.connect() - context_client.RemoveLink(request) - context_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') - flash(f'Link "{link_uuid}" deleted successfully!', 'success') - except Exception as e: # pylint: disable=broad-except - flash(f'Problem deleting link "{link_uuid}": {e.details()}', 'danger') - current_app.logger.exception(e) - return redirect(url_for('link.home')) - ''' - pass + return redirect(url_for('qkd_app.home')) 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 index 9573013f41410a5d8560e71c174ce6a85237089f..39b43ecc4b9b71e03d27bf080ae6c7be2bf1a90d 100644 --- a/src/webui/service/templates/qkd_app/home.html +++ b/src/webui/service/templates/qkd_app/home.html @@ -74,14 +74,12 @@ {% 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> - --> + <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 %}